mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
6305 first batch of UI changes for Discovery
This commit is contained in:
parent
cd17998a8c
commit
f930fa972f
@ -16,7 +16,6 @@ FileSearchDialog.orderSizeRadioButton.text=Group Size
|
|||||||
FileSearchDialog.jLabel5.text=Order files by:
|
FileSearchDialog.jLabel5.text=Order files by:
|
||||||
FileSearchDialog.parentCheckBox.text=Parent
|
FileSearchDialog.parentCheckBox.text=Parent
|
||||||
FileSearchPanel.sortingPanel.border.title=Grouping
|
FileSearchPanel.sortingPanel.border.title=Grouping
|
||||||
FileSearchPanel.searchButton.text=Show
|
|
||||||
FileSearchPanel.addButton.text=Add
|
FileSearchPanel.addButton.text=Add
|
||||||
FileSearchPanel.substringRadioButton.text=Substring
|
FileSearchPanel.substringRadioButton.text=Substring
|
||||||
FileSearchPanel.fullRadioButton.text=Full
|
FileSearchPanel.fullRadioButton.text=Full
|
||||||
@ -39,7 +38,6 @@ FileSearchDialog.objCheckBox.text=Objects
|
|||||||
FileSearchDialog.exifCheckBox.text=Must contain EXIF data
|
FileSearchDialog.exifCheckBox.text=Must contain EXIF data
|
||||||
FileSearchDialog.notableCheckBox.text=Must have been tagged as notable
|
FileSearchDialog.notableCheckBox.text=Must have been tagged as notable
|
||||||
FileSearchDialog.scoreCheckBox.text=Has score
|
FileSearchDialog.scoreCheckBox.text=Has score
|
||||||
FileSearchPanel.cancelButton.text=Cancel
|
|
||||||
FileSearchPanel.hashSetCheckbox.text=Hash Set:
|
FileSearchPanel.hashSetCheckbox.text=Hash Set:
|
||||||
FileSearchPanel.tagsCheckbox.text=Tag:
|
FileSearchPanel.tagsCheckbox.text=Tag:
|
||||||
FileSearchPanel.interestingItemsCheckbox.text=Interesting Item:
|
FileSearchPanel.interestingItemsCheckbox.text=Interesting Item:
|
||||||
@ -57,13 +55,14 @@ FileSearchPanel.excludeRadioButton.text=Exclude
|
|||||||
FileSearchPanel.knownFilesCheckbox.toolTipText=
|
FileSearchPanel.knownFilesCheckbox.toolTipText=
|
||||||
FileSearchPanel.knownFilesCheckbox.text=Hide known files
|
FileSearchPanel.knownFilesCheckbox.text=Hide known files
|
||||||
GroupListPanel.groupKeyList.border.title=Groups
|
GroupListPanel.groupKeyList.border.title=Groups
|
||||||
DiscoveryTopComponent.imagesButton.text=Images
|
|
||||||
DiscoveryTopComponent.videosButton.text=Videos
|
|
||||||
ResultsPanel.resultsSplitPane.toolTipText=
|
ResultsPanel.resultsSplitPane.toolTipText=
|
||||||
FileSearchPanel.stepThreeLabel.text=Step 3: Choose display settings
|
FileSearchPanel.stepThreeLabel.text=Step 3: Choose display settings
|
||||||
DiscoveryTopComponent.stepOneLabel.text=Step 1: Pick File Type
|
|
||||||
DiscoveryTopComponent.documentsButton.text=Documents
|
|
||||||
DocumentPanel.fileSizeLabel.toolTipText=
|
DocumentPanel.fileSizeLabel.toolTipText=
|
||||||
DocumentPanel.isDeletedLabel.toolTipText=
|
DocumentPanel.isDeletedLabel.toolTipText=
|
||||||
ImageThumbnailPanel.isDeletedLabel.toolTipText=
|
ImageThumbnailPanel.isDeletedLabel.toolTipText=
|
||||||
FileSearchPanel.userCreatedCheckbox.text=Possibly User Created
|
FileSearchPanel.userCreatedCheckbox.text=Possibly User Created
|
||||||
|
DiscoveryDialog.documentsButton.text=Documents
|
||||||
|
DiscoveryDialog.videosButton.text=Videos
|
||||||
|
DiscoveryDialog.imagesButton.text=Images
|
||||||
|
DiscoveryDialog.searchButton.text=Show
|
||||||
|
DiscoveryDialog.cancelButton.text=Cancel
|
||||||
|
214
Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form
Normal file
214
Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||||
|
<Properties>
|
||||||
|
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||||
|
</Properties>
|
||||||
|
<SyntheticProperties>
|
||||||
|
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||||
|
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||||
|
</SyntheticProperties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||||
|
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||||
|
<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,2,-60,0,0,2,40"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JPanel" name="toolBarPanel">
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
|
</AuxValues>
|
||||||
|
<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 pref="99" max="32767" 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"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="documentsButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="88" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<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"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JButton" name="imagesButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/pictures-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.imagesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/pictures-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="focusable" type="boolean" value="false"/>
|
||||||
|
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="imagesButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="videosButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.videosButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="disabledSelectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="focusable" type="boolean" value="false"/>
|
||||||
|
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[90, 43]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="videosButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="documentsButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.documentsButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="disabledSelectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="focusable" type="boolean" value="false"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="documentsButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
</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="Last"/>
|
||||||
|
</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="errorLabel" max="32767" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="errorLabel" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="searchButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JButton" name="searchButton">
|
||||||
|
<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.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="cancelButton">
|
||||||
|
<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.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="enabled" type="boolean" value="false"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Form>
|
335
Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java
Normal file
335
Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
/*
|
||||||
|
* 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 static java.awt.BorderLayout.CENTER;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
|
||||||
|
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
|
||||||
|
final class DiscoveryDialog extends javax.swing.JDialog {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private final static Logger logger = Logger.getLogger(DiscoveryDialog.class.getName());
|
||||||
|
private final FileSearchPanel filterPanel = new FileSearchPanel();
|
||||||
|
private static final Color SELECTED_COLOR = new Color(216, 230, 242);
|
||||||
|
private static final Color UNSELECTED_COLOR = new Color(240, 240, 240);
|
||||||
|
private SearchWorker searchWorker = null;
|
||||||
|
|
||||||
|
DiscoveryDialog() {
|
||||||
|
this(null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates new form DiscoveryDialog
|
||||||
|
*/
|
||||||
|
private DiscoveryDialog(java.awt.Frame parent, boolean modal) {
|
||||||
|
super(parent, modal);
|
||||||
|
initComponents();
|
||||||
|
filterPanel.addPropertyChangeListener(new PropertyChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
|
if (evt.getNewValue() instanceof String) {
|
||||||
|
String errorMessage = (String) evt.getNewValue();
|
||||||
|
if (StringUtils.isBlank(errorMessage)) {
|
||||||
|
setValid();
|
||||||
|
} else {
|
||||||
|
setInvalid(errorMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateSearchSettings();
|
||||||
|
add(filterPanel, CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the search settings to a default state.
|
||||||
|
*/
|
||||||
|
private void updateSearchSettings() {
|
||||||
|
filterPanel.resetPanel();
|
||||||
|
imagesButton.setSelected(true);
|
||||||
|
imagesButton.setEnabled(false);
|
||||||
|
imagesButton.setBackground(SELECTED_COLOR);
|
||||||
|
imagesButton.setForeground(Color.BLACK);
|
||||||
|
videosButton.setSelected(false);
|
||||||
|
videosButton.setEnabled(true);
|
||||||
|
videosButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
documentsButton.setSelected(false);
|
||||||
|
documentsButton.setEnabled(true);
|
||||||
|
documentsButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
filterPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called from within the constructor to initialize the form.
|
||||||
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
|
* regenerated by the Form Editor.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
|
private void initComponents() {
|
||||||
|
|
||||||
|
javax.swing.JPanel toolBarPanel = new javax.swing.JPanel();
|
||||||
|
imagesButton = new javax.swing.JButton();
|
||||||
|
videosButton = new javax.swing.JButton();
|
||||||
|
documentsButton = new javax.swing.JButton();
|
||||||
|
jPanel1 = new javax.swing.JPanel();
|
||||||
|
searchButton = new javax.swing.JButton();
|
||||||
|
errorLabel = new javax.swing.JLabel();
|
||||||
|
cancelButton = new javax.swing.JButton();
|
||||||
|
|
||||||
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||||
|
|
||||||
|
imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.imagesButton.text")); // NOI18N
|
||||||
|
imagesButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
||||||
|
imagesButton.setFocusable(false);
|
||||||
|
imagesButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
|
imagesButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
||||||
|
imagesButton.setMinimumSize(new java.awt.Dimension(90, 43));
|
||||||
|
imagesButton.setPreferredSize(new java.awt.Dimension(90, 43));
|
||||||
|
imagesButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
imagesButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
videosButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(videosButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.videosButton.text")); // NOI18N
|
||||||
|
videosButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||||
|
videosButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||||
|
videosButton.setFocusable(false);
|
||||||
|
videosButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
|
videosButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
||||||
|
videosButton.setMinimumSize(new java.awt.Dimension(90, 43));
|
||||||
|
videosButton.setPreferredSize(new java.awt.Dimension(90, 43));
|
||||||
|
videosButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
videosButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
documentsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(documentsButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.documentsButton.text")); // NOI18N
|
||||||
|
documentsButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
||||||
|
documentsButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
||||||
|
documentsButton.setFocusable(false);
|
||||||
|
documentsButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
documentsButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
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(99, Short.MAX_VALUE)
|
||||||
|
.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)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(documentsButton)
|
||||||
|
.addContainerGap(88, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
toolBarPanelLayout.setVerticalGroup(
|
||||||
|
toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(toolBarPanelLayout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.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))
|
||||||
|
.addContainerGap())
|
||||||
|
);
|
||||||
|
|
||||||
|
getContentPane().add(toolBarPanel, java.awt.BorderLayout.PAGE_START);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.searchButton.text")); // NOI18N
|
||||||
|
searchButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
searchButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.cancelButton.text")); // NOI18N
|
||||||
|
cancelButton.setEnabled(false);
|
||||||
|
cancelButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
cancelButtonActionPerformed(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(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(cancelButton)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(searchButton)
|
||||||
|
.addContainerGap())
|
||||||
|
);
|
||||||
|
jPanel1Layout.setVerticalGroup(
|
||||||
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(cancelButton)
|
||||||
|
.addComponent(searchButton)))
|
||||||
|
.addContainerGap())
|
||||||
|
);
|
||||||
|
|
||||||
|
getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END);
|
||||||
|
|
||||||
|
pack();
|
||||||
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed
|
||||||
|
// resetTopComponent();
|
||||||
|
imagesButton.setSelected(true);
|
||||||
|
imagesButton.setEnabled(false);
|
||||||
|
imagesButton.setBackground(SELECTED_COLOR);
|
||||||
|
imagesButton.setForeground(Color.BLACK);
|
||||||
|
videosButton.setSelected(false);
|
||||||
|
videosButton.setEnabled(true);
|
||||||
|
videosButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
documentsButton.setSelected(false);
|
||||||
|
documentsButton.setEnabled(true);
|
||||||
|
documentsButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
filterPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
||||||
|
}//GEN-LAST:event_imagesButtonActionPerformed
|
||||||
|
|
||||||
|
private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed
|
||||||
|
imagesButton.setSelected(false);
|
||||||
|
imagesButton.setEnabled(true);
|
||||||
|
imagesButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
videosButton.setSelected(true);
|
||||||
|
videosButton.setEnabled(false);
|
||||||
|
videosButton.setBackground(SELECTED_COLOR);
|
||||||
|
videosButton.setForeground(Color.BLACK);
|
||||||
|
documentsButton.setSelected(false);
|
||||||
|
documentsButton.setEnabled(true);
|
||||||
|
documentsButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
filterPanel.setSelectedType(FileSearchData.FileType.VIDEO);
|
||||||
|
}//GEN-LAST:event_videosButtonActionPerformed
|
||||||
|
|
||||||
|
private void documentsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsButtonActionPerformed
|
||||||
|
documentsButton.setSelected(true);
|
||||||
|
documentsButton.setEnabled(false);
|
||||||
|
documentsButton.setBackground(SELECTED_COLOR);
|
||||||
|
documentsButton.setForeground(Color.BLACK);
|
||||||
|
videosButton.setSelected(false);
|
||||||
|
videosButton.setEnabled(true);
|
||||||
|
videosButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
imagesButton.setSelected(false);
|
||||||
|
imagesButton.setEnabled(true);
|
||||||
|
imagesButton.setBackground(UNSELECTED_COLOR);
|
||||||
|
filterPanel.setSelectedType(FileSearchData.FileType.DOCUMENTS);
|
||||||
|
}//GEN-LAST:event_documentsButtonActionPerformed
|
||||||
|
|
||||||
|
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
||||||
|
// Get the selected filters
|
||||||
|
final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent();
|
||||||
|
if (tc == null) {
|
||||||
|
setInvalid("No Top Component Found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tc.isOpened() == false) {
|
||||||
|
tc.open();
|
||||||
|
// tc.updateSearchSettings();
|
||||||
|
// displayErrorMessage(tc);
|
||||||
|
}
|
||||||
|
tc.resetTopComponent();
|
||||||
|
List<FileSearchFiltering.FileFilter> filters = filterPanel.getFilters();
|
||||||
|
// enableSearch(false);
|
||||||
|
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.SearchStartedEvent(filterPanel.getSelectedType()));
|
||||||
|
|
||||||
|
// Get the grouping attribute and group sorting method
|
||||||
|
FileSearch.AttributeType groupingAttr = filterPanel.getGroupingAttribute();
|
||||||
|
FileGroup.GroupSortingAlgorithm groupSortAlgorithm = filterPanel.getGroupSortingMethod();
|
||||||
|
|
||||||
|
// Get the file sorting method
|
||||||
|
FileSorter.SortingMethod fileSort = filterPanel.getFileSortingMethod();
|
||||||
|
CentralRepository centralRepoDb = null;
|
||||||
|
if (CentralRepository.isEnabled()) {
|
||||||
|
try {
|
||||||
|
centralRepoDb = CentralRepository.getInstance();
|
||||||
|
} catch (CentralRepoException ex) {
|
||||||
|
centralRepoDb = null;
|
||||||
|
logger.log(Level.SEVERE, "Error loading central repository database, no central repository options will be available for File Discovery", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
searchWorker = new SearchWorker(centralRepoDb, filters, groupingAttr, groupSortAlgorithm, fileSort);
|
||||||
|
searchWorker.execute();
|
||||||
|
dispose();
|
||||||
|
tc.toFront();
|
||||||
|
tc.requestActive();
|
||||||
|
}//GEN-LAST:event_searchButtonActionPerformed
|
||||||
|
|
||||||
|
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||||
|
// cancelSearch();
|
||||||
|
}//GEN-LAST:event_cancelButtonActionPerformed
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The settings are valid so enable the Search button
|
||||||
|
*/
|
||||||
|
private void setValid() {
|
||||||
|
errorLabel.setText("");
|
||||||
|
searchButton.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The settings are not valid so disable the search button and display the
|
||||||
|
* given error message.
|
||||||
|
*
|
||||||
|
* @param error
|
||||||
|
*/
|
||||||
|
private void setInvalid(String error) {
|
||||||
|
errorLabel.setText(error);
|
||||||
|
searchButton.setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JButton cancelButton;
|
||||||
|
private javax.swing.JButton documentsButton;
|
||||||
|
private javax.swing.JLabel errorLabel;
|
||||||
|
private javax.swing.JButton imagesButton;
|
||||||
|
private javax.swing.JPanel jPanel1;
|
||||||
|
private javax.swing.JButton searchButton;
|
||||||
|
private javax.swing.JButton videosButton;
|
||||||
|
// End of variables declaration//GEN-END:variables
|
||||||
|
}
|
@ -28,10 +28,6 @@
|
|||||||
<Dimension value="[1400, 828]"/>
|
<Dimension value="[1400, 828]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
</AuxValues>
|
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||||
<BorderConstraints direction="Center"/>
|
<BorderConstraints direction="Center"/>
|
||||||
@ -40,22 +36,6 @@
|
|||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Container class="javax.swing.JSplitPane" name="leftSplitPane">
|
|
||||||
<Properties>
|
|
||||||
<Property name="dividerLocation" type="int" value="325"/>
|
|
||||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[400, 828]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
|
||||||
<JSplitPaneConstraints position="left"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JSplitPane" name="rightSplitPane">
|
<Container class="javax.swing.JSplitPane" name="rightSplitPane">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="dividerLocation" type="int" value="475"/>
|
<Property name="dividerLocation" type="int" value="475"/>
|
||||||
@ -75,168 +55,5 @@
|
|||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="toolBarPanel">
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
</AuxValues>
|
|
||||||
<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 pref="414" max="32767" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="imagesButton" linkSize="3" min="-2" pref="110" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="videosButton" linkSize="3" min="-2" pref="110" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="documentsButton" linkSize="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<Component id="filler1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Component id="stepOneLabel" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" pref="119" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace pref="413" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
|
||||||
<Component id="stepOneLabel" max="32767" attributes="0"/>
|
|
||||||
<Component id="filler1" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="videosButton" linkSize="5" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="imagesButton" linkSize="5" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="documentsButton" linkSize="5" alignment="3" min="-2" pref="43" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace min="5" pref="5" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="imagesButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/pictures-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryTopComponent.imagesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/pictures-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="focusable" type="boolean" value="false"/>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="imagesButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="stepOneLabel">
|
|
||||||
<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.stepOneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
</AuxValues>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="videosButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryTopComponent.videosButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="disabledSelectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="focusable" type="boolean" value="false"/>
|
|
||||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[90, 43]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="videosButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.Box$Filler" name="filler1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[119, 32767]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[119, 0]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[119, 0]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
|
|
||||||
</AuxValues>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="documentsButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryTopComponent.documentsButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="disabledSelectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/documents-icon.png"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="focusable" type="boolean" value="false"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="documentsButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.discovery;
|
package org.sleuthkit.autopsy.discovery;
|
||||||
|
|
||||||
import com.google.common.eventbus.Subscribe;
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
@ -47,8 +45,6 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private static final String PREFERRED_ID = "DiscoveryTopComponent"; // NON-NLS
|
private static final String PREFERRED_ID = "DiscoveryTopComponent"; // NON-NLS
|
||||||
private static final Color SELECTED_COLOR = new Color(216, 230, 242);
|
|
||||||
private static final Color UNSELECTED_COLOR = new Color(240, 240, 240);
|
|
||||||
private final FileSearchPanel fileSearchPanel;
|
private final FileSearchPanel fileSearchPanel;
|
||||||
private final GroupListPanel groupListPanel;
|
private final GroupListPanel groupListPanel;
|
||||||
private final DataContentPanel dataContentPanel;
|
private final DataContentPanel dataContentPanel;
|
||||||
@ -65,8 +61,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
dataContentPanel = DataContentPanel.createInstance();
|
dataContentPanel = DataContentPanel.createInstance();
|
||||||
resultsPanel = new ResultsPanel();
|
resultsPanel = new ResultsPanel();
|
||||||
groupListPanel = new GroupListPanel();
|
groupListPanel = new GroupListPanel();
|
||||||
leftSplitPane.setLeftComponent(fileSearchPanel);
|
mainSplitPane.setLeftComponent(groupListPanel);
|
||||||
leftSplitPane.setRightComponent(groupListPanel);
|
|
||||||
rightSplitPane.setTopComponent(resultsPanel);
|
rightSplitPane.setTopComponent(resultsPanel);
|
||||||
rightSplitPane.setBottomComponent(dataContentPanel);
|
rightSplitPane.setBottomComponent(dataContentPanel);
|
||||||
//add list selection listener so the content viewer will be updated with the selected file
|
//add list selection listener so the content viewer will be updated with the selected file
|
||||||
@ -106,25 +101,6 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
groupListPanel.resetGroupList();
|
groupListPanel.resetGroupList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the search settings to a default state.
|
|
||||||
*/
|
|
||||||
void updateSearchSettings() {
|
|
||||||
resetTopComponent();
|
|
||||||
fileSearchPanel.resetPanel();
|
|
||||||
imagesButton.setSelected(true);
|
|
||||||
imagesButton.setEnabled(false);
|
|
||||||
imagesButton.setBackground(SELECTED_COLOR);
|
|
||||||
imagesButton.setForeground(Color.BLACK);
|
|
||||||
videosButton.setSelected(false);
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
videosButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
documentsButton.setSelected(false);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
documentsButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentOpened() {
|
public void componentOpened() {
|
||||||
super.componentOpened();
|
super.componentOpened();
|
||||||
@ -154,15 +130,8 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
javax.swing.JSplitPane mainSplitPane = new javax.swing.JSplitPane();
|
mainSplitPane = new javax.swing.JSplitPane();
|
||||||
leftSplitPane = new javax.swing.JSplitPane();
|
|
||||||
rightSplitPane = new javax.swing.JSplitPane();
|
rightSplitPane = new javax.swing.JSplitPane();
|
||||||
javax.swing.JPanel toolBarPanel = new javax.swing.JPanel();
|
|
||||||
imagesButton = new javax.swing.JButton();
|
|
||||||
javax.swing.JLabel stepOneLabel = new javax.swing.JLabel();
|
|
||||||
videosButton = new javax.swing.JButton();
|
|
||||||
javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(119, 0), new java.awt.Dimension(119, 0), new java.awt.Dimension(119, 32767));
|
|
||||||
documentsButton = new javax.swing.JButton();
|
|
||||||
|
|
||||||
setPreferredSize(new java.awt.Dimension(1400, 900));
|
setPreferredSize(new java.awt.Dimension(1400, 900));
|
||||||
setLayout(new java.awt.BorderLayout());
|
setLayout(new java.awt.BorderLayout());
|
||||||
@ -170,11 +139,6 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
mainSplitPane.setDividerLocation(450);
|
mainSplitPane.setDividerLocation(450);
|
||||||
mainSplitPane.setPreferredSize(new java.awt.Dimension(1400, 828));
|
mainSplitPane.setPreferredSize(new java.awt.Dimension(1400, 828));
|
||||||
|
|
||||||
leftSplitPane.setDividerLocation(325);
|
|
||||||
leftSplitPane.setToolTipText("");
|
|
||||||
leftSplitPane.setPreferredSize(new java.awt.Dimension(400, 828));
|
|
||||||
mainSplitPane.setLeftComponent(leftSplitPane);
|
|
||||||
|
|
||||||
rightSplitPane.setDividerLocation(475);
|
rightSplitPane.setDividerLocation(475);
|
||||||
rightSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
rightSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||||
rightSplitPane.setResizeWeight(0.5);
|
rightSplitPane.setResizeWeight(0.5);
|
||||||
@ -182,196 +146,8 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
mainSplitPane.setRightComponent(rightSplitPane);
|
mainSplitPane.setRightComponent(rightSplitPane);
|
||||||
|
|
||||||
add(mainSplitPane, java.awt.BorderLayout.CENTER);
|
add(mainSplitPane, java.awt.BorderLayout.CENTER);
|
||||||
|
|
||||||
imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.imagesButton.text")); // NOI18N
|
|
||||||
imagesButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
|
||||||
imagesButton.setFocusable(false);
|
|
||||||
imagesButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
|
||||||
imagesButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
|
||||||
imagesButton.setMinimumSize(new java.awt.Dimension(90, 43));
|
|
||||||
imagesButton.setPreferredSize(new java.awt.Dimension(90, 43));
|
|
||||||
imagesButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
imagesButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(stepOneLabel, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.stepOneLabel.text")); // NOI18N
|
|
||||||
|
|
||||||
videosButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(videosButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.videosButton.text")); // NOI18N
|
|
||||||
videosButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
|
||||||
videosButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
|
||||||
videosButton.setFocusable(false);
|
|
||||||
videosButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
|
||||||
videosButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
|
||||||
videosButton.setMinimumSize(new java.awt.Dimension(90, 43));
|
|
||||||
videosButton.setPreferredSize(new java.awt.Dimension(90, 43));
|
|
||||||
videosButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
videosButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
documentsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(documentsButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.documentsButton.text")); // NOI18N
|
|
||||||
documentsButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
|
||||||
documentsButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N
|
|
||||||
documentsButton.setFocusable(false);
|
|
||||||
documentsButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
documentsButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
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(414, Short.MAX_VALUE)
|
|
||||||
.addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(toolBarPanelLayout.createSequentialGroup()
|
|
||||||
.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)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(documentsButton))
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, toolBarPanelLayout.createSequentialGroup()
|
|
||||||
.addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addComponent(stepOneLabel)
|
|
||||||
.addGap(119, 119, 119)))
|
|
||||||
.addContainerGap(413, Short.MAX_VALUE))
|
|
||||||
);
|
|
||||||
|
|
||||||
toolBarPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {documentsButton, imagesButton, videosButton});
|
|
||||||
|
|
||||||
toolBarPanelLayout.setVerticalGroup(
|
|
||||||
toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(toolBarPanelLayout.createSequentialGroup()
|
|
||||||
.addGap(4, 4, 4)
|
|
||||||
.addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
||||||
.addComponent(stepOneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.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))
|
|
||||||
.addGap(5, 5, 5))
|
|
||||||
);
|
|
||||||
|
|
||||||
toolBarPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {documentsButton, imagesButton, videosButton});
|
|
||||||
|
|
||||||
add(toolBarPanel, java.awt.BorderLayout.PAGE_START);
|
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed
|
|
||||||
resetTopComponent();
|
|
||||||
imagesButton.setSelected(true);
|
|
||||||
imagesButton.setEnabled(false);
|
|
||||||
imagesButton.setBackground(SELECTED_COLOR);
|
|
||||||
imagesButton.setForeground(Color.BLACK);
|
|
||||||
videosButton.setSelected(false);
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
videosButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
documentsButton.setSelected(false);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
documentsButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
|
||||||
}//GEN-LAST:event_imagesButtonActionPerformed
|
|
||||||
|
|
||||||
private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed
|
|
||||||
resetTopComponent();
|
|
||||||
imagesButton.setSelected(false);
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
imagesButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
videosButton.setSelected(true);
|
|
||||||
videosButton.setEnabled(false);
|
|
||||||
videosButton.setBackground(SELECTED_COLOR);
|
|
||||||
videosButton.setForeground(Color.BLACK);
|
|
||||||
documentsButton.setSelected(false);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
documentsButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.VIDEO);
|
|
||||||
}//GEN-LAST:event_videosButtonActionPerformed
|
|
||||||
|
|
||||||
private void documentsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsButtonActionPerformed
|
|
||||||
resetTopComponent();
|
|
||||||
documentsButton.setSelected(true);
|
|
||||||
documentsButton.setEnabled(false);
|
|
||||||
documentsButton.setBackground(SELECTED_COLOR);
|
|
||||||
documentsButton.setForeground(Color.BLACK);
|
|
||||||
videosButton.setSelected(false);
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
videosButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
imagesButton.setSelected(false);
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
imagesButton.setBackground(UNSELECTED_COLOR);
|
|
||||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.DOCUMENTS);
|
|
||||||
}//GEN-LAST:event_documentsButtonActionPerformed
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the user interface in response to a search being cancelled.
|
|
||||||
*
|
|
||||||
* @param searchCancelledEvent The SearchCancelledEvent received.
|
|
||||||
*/
|
|
||||||
@Subscribe
|
|
||||||
void handleSearchCancelledEvent(DiscoveryEventUtils.SearchCancelledEvent searchCancelledEvent) {
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
|
||||||
if (null != fileSearchPanel.getSelectedType()) {
|
|
||||||
switch (fileSearchPanel.getSelectedType()) {
|
|
||||||
case VIDEO:
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
case IMAGE:
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
case DOCUMENTS:
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the user interface in response to a search being completed.
|
|
||||||
*
|
|
||||||
* @param searchCompletedEvent The SearchCompletedEvent received.
|
|
||||||
*/
|
|
||||||
@Subscribe
|
|
||||||
void handleSearchCompletedEvent(DiscoveryEventUtils.SearchCompleteEvent searchCompletedEvent) {
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
|
||||||
if (null != fileSearchPanel.getSelectedType()) {
|
|
||||||
switch (fileSearchPanel.getSelectedType()) {
|
|
||||||
case VIDEO:
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
case IMAGE:
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
documentsButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
case DOCUMENTS:
|
|
||||||
videosButton.setEnabled(true);
|
|
||||||
imagesButton.setEnabled(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Mode> availableModes(List<Mode> modes) {
|
public List<Mode> availableModes(List<Mode> modes) {
|
||||||
/*
|
/*
|
||||||
@ -383,26 +159,10 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the user interface in response to a search being started.
|
|
||||||
*
|
|
||||||
* @param searchStartedEvent The SearchStartedEvent received.
|
|
||||||
*/
|
|
||||||
@Subscribe
|
|
||||||
void handleSearchStartedEvent(DiscoveryEventUtils.SearchStartedEvent searchStartedEvent) {
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
|
||||||
imagesButton.setEnabled(false);
|
|
||||||
videosButton.setEnabled(false);
|
|
||||||
documentsButton.setEnabled(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton documentsButton;
|
private javax.swing.JSplitPane mainSplitPane;
|
||||||
private javax.swing.JButton imagesButton;
|
|
||||||
private javax.swing.JSplitPane leftSplitPane;
|
|
||||||
private javax.swing.JSplitPane rightSplitPane;
|
private javax.swing.JSplitPane rightSplitPane;
|
||||||
private javax.swing.JButton videosButton;
|
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,6 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="errorLabel" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="cancelButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="searchButton" linkSize="1" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="stepThreeLabel" alignment="0" max="32767" attributes="0"/>
|
<Component id="stepThreeLabel" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="filtersScrollPane" alignment="0" max="32767" attributes="0"/>
|
<Component id="filtersScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="sortingPanel" pref="309" max="32767" attributes="0"/>
|
<Component id="sortingPanel" pref="309" max="32767" attributes="0"/>
|
||||||
@ -70,20 +63,12 @@
|
|||||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||||
<Component id="stepTwoLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="stepTwoLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="filtersScrollPane" pref="207" max="32767" attributes="0"/>
|
<Component id="filtersScrollPane" pref="181" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="stepThreeLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="stepThreeLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="sortingPanel" min="-2" max="-2" attributes="0"/>
|
<Component id="sortingPanel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="64" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Component id="errorLabel" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="searchButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -813,16 +798,6 @@
|
|||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.JButton" name="searchButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="FileSearchPanel.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Container class="javax.swing.JPanel" name="sortingPanel">
|
<Container class="javax.swing.JPanel" name="sortingPanel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
@ -949,24 +924,6 @@
|
|||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
|
||||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="cancelButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="FileSearchPanel.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="enabled" type="boolean" value="false"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="stepTwoLabel">
|
<Component class="javax.swing.JLabel" name="stepTwoLabel">
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="stepThreeLabel">
|
<Component class="javax.swing.JLabel" name="stepThreeLabel">
|
||||||
|
@ -583,9 +583,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
* Reset the panel to its initial configuration.
|
* Reset the panel to its initial configuration.
|
||||||
*/
|
*/
|
||||||
void resetPanel() {
|
void resetPanel() {
|
||||||
|
|
||||||
searchButton.setEnabled(false);
|
|
||||||
|
|
||||||
// Set up the filters
|
// Set up the filters
|
||||||
setUpDataSourceFilter();
|
setUpDataSourceFilter();
|
||||||
setUpFrequencyFilter();
|
setUpFrequencyFilter();
|
||||||
@ -1099,8 +1096,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
* The settings are valid so enable the Search button
|
* The settings are valid so enable the Search button
|
||||||
*/
|
*/
|
||||||
private void setValid() {
|
private void setValid() {
|
||||||
errorLabel.setText("");
|
firePropertyChange("FilterError", null, null);
|
||||||
searchButton.setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1110,8 +1106,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
* @param error
|
* @param error
|
||||||
*/
|
*/
|
||||||
private void setInvalid(String error) {
|
private void setInvalid(String error) {
|
||||||
errorLabel.setText(error);
|
firePropertyChange("FilterError", error, error);
|
||||||
searchButton.setEnabled(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1173,7 +1168,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
includeRadioButton = new javax.swing.JRadioButton();
|
includeRadioButton = new javax.swing.JRadioButton();
|
||||||
javax.swing.JPanel parentTextPanel = new javax.swing.JPanel();
|
javax.swing.JPanel parentTextPanel = new javax.swing.JPanel();
|
||||||
parentTextField = new javax.swing.JTextField();
|
parentTextField = new javax.swing.JTextField();
|
||||||
searchButton = new javax.swing.JButton();
|
|
||||||
javax.swing.JPanel sortingPanel = new javax.swing.JPanel();
|
javax.swing.JPanel sortingPanel = new javax.swing.JPanel();
|
||||||
groupByCombobox = new javax.swing.JComboBox<>();
|
groupByCombobox = new javax.swing.JComboBox<>();
|
||||||
orderByCombobox = new javax.swing.JComboBox<>();
|
orderByCombobox = new javax.swing.JComboBox<>();
|
||||||
@ -1181,8 +1175,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
javax.swing.JLabel orderByLabel = new javax.swing.JLabel();
|
javax.swing.JLabel orderByLabel = new javax.swing.JLabel();
|
||||||
javax.swing.JLabel groupByLabel = new javax.swing.JLabel();
|
javax.swing.JLabel groupByLabel = new javax.swing.JLabel();
|
||||||
groupSortingComboBox = new javax.swing.JComboBox<>();
|
groupSortingComboBox = new javax.swing.JComboBox<>();
|
||||||
errorLabel = new javax.swing.JLabel();
|
|
||||||
cancelButton = new javax.swing.JButton();
|
|
||||||
stepTwoLabel = new javax.swing.JLabel();
|
stepTwoLabel = new javax.swing.JLabel();
|
||||||
javax.swing.JLabel stepThreeLabel = new javax.swing.JLabel();
|
javax.swing.JLabel stepThreeLabel = new javax.swing.JLabel();
|
||||||
|
|
||||||
@ -1664,13 +1656,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
|
|
||||||
filtersScrollPane.setViewportView(filtersPanel);
|
filtersScrollPane.setViewportView(filtersPanel);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.searchButton.text")); // NOI18N
|
|
||||||
searchButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
searchButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
sortingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.sortingPanel.border.title"))); // NOI18N
|
sortingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.sortingPanel.border.title"))); // NOI18N
|
||||||
sortingPanel.setPreferredSize(new java.awt.Dimension(345, 112));
|
sortingPanel.setPreferredSize(new java.awt.Dimension(345, 112));
|
||||||
|
|
||||||
@ -1717,16 +1702,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
|
|
||||||
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.cancelButton.text")); // NOI18N
|
|
||||||
cancelButton.setEnabled(false);
|
|
||||||
cancelButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
cancelButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(stepThreeLabel, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.stepThreeLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(stepThreeLabel, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.stepThreeLabel.text")); // NOI18N
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
@ -1741,66 +1716,26 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
|
||||||
.addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(cancelButton)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(searchButton))
|
|
||||||
.addComponent(stepThreeLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(stepThreeLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(filtersScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(filtersScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))
|
.addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))
|
||||||
.addGap(6, 6, 6))))
|
.addGap(6, 6, 6))))
|
||||||
);
|
);
|
||||||
|
|
||||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, searchButton});
|
|
||||||
|
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addGap(6, 6, 6)
|
.addGap(6, 6, 6)
|
||||||
.addComponent(stepTwoLabel)
|
.addComponent(stepTwoLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(filtersScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE)
|
.addComponent(filtersScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(stepThreeLabel)
|
.addComponent(stepThreeLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(sortingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(sortingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addGap(64, 64, 64))
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(cancelButton)
|
|
||||||
.addComponent(searchButton)))
|
|
||||||
.addGap(6, 6, 6))
|
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
|
||||||
// Get the selected filters
|
|
||||||
List<FileSearchFiltering.FileFilter> filters = getFilters();
|
|
||||||
enableSearch(false);
|
|
||||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.SearchStartedEvent(fileType));
|
|
||||||
|
|
||||||
// Get the grouping attribute and group sorting method
|
|
||||||
FileSearch.AttributeType groupingAttr = getGroupingAttribute();
|
|
||||||
FileGroup.GroupSortingAlgorithm groupSortAlgorithm = getGroupSortingMethod();
|
|
||||||
|
|
||||||
// Get the file sorting method
|
|
||||||
FileSorter.SortingMethod fileSort = getFileSortingMethod();
|
|
||||||
CentralRepository centralRepoDb = null;
|
|
||||||
if (CentralRepository.isEnabled()) {
|
|
||||||
try {
|
|
||||||
centralRepoDb = CentralRepository.getInstance();
|
|
||||||
} catch (CentralRepoException ex) {
|
|
||||||
centralRepoDb = null;
|
|
||||||
logger.log(Level.SEVERE, "Error loading central repository database, no central repository options will be available for File Discovery", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
searchWorker = new SearchWorker(centralRepoDb, filters, groupingAttr, groupSortAlgorithm, fileSort);
|
|
||||||
searchWorker.execute();
|
|
||||||
}//GEN-LAST:event_searchButtonActionPerformed
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the enabled status of the search controls.
|
* Set the enabled status of the search controls.
|
||||||
*
|
*
|
||||||
@ -1829,8 +1764,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
searchButton.setEnabled(enabled);
|
|
||||||
cancelButton.setEnabled(!enabled);
|
|
||||||
orderByCombobox.setEnabled(enabled);
|
orderByCombobox.setEnabled(enabled);
|
||||||
groupByCombobox.setEnabled(enabled);
|
groupByCombobox.setEnabled(enabled);
|
||||||
groupSortingComboBox.setEnabled(enabled);
|
groupSortingComboBox.setEnabled(enabled);
|
||||||
@ -1915,10 +1848,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
dataSourceList.setEnabled(dataSourceCheckbox.isSelected());
|
dataSourceList.setEnabled(dataSourceCheckbox.isSelected());
|
||||||
}//GEN-LAST:event_dataSourceCheckboxActionPerformed
|
}//GEN-LAST:event_dataSourceCheckboxActionPerformed
|
||||||
|
|
||||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
|
||||||
cancelSearch();
|
|
||||||
}//GEN-LAST:event_cancelButtonActionPerformed
|
|
||||||
|
|
||||||
private void hashSetCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hashSetCheckboxActionPerformed
|
private void hashSetCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hashSetCheckboxActionPerformed
|
||||||
hashSetList.setEnabled(hashSetCheckbox.isSelected());
|
hashSetList.setEnabled(hashSetCheckbox.isSelected());
|
||||||
}//GEN-LAST:event_hashSetCheckboxActionPerformed
|
}//GEN-LAST:event_hashSetCheckboxActionPerformed
|
||||||
@ -1942,7 +1871,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton addButton;
|
private javax.swing.JButton addButton;
|
||||||
private javax.swing.JButton cancelButton;
|
|
||||||
private javax.swing.JCheckBox crFrequencyCheckbox;
|
private javax.swing.JCheckBox crFrequencyCheckbox;
|
||||||
private javax.swing.JList<Frequency> crFrequencyList;
|
private javax.swing.JList<Frequency> crFrequencyList;
|
||||||
private javax.swing.JScrollPane crFrequencyScrollPane;
|
private javax.swing.JScrollPane crFrequencyScrollPane;
|
||||||
@ -1950,7 +1878,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
private javax.swing.JList<DataSourceItem> dataSourceList;
|
private javax.swing.JList<DataSourceItem> dataSourceList;
|
||||||
private javax.swing.JScrollPane dataSourceScrollPane;
|
private javax.swing.JScrollPane dataSourceScrollPane;
|
||||||
private javax.swing.JButton deleteButton;
|
private javax.swing.JButton deleteButton;
|
||||||
private javax.swing.JLabel errorLabel;
|
|
||||||
private javax.swing.JRadioButton excludeRadioButton;
|
private javax.swing.JRadioButton excludeRadioButton;
|
||||||
private javax.swing.JRadioButton fullRadioButton;
|
private javax.swing.JRadioButton fullRadioButton;
|
||||||
private javax.swing.JComboBox<GroupingAttributeType> groupByCombobox;
|
private javax.swing.JComboBox<GroupingAttributeType> groupByCombobox;
|
||||||
@ -1978,7 +1905,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
|||||||
private javax.swing.JCheckBox scoreCheckbox;
|
private javax.swing.JCheckBox scoreCheckbox;
|
||||||
private javax.swing.JList<Score> scoreList;
|
private javax.swing.JList<Score> scoreList;
|
||||||
private javax.swing.JScrollPane scoreScrollPane;
|
private javax.swing.JScrollPane scoreScrollPane;
|
||||||
private javax.swing.JButton searchButton;
|
|
||||||
private javax.swing.JCheckBox sizeCheckbox;
|
private javax.swing.JCheckBox sizeCheckbox;
|
||||||
private javax.swing.JList<FileSize> sizeList;
|
private javax.swing.JList<FileSize> sizeList;
|
||||||
private javax.swing.JScrollPane sizeScrollPane;
|
private javax.swing.JScrollPane sizeScrollPane;
|
||||||
|
@ -42,8 +42,8 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
|||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to open the Discovery top component. Allows the user to run
|
* Class to open the Discovery top component. Allows the user to run searches
|
||||||
* searches and see results.
|
* and see results.
|
||||||
*/
|
*/
|
||||||
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.newpackage.OpenDiscoveryAction")
|
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.newpackage.OpenDiscoveryAction")
|
||||||
@ActionReferences(value = {
|
@ActionReferences(value = {
|
||||||
@ -75,17 +75,19 @@ public final class OpenDiscoveryAction extends CallableSystemAction implements P
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("fallthrough")
|
@SuppressWarnings("fallthrough")
|
||||||
public void performAction() {
|
public void performAction() {
|
||||||
final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent();
|
final DiscoveryDialog discDialog = new DiscoveryDialog();
|
||||||
if (tc != null) {
|
discDialog.setVisible(true);
|
||||||
if (tc.isOpened() == false) {
|
// final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent();
|
||||||
tc.open();
|
// if (tc != null) {
|
||||||
tc.updateSearchSettings();
|
// if (tc.isOpened() == false) {
|
||||||
displayErrorMessage(tc);
|
// tc.open();
|
||||||
}
|
// tc.updateSearchSettings();
|
||||||
tc.toFront();
|
// displayErrorMessage(tc);
|
||||||
tc.requestActive();
|
// }
|
||||||
|
// tc.toFront();
|
||||||
}
|
// tc.requestActive();
|
||||||
|
//
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user