diff --git a/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java index 558a94fef2..a7f9bcbd28 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -11,10 +24,7 @@ import javax.swing.JLabel; import javax.swing.JList; import javax.swing.event.ListSelectionListener; -/** - * - * @author wschaefer - */ + abstract class AbstractDiscoveryFilterPanel extends javax.swing.JPanel { private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java index 93e3d4b959..b8f6ba9e5a 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -18,10 +31,7 @@ import javax.swing.JSplitPane; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -/** - * - * @author wschaefer - */ + abstract class AbstractFiltersPanel extends JPanel implements ActionListener, ListSelectionListener { private boolean isInitialized = false; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties index 3254b0c28c..908acda3eb 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties @@ -98,3 +98,5 @@ DiscoveryDialog.groupByLabel.text=Group By: DiscoveryDialog.orderByLabel.text=Order Within Groups By: DiscoveryDialog.orderGroupsByLabel.text=Order Groups By: ImageFilterPanel.imageFiltersSplitPane.toolTipText= +DiscoveryTopComponent.jButton1.text=New Search +DiscoveryDialog.jLabel1.text=Step 1: Choose Result Type diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED index 123c679d00..87c431d20d 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED @@ -248,6 +248,8 @@ DiscoveryDialog.groupByLabel.text=Group By: DiscoveryDialog.orderByLabel.text=Order Within Groups By: DiscoveryDialog.orderGroupsByLabel.text=Order Groups By: ImageFilterPanel.imageFiltersSplitPane.toolTipText= +DiscoveryTopComponent.jButton1.text=New Search +DiscoveryDialog.jLabel1.text=Step 1: Choose Result Type VideoThumbnailPanel.bytes.text=bytes VideoThumbnailPanel.deleted.text=All instances of file are deleted. VideoThumbnailPanel.gigaBytes.text=GB diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DataSourceFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DataSourceFilterPanel.java index c0a72c59f1..59ccc90055 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DataSourceFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DataSourceFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -17,10 +30,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.DataSource; import org.sleuthkit.datamodel.TskCoreException; -/** - * - * @author wschaefer - */ + final class DataSourceFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; @@ -94,7 +104,7 @@ final class DataSourceFilterPanel extends AbstractDiscoveryFilterPanel { // End of variables declaration//GEN-END:variables @Override - public void configurePanel(boolean selected, int[] indicesSelected) { + void configurePanel(boolean selected, int[] indicesSelected) { dataSourceCheckbox.setSelected(selected); if (dataSourceCheckbox.isEnabled() && dataSourceCheckbox.isSelected()) { dataSourceScrollPane.setEnabled(true); @@ -109,12 +119,12 @@ final class DataSourceFilterPanel extends AbstractDiscoveryFilterPanel { } @Override - public JCheckBox getCheckbox() { + JCheckBox getCheckbox() { return dataSourceCheckbox; } @Override - public JLabel getAdditionalLabel() { + JLabel getAdditionalLabel() { return null; } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java index 46be9cca8c..750d5a7277 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java @@ -44,11 +44,8 @@ import org.sleuthkit.autopsy.timeline.actions.ViewFileInTimelineAction; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException; -/** - * - * @author wschaefer - */ -public class DetailsPanel extends javax.swing.JPanel { + +final class DetailsPanel extends javax.swing.JPanel { private static final long serialVersionUID = 1L; @@ -59,7 +56,7 @@ public class DetailsPanel extends javax.swing.JPanel { /** * Creates new form DetailsPanel */ - public DetailsPanel() { + DetailsPanel() { initComponents(); dataContentPanel = DataContentPanel.createInstance(); diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form index 913e82682d..bc0f98d9c8 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form @@ -44,7 +44,9 @@ - + + + @@ -62,6 +64,7 @@ + @@ -146,6 +149,13 @@ + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java index 910f06f6d6..a70df71418 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java @@ -50,7 +50,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { this(null, true); } - public static synchronized DiscoveryDialog getDiscoveryDialogInstance() { + static synchronized DiscoveryDialog getDiscoveryDialogInstance() { if (discoveryDialog == null) { discoveryDialog = new DiscoveryDialog(); } @@ -145,6 +145,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { imagesButton = new javax.swing.JButton(); videosButton = new javax.swing.JButton(); documentsButton = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); searchButton = new javax.swing.JButton(); errorLabel = new javax.swing.JLabel(); @@ -201,12 +202,16 @@ final class DiscoveryDialog extends javax.swing.JDialog { } }); + org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.jLabel1.text")); // NOI18N + javax.swing.GroupLayout toolBarPanelLayout = new javax.swing.GroupLayout(toolBarPanel); toolBarPanel.setLayout(toolBarPanelLayout); toolBarPanelLayout.setHorizontalGroup( toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(toolBarPanelLayout.createSequentialGroup() - .addContainerGap(239, Short.MAX_VALUE) + .addContainerGap(55, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -221,7 +226,8 @@ final class DiscoveryDialog extends javax.swing.JDialog { .addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(documentsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(documentsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) .addContainerGap()) ); @@ -472,6 +478,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { private javax.swing.JComboBox groupByCombobox; private javax.swing.JComboBox groupSortingComboBox; private javax.swing.JButton imagesButton; + private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JComboBox orderByCombobox; private javax.swing.JButton searchButton; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryExtractAction.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryExtractAction.java index 171b7530ee..acaf0ccc99 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryExtractAction.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryExtractAction.java @@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.AbstractFile; /** * Extracts AbstractFiles to a location selected by the user. */ -public final class DiscoveryExtractAction extends AbstractAction { +final class DiscoveryExtractAction extends AbstractAction { private static final long serialVersionUID = 1L; private final Collection files = new HashSet<>(); @@ -40,7 +40,7 @@ public final class DiscoveryExtractAction extends AbstractAction { * * @param selectedFiles The files to extract from the current case. */ - public DiscoveryExtractAction(Collection selectedFiles) { + DiscoveryExtractAction(Collection selectedFiles) { super(NbBundle.getMessage(DiscoveryExtractAction.class, "DiscoveryExtractAction.title.extractFiles.text")); files.addAll(selectedFiles); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form index b5cffa4a96..24b8cea0f0 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form @@ -60,5 +60,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java index 1fcf108c9f..ca3021efd0 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java @@ -104,8 +104,7 @@ public final class DiscoveryTopComponent extends TopComponent { } private void cancelCurrentSearch() { - final DiscoveryDialog discDialog = DiscoveryDialog.getDiscoveryDialogInstance(); - discDialog.cancelSearch(); + DiscoveryDialog.getDiscoveryDialogInstance().cancelSearch(); } /** @@ -119,6 +118,8 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane = new javax.swing.JSplitPane(); rightSplitPane = new AnimatedSplitPane(); + jPanel1 = new javax.swing.JPanel(); + jButton1 = new javax.swing.JButton(); setMinimumSize(new java.awt.Dimension(199, 200)); setPreferredSize(new java.awt.Dimension(1100, 700)); @@ -133,8 +134,39 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane.setRightComponent(rightSplitPane); add(mainSplitPane, java.awt.BorderLayout.CENTER); + + org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.jButton1.text")); // NOI18N + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jButton1) + .addContainerGap(987, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jButton1) + .addContainerGap()) + ); + + add(jPanel1, java.awt.BorderLayout.PAGE_START); }// //GEN-END:initComponents + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + close(); + new OpenDiscoveryAction().actionPerformed(evt); + }//GEN-LAST:event_jButton1ActionPerformed + @Override public List availableModes(List modes) { /* @@ -220,6 +252,8 @@ public final class DiscoveryTopComponent extends TopComponent { } // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JPanel jPanel1; private javax.swing.JSplitPane mainSplitPane; private javax.swing.JSplitPane rightSplitPane; // End of variables declaration//GEN-END:variables diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form index 2fd3b2bfc8..b83c2f324f 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form @@ -11,6 +11,7 @@ + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java index d4834b8c0c..46f05b199d 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java @@ -1,16 +1,26 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; -/** - * - * @author wschaefer - */ + final class DocumentFilterPanel extends AbstractFiltersPanel { private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentPanel.java index b76f835659..4084d1e082 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentPanel.java @@ -33,7 +33,7 @@ import org.sleuthkit.autopsy.corecomponents.AutoWrappingJTextPane; /** * Class which displays a preview and details about a document. */ -public class DocumentPanel extends javax.swing.JPanel implements ListCellRenderer { +class DocumentPanel extends javax.swing.JPanel implements ListCellRenderer { private static final long serialVersionUID = 1L; private static final Color SELECTION_COLOR = new Color(0, 120, 215); @@ -42,7 +42,7 @@ public class DocumentPanel extends javax.swing.JPanel implements ListCellRendere /** * Creates new form DocumentPanel */ - public DocumentPanel() { + DocumentPanel() { initComponents(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentPreviewViewer.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentPreviewViewer.java index 057ee777aa..beef70f08f 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentPreviewViewer.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentPreviewViewer.java @@ -27,7 +27,7 @@ import org.sleuthkit.datamodel.AbstractFile; /** * A JPanel to display document previews. */ -public class DocumentPreviewViewer extends javax.swing.JPanel { +final class DocumentPreviewViewer extends javax.swing.JPanel { private static final long serialVersionUID = 1L; private final DefaultListModel documentListModel = new DefaultListModel<>(); @@ -35,7 +35,7 @@ public class DocumentPreviewViewer extends javax.swing.JPanel { /** * Creates new form DocumentViewer */ - public DocumentPreviewViewer() { + DocumentPreviewViewer() { initComponents(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentWrapper.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentWrapper.java index dd35604a82..02a2b0530e 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentWrapper.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentWrapper.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.textsummarizer.TextSummary; * Class to wrap all the information necessary for a document summary to be * displayed. */ -public class DocumentWrapper { +final class DocumentWrapper { private TextSummary summary; private final ResultFile resultFile; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchException.java b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchException.java index 1b2b8fdd2a..30dcb20ec1 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchException.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchException.java @@ -21,25 +21,26 @@ package org.sleuthkit.autopsy.discovery; /** * Exception type used for FileSearch */ -public class FileSearchException extends Exception { +final public class FileSearchException extends Exception { + private static final long serialVersionUID = 1L; - + /** * Create exception from a string - * - * @param message + * + * @param message */ - public FileSearchException(String message) { + FileSearchException(String message) { super(message); } - + /** * Create exception for a string and cause - * + * * @param message - * @param cause + * @param cause */ - public FileSearchException(String message, Throwable cause) { + FileSearchException(String message, Throwable cause) { super(message, cause); } } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/GroupListPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/GroupListPanel.java index 46e29ab524..a2689db979 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/GroupListPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/GroupListPanel.java @@ -19,12 +19,14 @@ package org.sleuthkit.autopsy.discovery; import com.google.common.eventbus.Subscribe; +import java.awt.Cursor; import java.util.List; import java.util.Map; import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.discovery.FileSearch.GroupKey; import org.sleuthkit.autopsy.discovery.FileSearchData.FileType; @@ -32,7 +34,7 @@ import org.sleuthkit.autopsy.discovery.FileSearchData.FileType; /** * Panel to display the list of groups which are provided by a search */ -class GroupListPanel extends javax.swing.JPanel { +final class GroupListPanel extends javax.swing.JPanel { private static final long serialVersionUID = 1L; private FileType resultType = null; @@ -48,6 +50,9 @@ class GroupListPanel extends javax.swing.JPanel { */ GroupListPanel() { initComponents(); + SwingUtilities.invokeLater(() -> { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + }); } /** @@ -77,14 +82,17 @@ class GroupListPanel extends javax.swing.JPanel { groupSort = searchCompleteEvent.getGroupSort(); fileSortMethod = searchCompleteEvent.getFileSort(); groupKeyList.setListData(groupMap.keySet().toArray(new GroupKey[groupMap.keySet().size()])); - if (groupKeyList.getModel().getSize() > 0) { - groupKeyList.setSelectedIndex(0); - } else { - JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(), - Bundle.GroupsListPanel_noResults_message_text(), - Bundle.GroupsListPanel_noResults_title_text(), - JOptionPane.INFORMATION_MESSAGE); - } + SwingUtilities.invokeLater(() -> { + if (groupKeyList.getModel().getSize() > 0) { + groupKeyList.setSelectedIndex(0); + } else { + JOptionPane.showMessageDialog(DiscoveryTopComponent.getTopComponent(), + Bundle.GroupsListPanel_noResults_message_text(), + Bundle.GroupsListPanel_noResults_title_text(), + JOptionPane.INFORMATION_MESSAGE); + } + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + }); } /** diff --git a/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java index 9b630c61cf..b39fda355a 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java @@ -1,3 +1,21 @@ +/* + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.sleuthkit.autopsy.discovery; import java.util.List; @@ -11,16 +29,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.TskCoreException; -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates and open the template - * in the editor. - */ -/** - * - * @author wschaefer - */ -public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { +final class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; private final static Logger logger = Logger.getLogger(HashSetFilterPanel.class.getName()); @@ -28,7 +37,7 @@ public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { /** * Creates new form HashSetFilterPaenl */ - public HashSetFilterPanel() { + HashSetFilterPanel() { initComponents(); setUpHashFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java index 4b3c6da72f..393ece054b 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java @@ -1,16 +1,25 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; -/** - * - * @author wschaefer - */ final class ImageFilterPanel extends AbstractFiltersPanel { private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailPanel.java index 7e44cd345c..6d861d06e9 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailPanel.java @@ -32,7 +32,7 @@ import org.openide.util.NbBundle; /** * Class which displays a thumbnail and information for an image file. */ -public class ImageThumbnailPanel extends javax.swing.JPanel implements ListCellRenderer { +final class ImageThumbnailPanel extends javax.swing.JPanel implements ListCellRenderer { private static final long serialVersionUID = 1L; private static final Color SELECTION_COLOR = new Color(0, 120, 215); @@ -41,7 +41,7 @@ public class ImageThumbnailPanel extends javax.swing.JPanel implements ListCellR /** * Creates new form ImageThumbnailPanel */ - public ImageThumbnailPanel() { + ImageThumbnailPanel() { initComponents(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailViewer.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailViewer.java index 5039464ba9..0bf7eeac31 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailViewer.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailViewer.java @@ -28,7 +28,7 @@ import org.sleuthkit.datamodel.AbstractFile; * A JPanel to display image thumbnails. * */ -public class ImageThumbnailViewer extends javax.swing.JPanel { +final class ImageThumbnailViewer extends javax.swing.JPanel { private static final long serialVersionUID = 1L; @@ -37,7 +37,7 @@ public class ImageThumbnailViewer extends javax.swing.JPanel { /** * Creates new form ImageThumbnailViewer */ - public ImageThumbnailViewer() { + ImageThumbnailViewer() { initComponents(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailWrapper.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailWrapper.java index 09eeb913ca..b4e7bb0b01 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailWrapper.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageThumbnailWrapper.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.coreutils.ImageUtils; * Class to wrap all the information necessary for an image thumbnail to be * displayed. */ -public class ImageThumbnailWrapper { +final class ImageThumbnailWrapper { private Image thumbnail; private final ResultFile resultFile; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java index 1339289441..dc8a7fe670 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -16,11 +29,8 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.TskCoreException; -/** - * - * @author wschaefer - */ -public class InterestingItemsFilterPanel extends AbstractDiscoveryFilterPanel { + +final class InterestingItemsFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; private final static Logger logger = Logger.getLogger(InterestingItemsFilterPanel.class.getName()); @@ -28,7 +38,7 @@ public class InterestingItemsFilterPanel extends AbstractDiscoveryFilterPanel { /** * Creates new form InterestingItemsFilterPanel */ - public InterestingItemsFilterPanel() { + InterestingItemsFilterPanel() { initComponents(); setUpInterestingItemsFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ObjectDetectedFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ObjectDetectedFilterPanel.java index 6886226007..e89b1c5416 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ObjectDetectedFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ObjectDetectedFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -16,11 +29,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.TskCoreException; -/** - * - * @author wschaefer - */ -public class ObjectDetectedFilterPanel extends AbstractDiscoveryFilterPanel { +final class ObjectDetectedFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; private final static Logger logger = Logger.getLogger(ObjectDetectedFilterPanel.class.getName()); @@ -28,7 +37,7 @@ public class ObjectDetectedFilterPanel extends AbstractDiscoveryFilterPanel { /** * Creates new form ObjectDetectedFilter */ - public ObjectDetectedFilterPanel() { + ObjectDetectedFilterPanel() { initComponents(); setUpObjectFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java index f8be6a58a6..766a7e9cd2 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -13,11 +26,7 @@ import javax.swing.JLabel; import javax.swing.JList; import org.sleuthkit.autopsy.discovery.FileSearchFiltering.ParentSearchTerm; -/** - * - * @author wschaefer - */ -public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel { +final class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; private DefaultListModel parentListModel; @@ -26,7 +35,7 @@ public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel { /** * Creates new form ParentFolderFilterPanel */ - public ParentFolderFilterPanel() { + ParentFolderFilterPanel() { initComponents(); setUpParentPathFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java index ea4357f542..39c122ab04 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -12,18 +25,14 @@ import javax.swing.JList; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; import org.sleuthkit.autopsy.discovery.FileSearchData.Frequency; -/** - * - * @author wschaefer - */ -public class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel { +final class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; /** * Creates new form PastOccurrencesFilterPanel */ - public PastOccurrencesFilterPanel() { + PastOccurrencesFilterPanel() { initComponents(); setUpFrequencyFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java index 94883b9ea8..908461c478 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.discovery; import com.google.common.eventbus.Subscribe; +import java.awt.Cursor; import java.awt.Image; import java.awt.event.ItemEvent; import java.util.ArrayList; @@ -43,7 +44,7 @@ import org.sleuthkit.autopsy.textsummarizer.TextSummary; * Panel for displaying of Discovery results and handling the paging of those * results. */ -public class ResultsPanel extends javax.swing.JPanel { +final class ResultsPanel extends javax.swing.JPanel { private static final long serialVersionUID = 1L; private final static Logger logger = Logger.getLogger(ResultsPanel.class.getName()); @@ -67,7 +68,7 @@ public class ResultsPanel extends javax.swing.JPanel { */ @Messages({"ResultsPanel.viewFileInDir.name=View File in Directory", "ResultsPanel.openInExternalViewer.name=Open in External Viewer"}) - public ResultsPanel() { + ResultsPanel() { initComponents(); imageThumbnailViewer = new ImageThumbnailViewer(); videoThumbnailViewer = new VideoThumbnailViewer(); @@ -108,7 +109,9 @@ public class ResultsPanel extends javax.swing.JPanel { } } }); - + SwingUtilities.invokeLater(() -> { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + }); } /** @@ -254,6 +257,7 @@ public class ResultsPanel extends javax.swing.JPanel { resultType = groupSelectedEvent.getResultType(); groupSize = groupSelectedEvent.getGroupSize(); setPage(0); + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java index c2e7d56377..8e9275478e 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -13,10 +26,6 @@ import javax.swing.JLabel; import javax.swing.JList; import org.sleuthkit.autopsy.discovery.FileSearchData.FileSize; -/** - * - * @author wschaefer - */ final class SizeFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; @@ -92,7 +101,7 @@ final class SizeFilterPanel extends AbstractDiscoveryFilterPanel { // End of variables declaration//GEN-END:variables @Override - public void configurePanel(boolean selected, int[] indicesSelected) { + void configurePanel(boolean selected, int[] indicesSelected) { sizeCheckbox.setSelected(selected); if (sizeCheckbox.isEnabled() && sizeCheckbox.isSelected()) { sizeScrollPane.setEnabled(true); @@ -107,12 +116,12 @@ final class SizeFilterPanel extends AbstractDiscoveryFilterPanel { } @Override - public JCheckBox getCheckbox() { + JCheckBox getCheckbox() { return sizeCheckbox; } @Override - public JLabel getAdditionalLabel() { + JLabel getAdditionalLabel() { return null; } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java index d744f5c3d8..f01acc0d93 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -13,13 +26,13 @@ import javax.swing.Timer; * * Class to animate Layouts and Fades for a given component. * - * * @author Greg Cope + * https://www.algosome.com/articles/java-swing-panel-animation.html * * * */ -public final class SwingAnimator { +final class SwingAnimator { //callback object private final SwingAnimatorCallback callback; @@ -39,7 +52,7 @@ public final class SwingAnimator { * @param callback The object to callback to * */ - public SwingAnimator(SwingAnimatorCallback callback) { + SwingAnimator(SwingAnimatorCallback callback) { this(callback, false); @@ -55,7 +68,7 @@ public final class SwingAnimator { * otherwise * */ - public SwingAnimator(SwingAnimatorCallback callback, boolean start) { + SwingAnimator(SwingAnimatorCallback callback, boolean start) { this(callback, INITIAL_DURATION, start); @@ -73,18 +86,12 @@ public final class SwingAnimator { * otherwise * */ - public SwingAnimator(SwingAnimatorCallback callback, int frameTiming, boolean start) { - + SwingAnimator(SwingAnimatorCallback callback, int frameTiming, boolean start) { this.callback = callback; - duration = frameTiming; - if (start) { - start(); - } - } /** @@ -96,10 +103,8 @@ public final class SwingAnimator { * @param frameTiming Timing between each call to callback. * */ - public SwingAnimator(SwingAnimatorCallback callback, int frameTiming) { - + SwingAnimator(SwingAnimatorCallback callback, int frameTiming) { this(callback, frameTiming, false); - } /** @@ -109,16 +114,11 @@ public final class SwingAnimator { * @return * */ - public boolean isRunning() { - + boolean isRunning() { if (timer == null) { - return false; - } - return timer.isRunning(); - } /** @@ -126,14 +126,10 @@ public final class SwingAnimator { * Stops the timer * */ - public void stop() { - + void stop() { if (timer != null) { - timer.stop(); - } - } /** @@ -143,18 +139,13 @@ public final class SwingAnimator { * * stop the timer before beginning a new one. * */ - public void start() { + void start() { if (timer != null && timer.isRunning()) { - stop(); - } - timer = new Timer(duration, new CallbackListener()); - timer.start(); - } /** @@ -169,25 +160,15 @@ public final class SwingAnimator { private class CallbackListener implements ActionListener { @Override - public void actionPerformed(ActionEvent e) { - if (callback.hasTerminated()) { - if (timer == null) { - throw new IllegalStateException("Callback listener should not be fired outside of SwingAnimator timer control"); - } - timer.stop(); - } - callback.callback(SwingAnimator.this); - } - } - + } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimatorCallback.java b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimatorCallback.java index 31a8fdba0d..f36f51a885 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimatorCallback.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimatorCallback.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -9,11 +22,10 @@ package org.sleuthkit.autopsy.discovery; * * Callback interface to be notified by a SwingAnimator of a new time frame. * * @author Greg Cope - * - * + * https://www.algosome.com/articles/java-swing-panel-animation.html * */ -public interface SwingAnimatorCallback { +interface SwingAnimatorCallback { /** * @@ -22,7 +34,7 @@ public interface SwingAnimatorCallback { * @param caller * */ - public void callback(Object caller); + void callback(Object caller); /** * @@ -30,6 +42,6 @@ public interface SwingAnimatorCallback { * @return * */ - public boolean hasTerminated(); + boolean hasTerminated(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java index fdd74a91b9..e222fdfc41 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; @@ -9,18 +22,14 @@ import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JList; -/** - * - * @author wschaefer - */ -public class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel { +final class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel { private static final long serialVersionUID = 1L; /** * Creates new form UserCreatedFilterPanel */ - public UserCreatedFilterPanel() { + UserCreatedFilterPanel() { initComponents(); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java index 1c839e445a..1d2c2a5d86 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java @@ -1,16 +1,25 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.discovery; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; -/** - * - * @author wschaefer - */ final class VideoFilterPanel extends AbstractFiltersPanel { private static final long serialVersionUID = 1L; @@ -31,11 +40,11 @@ final class VideoFilterPanel extends AbstractFiltersPanel { pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7}; } addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0); - addFilter(new UserCreatedFilterPanel(), false, null, 0); - addFilter(new HashSetFilterPanel(), false, null, 0); - addFilter(new InterestingItemsFilterPanel(), false, null, 0); - addFilter(new ObjectDetectedFilterPanel(), false, null, 0); - addFilter(new ParentFolderFilterPanel(), false, null, 0); + addFilter(new UserCreatedFilterPanel(), false, null, 1); + addFilter(new HashSetFilterPanel(), false, null, 1); + addFilter(new InterestingItemsFilterPanel(), false, null, 1); + addFilter(new ObjectDetectedFilterPanel(), false, null, 1); + addFilter(new ParentFolderFilterPanel(), false, null, 1); addPanelsToScrollPane(videoFiltersSplitPane); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoThumbnailViewer.java b/Core/src/org/sleuthkit/autopsy/discovery/VideoThumbnailViewer.java index 84487ad277..ac0dabbdd8 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoThumbnailViewer.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoThumbnailViewer.java @@ -28,7 +28,7 @@ import org.sleuthkit.datamodel.AbstractFile; * A JPanel to display video thumbnails. * */ -public class VideoThumbnailViewer extends javax.swing.JPanel { +final class VideoThumbnailViewer extends javax.swing.JPanel { private static final long serialVersionUID = 1L; private final DefaultListModel thumbnailListModel = new DefaultListModel<>(); @@ -36,7 +36,7 @@ public class VideoThumbnailViewer extends javax.swing.JPanel { /** * Creates new form VideoThumbnailViewer */ - public VideoThumbnailViewer() { + VideoThumbnailViewer() { initComponents(); }