6305 clean up copyright and access

This commit is contained in:
William Schaefer 2020-06-04 08:03:15 -04:00
parent 93b20bd6f0
commit 241ffd7899
34 changed files with 437 additions and 216 deletions

View File

@ -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 <at> sleuthkit <dot> 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;

View File

@ -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 <at> sleuthkit <dot> 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;

View File

@ -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

View File

@ -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

View File

@ -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 <at> sleuthkit <dot> 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;
}

View File

@ -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();

View File

@ -44,7 +44,9 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace pref="239" max="32767" attributes="0"/>
<EmptySpace pref="55" max="32767" attributes="0"/>
<Component id="jLabel1" min="-2" pref="172" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="imagesButton" min="-2" pref="110" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="videosButton" min="-2" pref="110" max="-2" attributes="0"/>
@ -62,6 +64,7 @@
<Component id="videosButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="imagesButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="documentsButton" alignment="3" min="-2" pref="43" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@ -146,6 +149,13 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="documentsButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel1">

View File

@ -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<GroupingAttributeType> groupByCombobox;
private javax.swing.JComboBox<GroupSortingAlgorithm> groupSortingComboBox;
private javax.swing.JButton imagesButton;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JComboBox<SortingMethod> orderByCombobox;
private javax.swing.JButton searchButton;

View File

@ -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<AbstractFile> 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<AbstractFile> selectedFiles) {
DiscoveryExtractAction(Collection<AbstractFile> selectedFiles) {
super(NbBundle.getMessage(DiscoveryExtractAction.class, "DiscoveryExtractAction.title.extractFiles.text"));
files.addAll(selectedFiles);
}

View File

@ -60,5 +60,45 @@
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="First"/>
</Constraint>
</Constraints>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="987" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="jButton1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryTopComponent.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -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);
}// </editor-fold>//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<Mode> availableModes(List<Mode> 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

View File

@ -11,6 +11,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>

View File

@ -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 <at> sleuthkit <dot> 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;

View File

@ -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<DocumentWrapper> {
class DocumentPanel extends javax.swing.JPanel implements ListCellRenderer<DocumentWrapper> {
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();
}

View File

@ -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<DocumentWrapper> documentListModel = new DefaultListModel<>();
@ -35,7 +35,7 @@ public class DocumentPreviewViewer extends javax.swing.JPanel {
/**
* Creates new form DocumentViewer
*/
public DocumentPreviewViewer() {
DocumentPreviewViewer() {
initComponents();
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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));
});
}
/**

View File

@ -1,3 +1,21 @@
/*
* Autopsy
*
* Copyright 2020 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> 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();
}

View File

@ -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 <at> sleuthkit <dot> 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;

View File

@ -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<ImageThumbnailWrapper> {
final class ImageThumbnailPanel extends javax.swing.JPanel implements ListCellRenderer<ImageThumbnailWrapper> {
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();
}

View File

@ -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();
}

View File

@ -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;

View File

@ -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 <at> sleuthkit <dot> 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();
}

View File

@ -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 <at> sleuthkit <dot> 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();
}

View File

@ -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 <at> sleuthkit <dot> 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<FileSearchFiltering.ParentSearchTerm> parentListModel;
@ -26,7 +35,7 @@ public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel {
/**
* Creates new form ParentFolderFilterPanel
*/
public ParentFolderFilterPanel() {
ParentFolderFilterPanel() {
initComponents();
setUpParentPathFilter();
}

View File

@ -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 <at> sleuthkit <dot> 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();
}

View File

@ -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));
});
}

View File

@ -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 <at> sleuthkit <dot> 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;
}

View File

@ -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 <at> sleuthkit <dot> 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);
}
}
}

View File

@ -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 <at> sleuthkit <dot> 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();
}

View File

@ -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 <at> sleuthkit <dot> 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();
}

View File

@ -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 <at> sleuthkit <dot> 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);
}

View File

@ -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<VideoThumbnailsWrapper> thumbnailListModel = new DefaultListModel<>();
@ -36,7 +36,7 @@ public class VideoThumbnailViewer extends javax.swing.JPanel {
/**
* Creates new form VideoThumbnailViewer
*/
public VideoThumbnailViewer() {
VideoThumbnailViewer() {
initComponents();
}