Merge branch 'develop' of github.com:sleuthkit/autopsy into 5160-tika-init

This commit is contained in:
esaunders 2019-06-17 13:36:28 -04:00
commit 0266b816d2
52 changed files with 2398 additions and 1674 deletions

View File

@ -238,13 +238,7 @@ OpenMultiUserCasePanel.cancelButton.text=Cancel
OpenMultiUserCasePanel.openSingleUserCaseButton.text=Open Single-User Case... OpenMultiUserCasePanel.openSingleUserCaseButton.text=Open Single-User Case...
OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case
OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name
LogicalImagerPanel.jLabel1.text=Insert external drive
LogicalImagerPanel.scanButton.text=Scan
LogicalImagerPanel.jLabel6.text=Or, pick a Logical Imager folder
LogicalImagerPanel.browseButton.text=Browse LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageLabel.text=Error/Status message
UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module. UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module.
UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the
UnpackagePortableCaseDialog.exitButton.text=Exit UnpackagePortableCaseDialog.exitButton.text=Exit
@ -260,3 +254,12 @@ UnpackagePortableCaseProgressDialog.okButton.text=OK
UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to: UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
UnpackagePortableCaseDialog.caseLabel.text=Portable Case: UnpackagePortableCaseDialog.caseLabel.text=Portable Case:
LogicalImagerPanel.importRadioButton.text=Import From External Drive
LogicalImagerPanel.manualRadioButton.text=Manually Choose Folder
LogicalImagerPanel.importRadioButton.toolTipText=
LogicalImagerPanel.pathTextField.text=
LogicalImagerPanel.selectFolderLabel.text=Selected Folder:
LogicalImagerPanel.refreshButton.text=Refresh
LogicalImagerPanel.selectFromDriveLabel.text=Select Acquisition From Drive
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageTextArea.text=

View File

@ -191,7 +191,6 @@ LogicalImagerDSProcessor.failToCreateDirectory=Failed to create directory {0}
LogicalImagerDSProcessor.imageDirPathNotFound={0} not found.\nUSB drive has been ejected. LogicalImagerDSProcessor.imageDirPathNotFound={0} not found.\nUSB drive has been ejected.
LogicalImagerPanel.imageTable.columnModel.title0=Hostname LogicalImagerPanel.imageTable.columnModel.title0=Hostname
LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date
LogicalImagerPanel.messageLabel.clickScanOrBrowse=Click SCAN or BROWSE button to find images
# {0} - sparseImageDirectory # {0} - sparseImageDirectory
# {1} - image # {1} - image
LogicalImagerPanel.messageLabel.directoryDoesNotContainSparseImage=Directory {0} does not contain {1} LogicalImagerPanel.messageLabel.directoryDoesNotContainSparseImage=Directory {0} does not contain {1}
@ -201,7 +200,6 @@ LogicalImagerPanel.messageLabel.driveHasNoImages=Drive has no images
LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found
LogicalImagerPanel.messageLabel.noImageSelected=No image selected LogicalImagerPanel.messageLabel.noImageSelected=No image selected
LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ... LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...
LogicalImagerPanel.messageLabel.selectedImage=Selected folder
LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive
Menu/Case/OpenRecentCase=Open Recent Case Menu/Case/OpenRecentCase=Open Recent Case
CTL_CaseDeleteAction=Delete Case CTL_CaseDeleteAction=Delete Case
@ -475,13 +473,7 @@ OpenMultiUserCasePanel.cancelButton.text=Cancel
OpenMultiUserCasePanel.openSingleUserCaseButton.text=Open Single-User Case... OpenMultiUserCasePanel.openSingleUserCaseButton.text=Open Single-User Case...
OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case
OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name
LogicalImagerPanel.jLabel1.text=Insert external drive
LogicalImagerPanel.scanButton.text=Scan
LogicalImagerPanel.jLabel6.text=Or, pick a Logical Imager folder
LogicalImagerPanel.browseButton.text=Browse LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageLabel.text=Error/Status message
UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module. UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module.
UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the
UnpackagePortableCaseDialog.exitButton.text=Exit UnpackagePortableCaseDialog.exitButton.text=Exit
@ -497,3 +489,12 @@ UnpackagePortableCaseProgressDialog.okButton.text=OK
UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to: UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
UnpackagePortableCaseDialog.caseLabel.text=Portable Case: UnpackagePortableCaseDialog.caseLabel.text=Portable Case:
LogicalImagerPanel.importRadioButton.text=Import From External Drive
LogicalImagerPanel.manualRadioButton.text=Manually Choose Folder
LogicalImagerPanel.importRadioButton.toolTipText=
LogicalImagerPanel.pathTextField.text=
LogicalImagerPanel.selectFolderLabel.text=Selected Folder:
LogicalImagerPanel.refreshButton.text=Refresh
LogicalImagerPanel.selectFromDriveLabel.text=Select Acquisition From Drive
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageTextArea.text=

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.6" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Form version="1.6" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
</Component>
</NonVisualComponents>
<Properties> <Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 65]"/> <Dimension value="[0, 65]"/>
@ -25,118 +29,146 @@
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace min="-2" pref="238" max="-2" attributes="0"/>
<Component id="topLabel" min="-2" pref="163" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="messageLabel" alignment="1" max="32767" attributes="0"/> <Group type="102" attributes="0">
<Group type="102" alignment="0" attributes="0"> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0"> <Component id="selectFolderLabel" min="-2" pref="81" max="-2" attributes="0"/>
<Component id="jSeparator1" alignment="0" max="32767" attributes="0"/> <EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Component id="pathTextField" min="-2" pref="474" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0"> </Group>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="1" max="-2" attributes="0">
<Group type="102" attributes="0"> <Component id="jSeparator2" alignment="0" max="32767" attributes="0"/>
<Component id="selectDriveLabel" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="-2" pref="289" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0">
</Group> <EmptySpace min="41" pref="41" max="-2" attributes="0"/>
<Group type="102" alignment="1" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="scanButton" min="-2" max="-2" attributes="0"/> <Component id="driveListScrollPane" alignment="0" min="-2" pref="160" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="126" max="-2" attributes="0"/> <Component id="refreshButton" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="imageScrollPane" min="-2" pref="377" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="20" pref="20" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="manualRadioButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/> <Component id="importRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="browseButton" min="-2" max="-2" attributes="0"/> <Group type="102" attributes="0">
</Group> <EmptySpace min="21" pref="21" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0"> <Component id="selectDriveLabel" min="-2" max="-2" attributes="0"/>
<Component id="driveListScrollPane" min="-2" pref="211" max="-2" attributes="0"/> <EmptySpace min="-2" pref="113" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/> <Component id="selectFromDriveLabel" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="selectAcquisitionFromDriveLabel" min="-2" pref="305" max="-2" attributes="0"/>
<Component id="imageScrollPane" min="-2" pref="346" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="346" max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" pref="154" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="144" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" pref="116" max="-2" attributes="0"/>
</Group>
</Group> </Group>
</Group> </Group>
<EmptySpace pref="48" max="32767" attributes="0"/> </Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="568" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace pref="14" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="topLabel" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Component id="importRadioButton" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="selectDriveLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="selectFromDriveLabel" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="scanButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jSeparator1" min="-2" pref="4" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="selectDriveLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="selectAcquisitionFromDriveLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="imageScrollPane" pref="0" max="32767" attributes="0"/> <Component id="imageScrollPane" pref="0" max="32767" attributes="0"/>
<Component id="driveListScrollPane" pref="194" max="32767" attributes="0"/> <Component id="driveListScrollPane" pref="186" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="messageLabel" min="-2" max="-2" attributes="0"/> <Component id="refreshButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="154" max="-2" attributes="0"/> <EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="manualRadioButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
<Component id="jSeparator2" min="-2" pref="16" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="selectFolderLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="pathTextField" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="61" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="topLabel"> <Component class="javax.swing.JButton" name="browseButton">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.topLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.browseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel1"> <Component class="javax.swing.JRadioButton" name="importRadioButton">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ComponentRef name="buttonGroup1"/>
</Property> </Property>
</Properties> <Property name="selected" type="boolean" value="true"/>
</Component>
<Component class="javax.swing.JButton" name="scanButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.scanButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.importRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.importRadioButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanButtonActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="importRadioButtonActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JLabel" name="messageLabel"> <Component class="javax.swing.JRadioButton" name="manualRadioButton">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.manualRadioButton.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="manualRadioButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JTextField" name="pathTextField">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.messageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.pathTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" id="black" palette="1" red="0" type="palette"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="selectFolderLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.selectFolderLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
@ -147,6 +179,13 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="selectFromDriveLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.selectFromDriveLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="driveListScrollPane"> <Container class="javax.swing.JScrollPane" name="driveListScrollPane">
<AuxValues> <AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
@ -162,7 +201,7 @@
<Property name="selectionMode" type="int" value="0"/> <Property name="selectionMode" type="int" value="0"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="driveListMouseClicked"/> <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="driveListMouseReleased"/>
<EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="driveListKeyReleased"/> <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="driveListKeyReleased"/>
</Events> </Events>
<AuxValues> <AuxValues>
@ -171,28 +210,14 @@
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Component class="javax.swing.JLabel" name="selectAcquisitionFromDriveLabel"> <Component class="javax.swing.JButton" name="refreshButton">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.selectAcquisitionFromDriveLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.refreshButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel6">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.jLabel6.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="browseButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.browseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshButtonActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="imageScrollPane"> <Container class="javax.swing.JScrollPane" name="imageScrollPane">
@ -224,13 +249,56 @@
<Property name="updateSelectionOnSort" type="boolean" value="false"/> <Property name="updateSelectionOnSort" type="boolean" value="false"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="imageTableMouseClicked"/> <EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="imageTableMouseReleased"/>
<EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="imageTableKeyReleased"/> <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="imageTableKeyReleased"/>
</Events> </Events>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Component class="javax.swing.JSeparator" name="jSeparator1"> <Component class="javax.swing.JSeparator" name="jSeparator2">
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="messageTextArea">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="f0" green="f0" red="f0" type="rgb"/>
</Property>
<Property name="columns" type="int" value="20"/>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" id="red" palette="1" red="ff" type="palette"/>
</Property>
<Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="3"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.messageTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" id="red" palette="1" red="ff" type="palette"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[0, 0, 0, 0]"/>
</Property>
</Properties>
<BindingProperties>
<BindingProperty name="editable" source="messageTextArea" sourcePath="false" target="messageTextArea" targetPath="editable" updateStrategy="0" immediately="false"/>
</BindingProperties>
</Component>
</SubComponents>
</Container>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@ -19,6 +19,7 @@
package org.sleuthkit.autopsy.casemodule; package org.sleuthkit.autopsy.casemodule;
import java.awt.Color; import java.awt.Color;
import java.awt.Component;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.FileStore; import java.nio.file.FileStore;
@ -46,7 +47,6 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
* select a file. * select a file.
*/ */
@Messages({ @Messages({
"LogicalImagerPanel.messageLabel.selectedImage=Selected folder",
"LogicalImagerPanel.messageLabel.noImageSelected=No image selected", "LogicalImagerPanel.messageLabel.noImageSelected=No image selected",
"LogicalImagerPanel.messageLabel.driveHasNoImages=Drive has no images", "LogicalImagerPanel.messageLabel.driveHasNoImages=Drive has no images",
"LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive",}) "LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive",})
@ -55,7 +55,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String SPARSE_IMAGE_VHD = "sparse_image.vhd"; //NON-NLS private static final String SPARSE_IMAGE_VHD = "sparse_image.vhd"; //NON-NLS
private static final String SELECTED_IMAGE = Bundle.LogicalImagerPanel_messageLabel_selectedImage();
private static final String NO_IMAGE_SELECTED = Bundle.LogicalImagerPanel_messageLabel_noImageSelected(); private static final String NO_IMAGE_SELECTED = Bundle.LogicalImagerPanel_messageLabel_noImageSelected();
private static final String DRIVE_HAS_NO_IMAGES = Bundle.LogicalImagerPanel_messageLabel_driveHasNoImages(); private static final String DRIVE_HAS_NO_IMAGES = Bundle.LogicalImagerPanel_messageLabel_driveHasNoImages();
private static final String[] EMPTY_LIST_DATA = {}; private static final String[] EMPTY_LIST_DATA = {};
@ -75,6 +74,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
private LogicalImagerPanel(String context) { private LogicalImagerPanel(String context) {
this.contextName = context; this.contextName = context;
initComponents(); initComponents();
jScrollPane1.setBorder(null);
clearImageTable(); clearImageTable();
} }
@ -86,13 +86,9 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
* *
* @return instance of the LogicalImagerPanel * @return instance of the LogicalImagerPanel
*/ */
@Messages({
"LogicalImagerPanel.messageLabel.clickScanOrBrowse=Click SCAN or BROWSE button to find images"
})
public static synchronized LogicalImagerPanel createInstance(String context) { public static synchronized LogicalImagerPanel createInstance(String context) {
LogicalImagerPanel instance = new LogicalImagerPanel(context); LogicalImagerPanel instance = new LogicalImagerPanel(context);
// post-constructor initialization of listener support without leaking references of uninitialized objects // post-constructor initialization of listener support without leaking references of uninitialized objects
instance.messageLabel.setText(Bundle.LogicalImagerPanel_messageLabel_clickScanOrBrowse());
instance.imageTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); instance.imageTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
return instance; return instance;
} }
@ -104,43 +100,68 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
*/ */
// <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() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
topLabel = new javax.swing.JLabel(); buttonGroup1 = new javax.swing.ButtonGroup();
jLabel1 = new javax.swing.JLabel(); browseButton = new javax.swing.JButton();
scanButton = new javax.swing.JButton(); importRadioButton = new javax.swing.JRadioButton();
messageLabel = new javax.swing.JLabel(); manualRadioButton = new javax.swing.JRadioButton();
pathTextField = new javax.swing.JTextField();
selectFolderLabel = new javax.swing.JLabel();
selectDriveLabel = new javax.swing.JLabel(); selectDriveLabel = new javax.swing.JLabel();
selectFromDriveLabel = new javax.swing.JLabel();
driveListScrollPane = new javax.swing.JScrollPane(); driveListScrollPane = new javax.swing.JScrollPane();
driveList = new javax.swing.JList<>(); driveList = new javax.swing.JList<>();
selectAcquisitionFromDriveLabel = new javax.swing.JLabel(); refreshButton = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
browseButton = new javax.swing.JButton();
imageScrollPane = new javax.swing.JScrollPane(); imageScrollPane = new javax.swing.JScrollPane();
imageTable = new javax.swing.JTable(); imageTable = new javax.swing.JTable();
jSeparator1 = new javax.swing.JSeparator(); jSeparator2 = new javax.swing.JSeparator();
jScrollPane1 = new javax.swing.JScrollPane();
messageTextArea = new javax.swing.JTextArea();
setMinimumSize(new java.awt.Dimension(0, 65)); setMinimumSize(new java.awt.Dimension(0, 65));
setPreferredSize(new java.awt.Dimension(403, 65)); setPreferredSize(new java.awt.Dimension(403, 65));
org.openide.awt.Mnemonics.setLocalizedText(topLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.topLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.browseButton.text")); // NOI18N
browseButton.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.jLabel1.text")); // NOI18N browseButton.addActionListener(new java.awt.event.ActionListener() {
org.openide.awt.Mnemonics.setLocalizedText(scanButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.scanButton.text")); // NOI18N
scanButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
scanButtonActionPerformed(evt); browseButtonActionPerformed(evt);
} }
}); });
org.openide.awt.Mnemonics.setLocalizedText(messageLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.messageLabel.text")); // NOI18N buttonGroup1.add(importRadioButton);
importRadioButton.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(importRadioButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.importRadioButton.text")); // NOI18N
importRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.importRadioButton.toolTipText")); // NOI18N
importRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
importRadioButtonActionPerformed(evt);
}
});
buttonGroup1.add(manualRadioButton);
org.openide.awt.Mnemonics.setLocalizedText(manualRadioButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.manualRadioButton.text")); // NOI18N
manualRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
manualRadioButtonActionPerformed(evt);
}
});
pathTextField.setText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.pathTextField.text")); // NOI18N
pathTextField.setDisabledTextColor(java.awt.Color.black);
pathTextField.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(selectFolderLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectFolderLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(selectDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectDriveLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(selectDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectDriveLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(selectFromDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectFromDriveLabel.text")); // NOI18N
driveList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); driveList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
driveList.addMouseListener(new java.awt.event.MouseAdapter() { driveList.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { public void mouseReleased(java.awt.event.MouseEvent evt) {
driveListMouseClicked(evt); driveListMouseReleased(evt);
} }
}); });
driveList.addKeyListener(new java.awt.event.KeyAdapter() { driveList.addKeyListener(new java.awt.event.KeyAdapter() {
@ -150,14 +171,10 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
}); });
driveListScrollPane.setViewportView(driveList); driveListScrollPane.setViewportView(driveList);
org.openide.awt.Mnemonics.setLocalizedText(selectAcquisitionFromDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectAcquisitionFromDriveLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(refreshButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.refreshButton.text")); // NOI18N
refreshButton.addActionListener(new java.awt.event.ActionListener() {
org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.jLabel6.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.browseButton.text")); // NOI18N
browseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
browseButtonActionPerformed(evt); refreshButtonActionPerformed(evt);
} }
}); });
@ -178,8 +195,8 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
imageTable.getTableHeader().setReorderingAllowed(false); imageTable.getTableHeader().setReorderingAllowed(false);
imageTable.setUpdateSelectionOnSort(false); imageTable.setUpdateSelectionOnSort(false);
imageTable.addMouseListener(new java.awt.event.MouseAdapter() { imageTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { public void mouseReleased(java.awt.event.MouseEvent evt) {
imageTableMouseClicked(evt); imageTableMouseReleased(evt);
} }
}); });
imageTable.addKeyListener(new java.awt.event.KeyAdapter() { imageTable.addKeyListener(new java.awt.event.KeyAdapter() {
@ -190,72 +207,94 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
imageScrollPane.setViewportView(imageTable); imageScrollPane.setViewportView(imageTable);
imageTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); imageTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
jScrollPane1.setBorder(null);
messageTextArea.setBackground(new java.awt.Color(240, 240, 240));
messageTextArea.setColumns(20);
messageTextArea.setForeground(java.awt.Color.red);
messageTextArea.setLineWrap(true);
messageTextArea.setRows(3);
messageTextArea.setText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.messageTextArea.text")); // NOI18N
messageTextArea.setBorder(null);
messageTextArea.setDisabledTextColor(java.awt.Color.red);
messageTextArea.setEnabled(false);
messageTextArea.setMargin(new java.awt.Insets(0, 0, 0, 0));
org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, messageTextArea, org.jdesktop.beansbinding.ELProperty.create("false"), messageTextArea, org.jdesktop.beansbinding.BeanProperty.create("editable"));
bindingGroup.addBinding(binding);
jScrollPane1.setViewportView(messageTextArea);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(238, 238, 238)
.addComponent(topLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(messageLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGap(10, 10, 10)
.addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(selectFolderLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(13, 13, 13)
.addGroup(layout.createSequentialGroup() .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 474, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup() .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(selectDriveLabel) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(289, 289, 289)) .addGroup(layout.createSequentialGroup()
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(41, 41, 41)
.addComponent(scanButton) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(126, 126, 126))) .addComponent(driveListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(36, 36, 36) .addComponent(refreshButton))
.addComponent(browseButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createSequentialGroup() .addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 377, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(driveListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup()
.addGap(28, 28, 28) .addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(selectAcquisitionFromDriveLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup()
.addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(manualRadioButton)
.addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGap(346, 346, 346) .addComponent(browseButton))
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(importRadioButton)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(144, 144, 144) .addGap(21, 21, 21)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(selectDriveLabel)
.addContainerGap(48, Short.MAX_VALUE)))) .addGap(113, 113, 113)
.addComponent(selectFromDriveLabel))))))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 568, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(14, Short.MAX_VALUE))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(topLabel) .addGap(16, 16, 16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(importRadioButton)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(scanButton)
.addComponent(browseButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(selectDriveLabel) .addComponent(selectDriveLabel)
.addComponent(selectAcquisitionFromDriveLabel)) .addComponent(selectFromDriveLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(driveListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)) .addComponent(driveListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))
.addGap(26, 26, 26) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(messageLabel) .addComponent(refreshButton)
.addGap(154, 154, 154)) .addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(browseButton)
.addComponent(manualRadioButton))
.addGap(18, 18, 18)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(selectFolderLabel)
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(6, 6, 6))
); );
bindingGroup.bind();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
public static String humanReadableByteCount(long bytes, boolean si) { public static String humanReadableByteCount(long bytes, boolean si) {
@ -268,47 +307,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); //NON-NLS return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); //NON-NLS
} }
@Messages({
"LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...",
"LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found"
})
private void scanButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scanButtonActionPerformed
// Scan external drives for sparse_image.vhd
clearImageTable();
setNormalMessage(Bundle.LogicalImagerPanel_messageLabel_scanningExternalDrives());
List<String> listData = new ArrayList<>();
File[] roots = File.listRoots();
int firstRemovableDrive = -1;
int i = 0;
for (File root : roots) {
String description = FileSystemView.getFileSystemView().getSystemTypeDescription(root);
long spaceInBytes = root.getTotalSpace();
String sizeWithUnit = humanReadableByteCount(spaceInBytes, false);
listData.add(root + " (" + description + ") (" + sizeWithUnit + ")");
if (firstRemovableDrive == -1) {
try {
FileStore fileStore = Files.getFileStore(root.toPath());
if ((boolean) fileStore.getAttribute("volume:isRemovable")) { //NON-NLS
firstRemovableDrive = i;
}
} catch (IOException ex) {
; // skip
}
}
i++;
}
driveList.setListData(listData.toArray(new String[0]));
if (!listData.isEmpty()) {
// auto-select the first external drive, if any
driveList.setSelectedIndex(firstRemovableDrive == -1 ? 0 : firstRemovableDrive);
driveListMouseClicked(null);
driveList.requestFocusInWindow();
} else {
setErrorMessage(Bundle.LogicalImagerPanel_messageLabel_noExternalDriveFound());
}
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}//GEN-LAST:event_scanButtonActionPerformed
@Messages({ @Messages({
"# {0} - sparseImageDirectory", "# {0} - sparseImageDirectory",
"# {1} - image", "# {1} - image",
@ -333,7 +331,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
return; return;
} }
choosenImageDirPath = Paths.get(path); choosenImageDirPath = Paths.get(path);
setNormalMessage(SELECTED_IMAGE + " " + path); setNormalMessage(path);
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else { } else {
setErrorMessage(Bundle.LogicalImagerPanel_messageLabel_directoryFormatInvalid(path)); setErrorMessage(Bundle.LogicalImagerPanel_messageLabel_directoryFormatInvalid(path));
@ -348,7 +346,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
int index = imageTable.getSelectedRow(); int index = imageTable.getSelectedRow();
if (index != -1) { if (index != -1) {
choosenImageDirPath = Paths.get((String) imageTableModel.getValueAt(index, 2)); choosenImageDirPath = Paths.get((String) imageTableModel.getValueAt(index, 2));
setNormalMessage(SELECTED_IMAGE + " " + choosenImageDirPath.toString()); setNormalMessage(choosenImageDirPath.toString());
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else { } else {
choosenImageDirPath = null; choosenImageDirPath = null;
@ -357,10 +355,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
} }
} }
private void imageTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_imageTableMouseClicked
imageTableSelect();
}//GEN-LAST:event_imageTableMouseClicked
private void driveListSelect() { private void driveListSelect() {
String selectedStr = driveList.getSelectedValue(); String selectedStr = driveList.getSelectedValue();
if (selectedStr == null) { if (selectedStr == null) {
@ -398,7 +392,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
} }
} }
} }
selectAcquisitionFromDriveLabel.setText(Bundle.LogicalImagerPanel_selectAcquisitionFromDriveLabel_text() selectFromDriveLabel.setText(Bundle.LogicalImagerPanel_selectAcquisitionFromDriveLabel_text()
+ " " + driveLetter); + " " + driveLetter);
imageTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); imageTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
imageTable.setModel(imageTableModel); imageTable.setModel(imageTableModel);
@ -411,6 +405,10 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
choosenImageDirPath = null; choosenImageDirPath = null;
setErrorMessage(DRIVE_HAS_NO_IMAGES); setErrorMessage(DRIVE_HAS_NO_IMAGES);
} }
} else {
clearImageTable();
choosenImageDirPath = null;
setErrorMessage(DRIVE_HAS_NO_IMAGES);
} }
} }
@ -421,13 +419,14 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
} }
private void setErrorMessage(String msg) { private void setErrorMessage(String msg) {
messageLabel.setForeground(Color.red); messageTextArea.setForeground(Color.red);
messageLabel.setText(msg); messageTextArea.setText(msg);
pathTextField.setText("");
} }
private void setNormalMessage(String msg) { private void setNormalMessage(String msg) {
messageLabel.setForeground(Color.black); pathTextField.setText(msg);
messageLabel.setText(msg); messageTextArea.setText("");
} }
private void clearImageTable() { private void clearImageTable() {
@ -436,43 +435,138 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
fixImageTableColumnWidth(); fixImageTableColumnWidth();
} }
private void driveListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_driveListMouseClicked private void toggleMouseAndKeyListeners(Component component, boolean isEnable) {
driveListSelect(); component.setEnabled(isEnable);
}
private void manualRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manualRadioButtonActionPerformed
browseButton.setEnabled(true);
// disable import panel
toggleMouseAndKeyListeners(driveList, false);
toggleMouseAndKeyListeners(driveListScrollPane, false);
toggleMouseAndKeyListeners(imageScrollPane, false);
toggleMouseAndKeyListeners(imageTable, false);
refreshButton.setEnabled(false);
choosenImageDirPath = null;
setNormalMessage("");
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}//GEN-LAST:event_driveListMouseClicked }//GEN-LAST:event_manualRadioButtonActionPerformed
private void importRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importRadioButtonActionPerformed
browseButton.setEnabled(false);
toggleMouseAndKeyListeners(driveList, true);
toggleMouseAndKeyListeners(driveListScrollPane, true);
toggleMouseAndKeyListeners(imageScrollPane, true);
toggleMouseAndKeyListeners(imageTable, true);
refreshButton.setEnabled(true);
choosenImageDirPath = null;
setNormalMessage("");
refreshButton.doClick();
}//GEN-LAST:event_importRadioButtonActionPerformed
@Messages({
"LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...",
"LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found"
})
private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshButtonActionPerformed
// Scan external drives for sparse_image.vhd
clearImageTable();
setNormalMessage(Bundle.LogicalImagerPanel_messageLabel_scanningExternalDrives());
List<String> listData = new ArrayList<>();
File[] roots = File.listRoots();
int firstRemovableDrive = -1;
int i = 0;
for (File root : roots) {
String description = FileSystemView.getFileSystemView().getSystemTypeDescription(root);
long spaceInBytes = root.getTotalSpace();
String sizeWithUnit = humanReadableByteCount(spaceInBytes, false);
listData.add(root + " (" + description + ") (" + sizeWithUnit + ")");
if (firstRemovableDrive == -1) {
try {
FileStore fileStore = Files.getFileStore(root.toPath());
if ((boolean) fileStore.getAttribute("volume:isRemovable")) { //NON-NLS
firstRemovableDrive = i;
}
} catch (IOException ex) {
; // skip
}
}
i++;
}
driveList.setListData(listData.toArray(new String[0]));
if (!listData.isEmpty()) {
// auto-select the first external drive, if any
driveList.setSelectedIndex(firstRemovableDrive == -1 ? 0 : firstRemovableDrive);
driveListMouseReleased(null);
driveList.requestFocusInWindow();
} else {
setErrorMessage(Bundle.LogicalImagerPanel_messageLabel_noExternalDriveFound());
}
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}//GEN-LAST:event_refreshButtonActionPerformed
private void driveListKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_driveListKeyReleased private void driveListKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_driveListKeyReleased
driveListSelect(); if (importRadioButton.isSelected()) {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false); driveListSelect();
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}
}//GEN-LAST:event_driveListKeyReleased }//GEN-LAST:event_driveListKeyReleased
private void imageTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_imageTableKeyReleased private void imageTableKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_imageTableKeyReleased
imageTableSelect(); if (importRadioButton.isSelected()) {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false); imageTableSelect();
}
}//GEN-LAST:event_imageTableKeyReleased }//GEN-LAST:event_imageTableKeyReleased
private void imageTableMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_imageTableMouseReleased
if (importRadioButton.isSelected()) {
imageTableSelect();
}
}//GEN-LAST:event_imageTableMouseReleased
private void driveListMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_driveListMouseReleased
if (importRadioButton.isSelected()) {
driveListSelect();
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}
}//GEN-LAST:event_driveListMouseReleased
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton browseButton; private javax.swing.JButton browseButton;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JList<String> driveList; private javax.swing.JList<String> driveList;
private javax.swing.JScrollPane driveListScrollPane; private javax.swing.JScrollPane driveListScrollPane;
private javax.swing.JScrollPane imageScrollPane; private javax.swing.JScrollPane imageScrollPane;
private javax.swing.JTable imageTable; private javax.swing.JTable imageTable;
private javax.swing.JLabel jLabel1; private javax.swing.JRadioButton importRadioButton;
private javax.swing.JLabel jLabel6; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator2;
private javax.swing.JLabel messageLabel; private javax.swing.JRadioButton manualRadioButton;
private javax.swing.JButton scanButton; private javax.swing.JTextArea messageTextArea;
private javax.swing.JLabel selectAcquisitionFromDriveLabel; private javax.swing.JTextField pathTextField;
private javax.swing.JButton refreshButton;
private javax.swing.JLabel selectDriveLabel; private javax.swing.JLabel selectDriveLabel;
private javax.swing.JLabel topLabel; private javax.swing.JLabel selectFolderLabel;
private javax.swing.JLabel selectFromDriveLabel;
private org.jdesktop.beansbinding.BindingGroup bindingGroup;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
public void reset() { public void reset() {
//reset the UI elements to default //reset the UI elements to default
choosenImageDirPath = null; choosenImageDirPath = null;
setNormalMessage("");
driveList.setListData(EMPTY_LIST_DATA); driveList.setListData(EMPTY_LIST_DATA);
clearImageTable(); clearImageTable();
setNormalMessage(Bundle.LogicalImagerPanel_messageLabel_clickScanOrBrowse()); if (importRadioButton.isSelected()) {
refreshButton.doClick();
}
} }
/** /**
@ -488,10 +582,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
return choosenImageDirPath; return choosenImageDirPath;
} }
public void setMessageLabel(String message) {
messageLabel.setText(message);
}
@Override @Override
public void insertUpdate(DocumentEvent e) { public void insertUpdate(DocumentEvent e) {
} }

View File

@ -88,7 +88,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
* @return caseName the case name from the case name text field * @return caseName the case name from the case name text field
*/ */
String getCaseName() { String getCaseName() {
return this.caseNameTextField.getText(); return this.caseNameTextField.getText().trim();
} }
/** /**
@ -109,7 +109,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
* @return baseDirectory the base directory from the case dir text field * @return baseDirectory the base directory from the case dir text field
*/ */
String getCaseParentDir() { String getCaseParentDir() {
String parentDir = this.caseParentDirTextField.getText(); String parentDir = this.caseParentDirTextField.getText().trim();
if (parentDir.endsWith(File.separator) == false) { if (parentDir.endsWith(File.separator) == false) {
parentDir = parentDir + File.separator; parentDir = parentDir + File.separator;
} }

View File

@ -58,8 +58,6 @@ public class ContentViewerTagManager {
* generic tag data instance T will be automatically serialized into a * generic tag data instance T will be automatically serialized into a
* storable format. * storable format.
* *
* @param <T> Generic class type that will be serialized into a storable
* format for persistence.
* @param contentTag ContentTag that this ContentViewerTag is associated * @param contentTag ContentTag that this ContentViewerTag is associated
* with (1:1). * with (1:1).
* @param tagDataBean Data instance that contains the tag information to be * @param tagDataBean Data instance that contains the tag information to be
@ -95,8 +93,6 @@ public class ContentViewerTagManager {
* Updates the ContentViewerTag instance with the new tag data T and * Updates the ContentViewerTag instance with the new tag data T and
* persists the changes to the case database. * persists the changes to the case database.
* *
* @param <T> Generic class type that will be serialized into a storable
* format.
* @param oldTag ContentViewerTag instance to be updated * @param oldTag ContentViewerTag instance to be updated
* @param tagDataBean Data instance that contains the updated information to * @param tagDataBean Data instance that contains the updated information to
* be persisted. * be persisted.
@ -130,8 +126,6 @@ public class ContentViewerTagManager {
* details of the tag should be passed so that automatic binding can take * details of the tag should be passed so that automatic binding can take
* place. * place.
* *
* @param <T> Generic class type that will be instantiated and filled in
* with data.
* @param contentTag ContentTag that this ContentViewerTag is associated * @param contentTag ContentTag that this ContentViewerTag is associated
* with (1:1) * with (1:1)
* @param clazz Generic class that will be instantiated and filled in with * @param clazz Generic class that will be instantiated and filled in with

View File

@ -122,7 +122,7 @@ public final class AccountsBrowser extends JPanel implements ExplorerManager.Pro
final int rows = Math.min(100, outline.getRowCount()); final int rows = Math.min(100, outline.getRowCount());
for (int column = 0; column < outline.getModel().getColumnCount(); column++) { for (int column = 0; column < outline.getColumnCount(); column++) {
int columnWidthLimit = 500; int columnWidthLimit = 500;
int columnWidth = 0; int columnWidth = 0;

View File

@ -11,6 +11,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <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> </AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
@ -28,7 +29,7 @@
</AccessibilityProperties> </AccessibilityProperties>
<Constraints> <Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="15" insetsRight="15" anchor="18" weightX="1.0" weightY="1.0"/> <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="15" insetsRight="15" anchor="18" weightX="0.75" weightY="1.0"/>
</Constraint> </Constraint>
</Constraints> </Constraints>
@ -65,14 +66,9 @@
</SubComponents> </SubComponents>
</Container> </Container>
<Component class="org.sleuthkit.autopsy.communications.FiltersPanel" name="filtersPane"> <Component class="org.sleuthkit.autopsy.communications.FiltersPanel" name="filtersPane">
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[256, 495]"/>
</Property>
</Properties>
<Constraints> <Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="15" insetsBottom="15" insetsRight="5" anchor="18" weightX="0.0" weightY="1.0"/> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="15" insetsBottom="15" insetsRight="5" anchor="18" weightX="0.25" weightY="1.0"/>
</Constraint> </Constraint>
</Constraints> </Constraints>
</Component> </Component>

View File

@ -112,18 +112,18 @@ public final class CVTTopComponent extends TopComponent {
gridBagConstraints.gridy = 0; gridBagConstraints.gridy = 0;
gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0; gridBagConstraints.weightx = 0.75;
gridBagConstraints.weighty = 1.0; gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new Insets(15, 0, 15, 15); gridBagConstraints.insets = new Insets(15, 0, 15, 15);
add(browseVisualizeTabPane, gridBagConstraints); add(browseVisualizeTabPane, gridBagConstraints);
browseVisualizeTabPane.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName")); // NOI18N browseVisualizeTabPane.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName")); // NOI18N
filtersPane.setMinimumSize(new Dimension(256, 495));
gridBagConstraints = new GridBagConstraints(); gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0; gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0; gridBagConstraints.gridy = 0;
gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 0.25;
gridBagConstraints.weighty = 1.0; gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new Insets(15, 15, 15, 5); gridBagConstraints.insets = new Insets(15, 15, 15, 5);
add(filtersPane, gridBagConstraints); add(filtersPane, gridBagConstraints);

View File

@ -11,493 +11,487 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="18"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="18"/>
<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,-54,0,0,1,-40"/>
</AuxValues> </AuxValues>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="devicesPane" max="32767" attributes="0"/>
<Component id="accountTypesPane" alignment="1" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="filtersTitleLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="applyFiltersButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="refreshButton" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="dateRangePane" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="needsRefreshLabel" max="32767" attributes="0"/>
</Group>
<Component id="limitPane" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="filtersTitleLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="applyFiltersButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="refreshButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="needsRefreshLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Component id="devicesPane" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="accountTypesPane" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="dateRangePane" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="limitPane" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JButton" name="applyFiltersButton"> <Container class="javax.swing.JPanel" name="topPane">
<Properties> <Constraints>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/tick.png"/> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="24" weightX="1.0" weightY="0.0"/>
</Property> </Constraint>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Constraints>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.applyFiltersButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="filtersTitleLabel">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/funnel.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.filtersTitleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="accountTypesPane">
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="accountTypesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="accountTypeRequiredLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="unCheckAllAccountTypesButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkAllAccountTypesButton" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
<Component id="accountTypesScrollPane" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="accountTypesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="accountTypeRequiredLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="accountTypesScrollPane" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="checkAllAccountTypesButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="unCheckAllAccountTypesButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JButton" name="unCheckAllAccountTypesButton"> <Component class="javax.swing.JLabel" name="filtersTitleLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.unCheckAllAccountTypesButton.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="unCheckAllAccountTypesButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="accountTypesLabel">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/accounts.png"/> <Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/funnel.png"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.accountTypesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.filtersTitleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component> </Component>
<Component class="javax.swing.JButton" name="checkAllAccountTypesButton"> <Component class="javax.swing.JButton" name="refreshButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.checkAllAccountTypesButton.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="checkAllAccountTypesButtonActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="accountTypesScrollPane">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2, 200]"/>
</Property>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="accountTypeListPane">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
<Property name="axis" type="int" value="1"/>
</Layout>
</Container>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="accountTypeRequiredLabel">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/> <Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.accountTypeRequiredLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.refreshButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="applyFiltersButton">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/tick.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.applyFiltersButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="needsRefreshLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.needsRefreshLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/> <Color blue="0" green="0" red="ff" type="rgb"/>
</Property> </Property>
<Property name="horizontalTextPosition" type="int" value="2"/>
</Properties> </Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JPanel" name="devicesPane"> <Container class="javax.swing.JScrollPane" name="scrollPane">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/>
</Constraint>
</Constraints>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="devicesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="deviceRequiredLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="unCheckAllDevicesButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkAllDevicesButton" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
<Component id="devicesScrollPane" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="devicesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="deviceRequiredLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="devicesScrollPane" pref="94" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="checkAllDevicesButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="unCheckAllDevicesButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="5" pref="5" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JButton" name="unCheckAllDevicesButton"> <Container class="javax.swing.JPanel" name="mainPanel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.unCheckAllDevicesButton.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="unCheckAllDevicesButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="devicesLabel">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/image.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.devicesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="checkAllDevicesButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.checkAllDevicesButton.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="checkAllDevicesButtonActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="devicesScrollPane">
<Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 75]"/>
</Property>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents> <SubComponents>
<Container class="javax.swing.JPanel" name="devicesListPane"> <Container class="javax.swing.JPanel" name="limitPane">
<Properties> <Constraints>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Dimension value="[4, 100]"/> <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="15" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/>
</Property> </Constraint>
</Properties> </Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<Property name="axis" type="int" value="1"/> <SubComponents>
</Layout> <Component class="javax.swing.JLabel" name="mostRecentLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.mostRecentLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="0" insetsRight="9" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JComboBox" name="limitComboBox">
<Properties>
<Property name="editable" type="boolean" value="true"/>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="6">
<StringItem index="0" value="All"/>
<StringItem index="1" value="10000"/>
<StringItem index="2" value="5000"/>
<StringItem index="3" value="1000"/>
<StringItem index="4" value="500"/>
<StringItem index="5" value="100"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="limitComboBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="limitTitlePanel">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="9" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JLabel" name="limitHeaderLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.limitHeaderLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="limitErrorMsgLabel">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.limitErrorMsgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="horizontalTextPosition" type="int" value="10"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container> </Container>
</SubComponents> <Container class="javax.swing.JPanel" name="dateRangePane">
</Container> <Constraints>
<Component class="javax.swing.JLabel" name="deviceRequiredLabel"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Properties> <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> </Constraint>
<Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/> </Constraints>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.deviceRequiredLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="horizontalTextPosition" type="int" value="2"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="dateRangePane">
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="dateRangeLabel" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0"> <Component id="dateRangeLabel" min="-2" max="-2" attributes="0"/>
<Component id="endCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/> <Group type="102" attributes="0">
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="endDatePicker" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0">
</Group> <Group type="102" alignment="1" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Component id="endCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/>
<Component id="startCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/> <Component id="endDatePicker" min="-2" max="-2" attributes="0"/>
<Component id="startDatePicker" min="-2" max="-2" attributes="0"/> </Group>
<Group type="102" alignment="0" attributes="0">
<Component id="startCheckBox" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
<Component id="startDatePicker" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group> </Group>
</Group> </Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="dateRangeLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="startDatePicker" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="startCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="endDatePicker" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="endCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group> </Group>
</Group> </Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> </DimensionLayout>
</Group> </Layout>
</Group> <SubComponents>
</DimensionLayout> <Component class="com.github.lgooddatepicker.components.DatePicker" name="startDatePicker">
<DimensionLayout dim="1"> <Properties>
<Group type="103" groupAlignment="0" attributes="0"> <Property name="enabled" type="boolean" value="false"/>
<Group type="102" alignment="0" attributes="0"> </Properties>
<Component id="dateRangeLabel" min="-2" max="-2" attributes="0"/> </Component>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/> <Component class="javax.swing.JLabel" name="dateRangeLabel">
<Group type="103" groupAlignment="3" attributes="0"> <Properties>
<Component id="startDatePicker" alignment="3" min="-2" max="-2" attributes="0"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Component id="startCheckBox" alignment="3" min="-2" max="-2" attributes="0"/> <Image iconType="3" name="/org/sleuthkit/autopsy/images/calendar.png"/>
</Group> </Property>
<EmptySpace max="-2" attributes="0"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Group type="103" groupAlignment="3" attributes="0"> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.dateRangeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Component id="endDatePicker" alignment="3" min="-2" max="-2" attributes="0"/> </Property>
<Component id="endCheckBox" alignment="3" min="-2" max="-2" attributes="0"/> </Properties>
</Group> </Component>
</Group> <Component class="javax.swing.JCheckBox" name="startCheckBox">
</Group> <Properties>
</DimensionLayout> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
</Layout> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.startCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<SubComponents> </Property>
<Component class="com.github.lgooddatepicker.components.DatePicker" name="startDatePicker"> </Properties>
<Properties> <Events>
<Property name="enabled" type="boolean" value="false"/> <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="startCheckBoxStateChanged"/>
</Properties> </Events>
</Component> </Component>
<Component class="javax.swing.JLabel" name="dateRangeLabel"> <Component class="javax.swing.JCheckBox" name="endCheckBox">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/calendar.png"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.endCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Properties>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.dateRangeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Events>
</Property> <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="endCheckBoxStateChanged"/>
</Properties> </Events>
</Component> </Component>
<Component class="javax.swing.JCheckBox" name="startCheckBox"> <Component class="com.github.lgooddatepicker.components.DatePicker" name="endDatePicker">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="enabled" type="boolean" value="false"/>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.startCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </Properties>
</Property> </Component>
</Properties> </SubComponents>
<Events> </Container>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="startCheckBoxStateChanged"/> <Container class="javax.swing.JPanel" name="devicesPane">
</Events> <Constraints>
</Component> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Component class="javax.swing.JCheckBox" name="endCheckBox"> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="100" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
<Properties> </Constraint>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Constraints>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.endCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="endCheckBoxStateChanged"/>
</Events>
</Component>
<Component class="com.github.lgooddatepicker.components.DatePicker" name="endDatePicker">
<Properties>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="refreshButton">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.refreshButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="needsRefreshLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.needsRefreshLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<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>
<Container class="javax.swing.JPanel" name="limitPane">
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<DimensionLayout dim="0"> <SubComponents>
<Group type="103" groupAlignment="0" attributes="0"> <Component class="javax.swing.JButton" name="unCheckAllDevicesButton">
<Group type="102" alignment="0" attributes="0"> <Properties>
<Component id="limitHeaderLabel" min="-2" max="-2" attributes="0"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<EmptySpace max="32767" attributes="0"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.unCheckAllDevicesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Component id="limitErrorMsgLabel" min="-2" max="-2" attributes="0"/> </Property>
<EmptySpace max="-2" attributes="0"/> </Properties>
</Group> <Events>
<Group type="102" alignment="0" attributes="0"> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="unCheckAllDevicesButtonActionPerformed"/>
<EmptySpace max="-2" attributes="0"/> </Events>
<Component id="mostRecentLabel" min="-2" max="-2" attributes="0"/> <Constraints>
<EmptySpace max="-2" attributes="0"/> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Component id="limitComboBox" min="-2" max="-2" attributes="0"/> <GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="12" weightX="1.0" weightY="0.0"/>
<EmptySpace max="32767" attributes="0"/> </Constraint>
</Group> </Constraints>
</Group> </Component>
</DimensionLayout> <Component class="javax.swing.JLabel" name="devicesLabel">
<DimensionLayout dim="1"> <Properties>
<Group type="103" groupAlignment="0" attributes="0"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Group type="102" alignment="0" attributes="0"> <Image iconType="3" name="/org/sleuthkit/autopsy/images/image.png"/>
<EmptySpace max="-2" attributes="0"/> </Property>
<Group type="103" groupAlignment="3" attributes="0"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Component id="limitHeaderLabel" alignment="3" min="-2" max="-2" attributes="0"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.devicesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Component id="limitErrorMsgLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Property>
</Group> </Properties>
<EmptySpace max="-2" attributes="0"/> <Constraints>
<Group type="103" groupAlignment="3" attributes="0"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Component id="mostRecentLabel" alignment="3" min="-2" max="-2" attributes="0"/> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="9" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
<Component id="limitComboBox" alignment="3" min="-2" max="-2" attributes="0"/> </Constraint>
</Group> </Constraints>
<EmptySpace min="0" pref="32" max="32767" attributes="0"/> </Component>
</Group> <Component class="javax.swing.JButton" name="checkAllDevicesButton">
</Group> <Properties>
</DimensionLayout> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
</Layout> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.checkAllDevicesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<SubComponents> </Property>
<Component class="javax.swing.JLabel" name="limitHeaderLabel"> </Properties>
<Properties> <Events>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkAllDevicesButtonActionPerformed"/>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.limitHeaderLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </Events>
</Property> <Constraints>
</Properties> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
</Component> <GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
<Component class="javax.swing.JLabel" name="mostRecentLabel"> </Constraint>
<Properties> </Constraints>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Component>
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.mostRecentLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Container class="javax.swing.JScrollPane" name="devicesScrollPane">
</Property> <Properties>
</Properties> <Property name="horizontalScrollBarPolicy" type="int" value="31"/>
</Component> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Component class="javax.swing.JComboBox" name="limitComboBox"> <Dimension value="[27, 75]"/>
<Properties> </Property>
<Property name="editable" type="boolean" value="true"/> </Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> <Constraints>
<StringArray count="6"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<StringItem index="0" value="All"/> <GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/>
<StringItem index="1" value="10000"/> </Constraint>
<StringItem index="2" value="5000"/> </Constraints>
<StringItem index="3" value="1000"/>
<StringItem index="4" value="500"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<StringItem index="5" value="100"/> <SubComponents>
</StringArray> <Container class="javax.swing.JPanel" name="devicesListPane">
</Property> <Properties>
</Properties> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Events> <Dimension value="[4, 100]"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="limitComboBoxActionPerformed"/> </Property>
</Events> </Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
</AuxValues> <Property name="axis" type="int" value="1"/>
</Component> </Layout>
<Component class="javax.swing.JLabel" name="limitErrorMsgLabel"> </Container>
<Properties> </SubComponents>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> </Container>
<Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/> <Component class="javax.swing.JLabel" name="deviceRequiredLabel">
</Property> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.limitErrorMsgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/>
</Property> </Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Color blue="0" green="0" red="ff" type="rgb"/> <ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.deviceRequiredLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="horizontalTextPosition" type="int" value="10"/> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
</Properties> <Color blue="0" green="0" red="ff" type="rgb"/>
</Component> </Property>
<Property name="horizontalTextPosition" type="int" value="2"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="9" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="accountTypesPane">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="unCheckAllAccountTypesButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.unCheckAllAccountTypesButton.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="unCheckAllAccountTypesButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="12" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="accountTypesLabel">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/accounts.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.accountTypesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="checkAllAccountTypesButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.checkAllAccountTypesButton.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="checkAllAccountTypesButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JScrollPane" name="accountTypesScrollPane">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2, 200]"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="accountTypeListPane">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
<Property name="axis" type="int" value="1"/>
</Layout>
</Container>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="accountTypeRequiredLabel">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/error-icon-16.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/Bundle.properties" key="FiltersPanel.accountTypeRequiredLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="horizontalTextPosition" type="int" value="2"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents> </SubComponents>
</Container> </Container>
</SubComponents> </SubComponents>

View File

@ -394,135 +394,123 @@ final public class FiltersPanel extends JPanel {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// <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() {
java.awt.GridBagConstraints gridBagConstraints;
applyFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/tick.png"))); // NOI18N setLayout(new java.awt.GridBagLayout());
applyFiltersButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.applyFiltersButton.text")); // NOI18N
applyFiltersButton.setPreferredSize(null); topPane.setLayout(new java.awt.GridBagLayout());
filtersTitleLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/funnel.png"))); // NOI18N filtersTitleLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/funnel.png"))); // NOI18N
filtersTitleLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.filtersTitleLabel.text")); // NOI18N filtersTitleLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.filtersTitleLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
topPane.add(filtersTitleLabel, gridBagConstraints);
unCheckAllAccountTypesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.unCheckAllAccountTypesButton.text")); // NOI18N refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
unCheckAllAccountTypesButton.addActionListener(new java.awt.event.ActionListener() { refreshButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.refreshButton.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
topPane.add(refreshButton, gridBagConstraints);
applyFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/tick.png"))); // NOI18N
applyFiltersButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.applyFiltersButton.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
topPane.add(applyFiltersButton, gridBagConstraints);
needsRefreshLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.needsRefreshLabel.text")); // NOI18N
needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
topPane.add(needsRefreshLabel, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
gridBagConstraints.weightx = 1.0;
add(topPane, gridBagConstraints);
scrollPane.setBorder(null);
mainPanel.setLayout(new java.awt.GridBagLayout());
limitPane.setLayout(new java.awt.GridBagLayout());
mostRecentLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.mostRecentLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 9, 0, 9);
limitPane.add(mostRecentLabel, gridBagConstraints);
limitComboBox.setEditable(true);
limitComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "All", "10000", "5000", "1000", "500", "100" }));
limitComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
unCheckAllAccountTypesButtonActionPerformed(evt); limitComboBoxActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
limitPane.add(limitComboBox, gridBagConstraints);
accountTypesLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/accounts.png"))); // NOI18N limitTitlePanel.setLayout(new java.awt.GridBagLayout());
accountTypesLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.accountTypesLabel.text")); // NOI18N
checkAllAccountTypesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.checkAllAccountTypesButton.text")); // NOI18N limitHeaderLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.limitHeaderLabel.text")); // NOI18N
checkAllAccountTypesButton.addActionListener(new java.awt.event.ActionListener() { gridBagConstraints = new java.awt.GridBagConstraints();
public void actionPerformed(java.awt.event.ActionEvent evt) { gridBagConstraints.gridx = 0;
checkAllAccountTypesButtonActionPerformed(evt); gridBagConstraints.gridy = 0;
} gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
}); gridBagConstraints.weightx = 1.0;
limitTitlePanel.add(limitHeaderLabel, gridBagConstraints);
accountTypesScrollPane.setPreferredSize(new java.awt.Dimension(2, 200)); limitErrorMsgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N
limitErrorMsgLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.limitErrorMsgLabel.text")); // NOI18N
limitErrorMsgLabel.setForeground(new java.awt.Color(255, 0, 0));
limitErrorMsgLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
limitTitlePanel.add(limitErrorMsgLabel, gridBagConstraints);
accountTypeListPane.setLayout(new javax.swing.BoxLayout(accountTypeListPane, javax.swing.BoxLayout.Y_AXIS)); gridBagConstraints = new java.awt.GridBagConstraints();
accountTypesScrollPane.setViewportView(accountTypeListPane); gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 9, 0);
limitPane.add(limitTitlePanel, gridBagConstraints);
accountTypeRequiredLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints();
accountTypeRequiredLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.accountTypeRequiredLabel.text")); // NOI18N gridBagConstraints.gridx = 0;
accountTypeRequiredLabel.setForeground(new java.awt.Color(255, 0, 0)); gridBagConstraints.gridy = 3;
accountTypeRequiredLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
javax.swing.GroupLayout accountTypesPaneLayout = new javax.swing.GroupLayout(accountTypesPane); gridBagConstraints.weightx = 1.0;
accountTypesPane.setLayout(accountTypesPaneLayout); gridBagConstraints.weighty = 1.0;
accountTypesPaneLayout.setHorizontalGroup( gridBagConstraints.insets = new java.awt.Insets(15, 0, 15, 0);
accountTypesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) mainPanel.add(limitPane, gridBagConstraints);
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, accountTypesPaneLayout.createSequentialGroup()
.addGroup(accountTypesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(accountTypesPaneLayout.createSequentialGroup()
.addComponent(accountTypesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(accountTypeRequiredLabel))
.addGroup(accountTypesPaneLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(unCheckAllAccountTypesButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(checkAllAccountTypesButton))
.addGroup(accountTypesPaneLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(accountTypesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGap(0, 0, 0))
);
accountTypesPaneLayout.setVerticalGroup(
accountTypesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(accountTypesPaneLayout.createSequentialGroup()
.addGroup(accountTypesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(accountTypesLabel)
.addComponent(accountTypeRequiredLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(accountTypesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(accountTypesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(checkAllAccountTypesButton)
.addComponent(unCheckAllAccountTypesButton)))
);
unCheckAllDevicesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.unCheckAllDevicesButton.text")); // NOI18N
unCheckAllDevicesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
unCheckAllDevicesButtonActionPerformed(evt);
}
});
devicesLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/image.png"))); // NOI18N
devicesLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.devicesLabel.text")); // NOI18N
checkAllDevicesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.checkAllDevicesButton.text")); // NOI18N
checkAllDevicesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkAllDevicesButtonActionPerformed(evt);
}
});
devicesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
devicesScrollPane.setMinimumSize(new java.awt.Dimension(27, 75));
devicesListPane.setMinimumSize(new java.awt.Dimension(4, 100));
devicesListPane.setLayout(new javax.swing.BoxLayout(devicesListPane, javax.swing.BoxLayout.Y_AXIS));
devicesScrollPane.setViewportView(devicesListPane);
deviceRequiredLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N
deviceRequiredLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.deviceRequiredLabel.text")); // NOI18N
deviceRequiredLabel.setForeground(new java.awt.Color(255, 0, 0));
deviceRequiredLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
javax.swing.GroupLayout devicesPaneLayout = new javax.swing.GroupLayout(devicesPane);
devicesPane.setLayout(devicesPaneLayout);
devicesPaneLayout.setHorizontalGroup(
devicesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(devicesPaneLayout.createSequentialGroup()
.addComponent(devicesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(deviceRequiredLabel))
.addGroup(devicesPaneLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(unCheckAllDevicesButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(checkAllDevicesButton))
.addGroup(devicesPaneLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(devicesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
devicesPaneLayout.setVerticalGroup(
devicesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(devicesPaneLayout.createSequentialGroup()
.addGroup(devicesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(devicesLabel)
.addComponent(deviceRequiredLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(devicesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(devicesPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(checkAllDevicesButton)
.addComponent(unCheckAllDevicesButton))
.addGap(5, 5, 5))
);
startDatePicker.setEnabled(false); startDatePicker.setEnabled(false);
@ -582,97 +570,177 @@ final public class FiltersPanel extends JPanel {
.addComponent(endCheckBox))) .addComponent(endCheckBox)))
); );
refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints();
refreshButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.refreshButton.text")); // NOI18N gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
mainPanel.add(dateRangePane, gridBagConstraints);
needsRefreshLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.needsRefreshLabel.text")); // NOI18N devicesPane.setLayout(new java.awt.GridBagLayout());
needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
limitHeaderLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.limitHeaderLabel.text")); // NOI18N unCheckAllDevicesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.unCheckAllDevicesButton.text")); // NOI18N
unCheckAllDevicesButton.addActionListener(new java.awt.event.ActionListener() {
mostRecentLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.mostRecentLabel.text")); // NOI18N
limitComboBox.setEditable(true);
limitComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "All", "10000", "5000", "1000", "500", "100" }));
limitComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
limitComboBoxActionPerformed(evt); unCheckAllDevicesButtonActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 9);
devicesPane.add(unCheckAllDevicesButton, gridBagConstraints);
limitErrorMsgLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N devicesLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/image.png"))); // NOI18N
limitErrorMsgLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.limitErrorMsgLabel.text")); // NOI18N devicesLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.devicesLabel.text")); // NOI18N
limitErrorMsgLabel.setForeground(new java.awt.Color(255, 0, 0)); gridBagConstraints = new java.awt.GridBagConstraints();
limitErrorMsgLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 9, 0);
devicesPane.add(devicesLabel, gridBagConstraints);
javax.swing.GroupLayout limitPaneLayout = new javax.swing.GroupLayout(limitPane); checkAllDevicesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.checkAllDevicesButton.text")); // NOI18N
limitPane.setLayout(limitPaneLayout); checkAllDevicesButton.addActionListener(new java.awt.event.ActionListener() {
limitPaneLayout.setHorizontalGroup( public void actionPerformed(java.awt.event.ActionEvent evt) {
limitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) checkAllDevicesButtonActionPerformed(evt);
.addGroup(limitPaneLayout.createSequentialGroup() }
.addComponent(limitHeaderLabel) });
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) gridBagConstraints = new java.awt.GridBagConstraints();
.addComponent(limitErrorMsgLabel) gridBagConstraints.gridx = 2;
.addContainerGap()) gridBagConstraints.gridy = 2;
.addGroup(limitPaneLayout.createSequentialGroup() gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
.addContainerGap() gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 0);
.addComponent(mostRecentLabel) devicesPane.add(checkAllDevicesButton, gridBagConstraints);
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(limitComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
limitPaneLayout.setVerticalGroup(
limitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(limitPaneLayout.createSequentialGroup()
.addContainerGap()
.addGroup(limitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(limitHeaderLabel)
.addComponent(limitErrorMsgLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(limitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(mostRecentLabel)
.addComponent(limitComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 32, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); devicesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
this.setLayout(layout); devicesScrollPane.setMinimumSize(new java.awt.Dimension(27, 75));
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) devicesListPane.setMinimumSize(new java.awt.Dimension(4, 100));
.addComponent(devicesPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) devicesListPane.setLayout(new javax.swing.BoxLayout(devicesListPane, javax.swing.BoxLayout.Y_AXIS));
.addComponent(accountTypesPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) devicesScrollPane.setViewportView(devicesListPane);
.addGroup(layout.createSequentialGroup()
.addComponent(filtersTitleLabel) gridBagConstraints = new java.awt.GridBagConstraints();
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) gridBagConstraints.gridx = 0;
.addComponent(applyFiltersButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints.gridy = 1;
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) gridBagConstraints.gridwidth = 3;
.addComponent(refreshButton)) gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
.addComponent(dateRangePane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
.addGroup(layout.createSequentialGroup() gridBagConstraints.weightx = 1.0;
.addContainerGap() gridBagConstraints.weighty = 1.0;
.addComponent(needsRefreshLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) devicesPane.add(devicesScrollPane, gridBagConstraints);
.addComponent(limitPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
); deviceRequiredLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N
layout.setVerticalGroup( deviceRequiredLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.deviceRequiredLabel.text")); // NOI18N
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) deviceRequiredLabel.setForeground(new java.awt.Color(255, 0, 0));
.addGroup(layout.createSequentialGroup() deviceRequiredLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
.addGap(0, 0, 0) gridBagConstraints = new java.awt.GridBagConstraints();
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) gridBagConstraints.gridx = 1;
.addComponent(filtersTitleLabel) gridBagConstraints.gridy = 0;
.addComponent(applyFiltersButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints.gridwidth = 2;
.addComponent(refreshButton)) gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) gridBagConstraints.insets = new java.awt.Insets(0, 0, 9, 0);
.addComponent(needsRefreshLabel) devicesPane.add(deviceRequiredLabel, gridBagConstraints);
.addGap(4, 4, 4)
.addComponent(devicesPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints = new java.awt.GridBagConstraints();
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) gridBagConstraints.gridx = 0;
.addComponent(accountTypesPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints.gridy = 0;
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
.addComponent(dateRangePane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints.ipady = 100;
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
.addComponent(limitPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) gridBagConstraints.weightx = 1.0;
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
); mainPanel.add(devicesPane, gridBagConstraints);
accountTypesPane.setLayout(new java.awt.GridBagLayout());
unCheckAllAccountTypesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.unCheckAllAccountTypesButton.text")); // NOI18N
unCheckAllAccountTypesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
unCheckAllAccountTypesButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 9);
accountTypesPane.add(unCheckAllAccountTypesButton, gridBagConstraints);
accountTypesLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/accounts.png"))); // NOI18N
accountTypesLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.accountTypesLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
accountTypesPane.add(accountTypesLabel, gridBagConstraints);
checkAllAccountTypesButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.checkAllAccountTypesButton.text")); // NOI18N
checkAllAccountTypesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkAllAccountTypesButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 0);
accountTypesPane.add(checkAllAccountTypesButton, gridBagConstraints);
accountTypesScrollPane.setPreferredSize(new java.awt.Dimension(2, 200));
accountTypeListPane.setLayout(new javax.swing.BoxLayout(accountTypeListPane, javax.swing.BoxLayout.Y_AXIS));
accountTypesScrollPane.setViewportView(accountTypeListPane);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 0);
accountTypesPane.add(accountTypesScrollPane, gridBagConstraints);
accountTypeRequiredLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/error-icon-16.png"))); // NOI18N
accountTypeRequiredLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.accountTypeRequiredLabel.text")); // NOI18N
accountTypeRequiredLabel.setForeground(new java.awt.Color(255, 0, 0));
accountTypeRequiredLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
accountTypesPane.add(accountTypeRequiredLabel, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
mainPanel.add(accountTypesPane, gridBagConstraints);
scrollPane.setViewportView(mainPanel);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(scrollPane, gridBagConstraints);
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
/** /**
@ -933,11 +1001,15 @@ final public class FiltersPanel extends JPanel {
private final javax.swing.JLabel limitErrorMsgLabel = new javax.swing.JLabel(); private final javax.swing.JLabel limitErrorMsgLabel = new javax.swing.JLabel();
private final javax.swing.JLabel limitHeaderLabel = new javax.swing.JLabel(); private final javax.swing.JLabel limitHeaderLabel = new javax.swing.JLabel();
private final javax.swing.JPanel limitPane = new javax.swing.JPanel(); private final javax.swing.JPanel limitPane = new javax.swing.JPanel();
private final javax.swing.JPanel limitTitlePanel = new javax.swing.JPanel();
private final javax.swing.JPanel mainPanel = new javax.swing.JPanel();
private final javax.swing.JLabel mostRecentLabel = new javax.swing.JLabel(); private final javax.swing.JLabel mostRecentLabel = new javax.swing.JLabel();
private final javax.swing.JLabel needsRefreshLabel = new javax.swing.JLabel(); private final javax.swing.JLabel needsRefreshLabel = new javax.swing.JLabel();
private final javax.swing.JButton refreshButton = new javax.swing.JButton(); private final javax.swing.JButton refreshButton = new javax.swing.JButton();
private final javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane();
private final javax.swing.JCheckBox startCheckBox = new javax.swing.JCheckBox(); private final javax.swing.JCheckBox startCheckBox = new javax.swing.JCheckBox();
private final com.github.lgooddatepicker.components.DatePicker startDatePicker = new com.github.lgooddatepicker.components.DatePicker(); private final com.github.lgooddatepicker.components.DatePicker startDatePicker = new com.github.lgooddatepicker.components.DatePicker();
private final javax.swing.JPanel topPane = new javax.swing.JPanel();
private final javax.swing.JButton unCheckAllAccountTypesButton = new javax.swing.JButton(); private final javax.swing.JButton unCheckAllAccountTypesButton = new javax.swing.JButton();
private final javax.swing.JButton unCheckAllDevicesButton = new javax.swing.JButton(); private final javax.swing.JButton unCheckAllDevicesButton = new javax.swing.JButton();
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables

View File

@ -11,30 +11,8 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <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> </AuxValues>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="htmlPanel" max="32767" attributes="0"/>
<EmptySpace min="-2" 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 min="-2" max="-2" attributes="0"/>
<Component id="htmlPanel" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="org.sleuthkit.autopsy.contentviewers.HtmlPanel" name="htmlPanel">
</Component>
</SubComponents>
</Form> </Form>

View File

@ -37,17 +37,18 @@ final class HtmlViewer extends javax.swing.JPanel implements FileTypeViewer {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(HtmlViewer.class.getName()); private static final Logger logger = Logger.getLogger(HtmlViewer.class.getName());
private static final String[] SUPPORTED_MIMETYPES = new String[]{ private static final String[] SUPPORTED_MIMETYPES = new String[]{
"text/html", "text/html",
"application/xhtml+xml" "application/xhtml+xml"
}; };
private final org.sleuthkit.autopsy.contentviewers.HtmlPanel htmlPanel = new org.sleuthkit.autopsy.contentviewers.HtmlPanel();
/** /**
* Creates new form HtmlViewerPanel * Creates new form HtmlViewerPanel
*/ */
HtmlViewer() { HtmlViewer() {
initComponents(); initComponents();
this.add(htmlPanel);
} }
/** /**
@ -81,31 +82,12 @@ final class HtmlViewer extends javax.swing.JPanel implements FileTypeViewer {
// <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() {
htmlPanel = new org.sleuthkit.autopsy.contentviewers.HtmlPanel(); setLayout(new java.awt.BorderLayout());
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(htmlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(htmlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private org.sleuthkit.autopsy.contentviewers.HtmlPanel htmlPanel;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
@Override @Override
public List<String> getSupportedMIMETypes() { public List<String> getSupportedMIMETypes() {
return Arrays.asList(SUPPORTED_MIMETYPES); return Arrays.asList(SUPPORTED_MIMETYPES);

View File

@ -20,12 +20,12 @@ package org.sleuthkit.autopsy.contentviewers;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
@ -866,15 +866,21 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
@Override @Override
protected Void doInBackground() { protected Void doInBackground() {
try { try {
//Retrieve content viewer tags
List<ContentTag> tags = Case.getCurrentCase().getServices() List<ContentTag> tags = Case.getCurrentCase().getServices()
.getTagsManager().getContentTagsByContent(file); .getTagsManager().getContentTagsByContent(file);
List<ContentViewerTag<ImageTagRegion>> contentViewerTags = getContentViewerTags(tags); List<ContentViewerTag<ImageTagRegion>> contentViewerTags = getContentViewerTags(tags);
//Pull out image tag regions
Collection<ImageTagRegion> regions = contentViewerTags.stream() Collection<ImageTagRegion> regions = contentViewerTags.stream()
.map(cvTag -> cvTag.getDetails()).collect(Collectors.toList()); .map(cvTag -> cvTag.getDetails()).collect(Collectors.toList());
byte[] jpgImage = ImageTagsUtility.exportTags(file, regions, ".jpg");
//Apply tags to image and write to file
BufferedImage pngImage = ImageTagsUtility.writeTags(file, regions, "png");
Path output = Paths.get(exportChooser.getSelectedFile().getPath(), Path output = Paths.get(exportChooser.getSelectedFile().getPath(),
FilenameUtils.getBaseName(file.getName()) + "-with_tags.jpg"); //NON-NLS FilenameUtils.getBaseName(file.getName()) + "-with_tags.png"); //NON-NLS
Files.write(output, jpgImage); ImageIO.write(pngImage, "png", output.toFile());
JOptionPane.showMessageDialog(null, Bundle.MediaViewImagePanel_successfulExport()); JOptionPane.showMessageDialog(null, Bundle.MediaViewImagePanel_successfulExport());
} catch (TskCoreException | NoCurrentCaseException | IOException ex) { } catch (TskCoreException | NoCurrentCaseException | IOException ex) {
LOGGER.log(Level.WARNING, "Unable to export tagged image to disk", ex); //NON-NLS LOGGER.log(Level.WARNING, "Unable to export tagged image to disk", ex); //NON-NLS

View File

@ -271,22 +271,7 @@
</Constraint> </Constraint>
</Constraints> </Constraints>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="htmlPanel" alignment="0" pref="647" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="htmlPanel" alignment="0" pref="362" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="org.sleuthkit.autopsy.contentviewers.HtmlPanel" name="htmlPanel">
</Component>
</SubComponents>
</Container> </Container>
<Container class="javax.swing.JScrollPane" name="rtfbodyScrollPane"> <Container class="javax.swing.JScrollPane" name="rtfbodyScrollPane">
<Properties> <Properties>

View File

@ -87,7 +87,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
private static final int ATTM_TAB_INDEX = 4; private static final int ATTM_TAB_INDEX = 4;
private final List<JTextComponent> textAreas; private final List<JTextComponent> textAreas;
private final org.sleuthkit.autopsy.contentviewers.HtmlPanel htmlPanel = new org.sleuthkit.autopsy.contentviewers.HtmlPanel();
/** /**
* Artifact currently being displayed * Artifact currently being displayed
*/ */
@ -101,6 +101,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
@NbBundle.Messages("MessageContentViewer.AtrachmentsPanel.title=Attachments") @NbBundle.Messages("MessageContentViewer.AtrachmentsPanel.title=Attachments")
public MessageContentViewer() { public MessageContentViewer() {
initComponents(); initComponents();
htmlPane.add(htmlPanel);
envelopePanel.setBackground(new Color(0, 0, 0, 38)); envelopePanel.setBackground(new Color(0, 0, 0, 38));
drp = DataResultPanel.createInstanceUninitialized(Bundle.MessageContentViewer_AtrachmentsPanel_title(), "", new TableFilterNode(Node.EMPTY, false), 0, null); drp = DataResultPanel.createInstanceUninitialized(Bundle.MessageContentViewer_AtrachmentsPanel_title(), "", new TableFilterNode(Node.EMPTY, false), 0, null);
attachmentsScrollPane.setViewportView(drp); attachmentsScrollPane.setViewportView(drp);
@ -153,7 +154,6 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
textbodyScrollPane = new javax.swing.JScrollPane(); textbodyScrollPane = new javax.swing.JScrollPane();
textbodyTextArea = new javax.swing.JTextArea(); textbodyTextArea = new javax.swing.JTextArea();
htmlPane = new javax.swing.JPanel(); htmlPane = new javax.swing.JPanel();
htmlPanel = new org.sleuthkit.autopsy.contentviewers.HtmlPanel();
rtfbodyScrollPane = new javax.swing.JScrollPane(); rtfbodyScrollPane = new javax.swing.JScrollPane();
rtfbodyTextPane = new javax.swing.JTextPane(); rtfbodyTextPane = new javax.swing.JTextPane();
attachmentsPanel = new javax.swing.JPanel(); attachmentsPanel = new javax.swing.JPanel();
@ -266,17 +266,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
msgbodyTabbedPane.addTab(org.openide.util.NbBundle.getMessage(MessageContentViewer.class, "MessageContentViewer.textbodyScrollPane.TabConstraints.tabTitle"), textbodyScrollPane); // NOI18N msgbodyTabbedPane.addTab(org.openide.util.NbBundle.getMessage(MessageContentViewer.class, "MessageContentViewer.textbodyScrollPane.TabConstraints.tabTitle"), textbodyScrollPane); // NOI18N
javax.swing.GroupLayout htmlPaneLayout = new javax.swing.GroupLayout(htmlPane); htmlPane.setLayout(new java.awt.BorderLayout());
htmlPane.setLayout(htmlPaneLayout);
htmlPaneLayout.setHorizontalGroup(
htmlPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(htmlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 647, Short.MAX_VALUE)
);
htmlPaneLayout.setVerticalGroup(
htmlPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(htmlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
);
msgbodyTabbedPane.addTab(org.openide.util.NbBundle.getMessage(MessageContentViewer.class, "MessageContentViewer.htmlPane.TabConstraints.tabTitle"), htmlPane); // NOI18N msgbodyTabbedPane.addTab(org.openide.util.NbBundle.getMessage(MessageContentViewer.class, "MessageContentViewer.htmlPane.TabConstraints.tabTitle"), htmlPane); // NOI18N
rtfbodyScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); rtfbodyScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
@ -357,7 +347,6 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
private javax.swing.JScrollPane headersScrollPane; private javax.swing.JScrollPane headersScrollPane;
private javax.swing.JTextArea headersTextArea; private javax.swing.JTextArea headersTextArea;
private javax.swing.JPanel htmlPane; private javax.swing.JPanel htmlPane;
private org.sleuthkit.autopsy.contentviewers.HtmlPanel htmlPanel;
private javax.swing.JTabbedPane msgbodyTabbedPane; private javax.swing.JTabbedPane msgbodyTabbedPane;
private javax.swing.JScrollPane rtfbodyScrollPane; private javax.swing.JScrollPane rtfbodyScrollPane;
private javax.swing.JTextPane rtfbodyTextPane; private javax.swing.JTextPane rtfbodyTextPane;
@ -680,18 +669,18 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
protected Sheet createSheet() { protected Sheet createSheet() {
Sheet sheet = super.createSheet(); Sheet sheet = super.createSheet();
Set<String> keepProps = new HashSet<>(Arrays.asList( Set<String> keepProps = new HashSet<>(Arrays.asList(
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.sizeColLbl"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.sizeColLbl"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.mimeType"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.mimeType"),
NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.knownColLbl"))); NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.knownColLbl")));
//Remove all other props except for the ones above //Remove all other props except for the ones above
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES); Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
for(Property<?> p : sheetSet.getProperties()) { for (Property<?> p : sheetSet.getProperties()) {
if(!keepProps.contains(p.getName())){ if (!keepProps.contains(p.getName())) {
sheetSet.remove(p.getName()); sheetSet.remove(p.getName());
} }
} }

View File

@ -41,7 +41,7 @@ public final class ImageTagCreator extends Rectangle {
//Rectangle lines should be 1.5% of the image. This level of thickness has //Rectangle lines should be 1.5% of the image. This level of thickness has
//a good balance between visual acuity and loss of selection at the borders //a good balance between visual acuity and loss of selection at the borders
//of the image. //of the image.
private final static double lineThicknessAsPercent = 1.5; private final static double LINE_THICKNESS_PERCENT = 1.5;
private final double minArea; private final double minArea;
//Used to update listeners of the new tag boundaries //Used to update listeners of the new tag boundaries
@ -68,7 +68,7 @@ public final class ImageTagCreator extends Rectangle {
//Calculate how many pixels the stroke width should be to guarentee //Calculate how many pixels the stroke width should be to guarentee
//a consistent % of image consumed by the rectangle border. //a consistent % of image consumed by the rectangle border.
double min = Math.min(image.getImage().getWidth(), image.getImage().getHeight()); double min = Math.min(image.getImage().getWidth(), image.getImage().getHeight());
double lineThicknessPixels = min * lineThicknessAsPercent / 100.0; double lineThicknessPixels = min * LINE_THICKNESS_PERCENT / 100.0;
setStrokeWidth(lineThicknessPixels); setStrokeWidth(lineThicknessPixels);
minArea = lineThicknessPixels * lineThicknessPixels; minArea = lineThicknessPixels * lineThicknessPixels;
setVisible(false); setVisible(false);

View File

@ -18,13 +18,21 @@
*/ */
package org.sleuthkit.autopsy.contentviewers.imagetagging; package org.sleuthkit.autopsy.contentviewers.imagetagging;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Collection; import java.util.Collection;
import javax.imageio.ImageIO;
import org.opencv.core.Core; import org.opencv.core.Core;
import org.opencv.core.Mat; import org.opencv.core.Mat;
import org.opencv.core.MatOfByte; import org.opencv.core.MatOfByte;
import org.opencv.core.MatOfInt;
import org.opencv.core.Point; import org.opencv.core.Point;
import org.opencv.core.Scalar; import org.opencv.core.Scalar;
import org.opencv.core.Size;
import org.opencv.highgui.Highgui; import org.opencv.highgui.Highgui;
import org.opencv.imgproc.Imgproc;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskCoreException;
@ -34,15 +42,38 @@ import org.sleuthkit.datamodel.TskCoreException;
public final class ImageTagsUtility { public final class ImageTagsUtility {
/** /**
* Embeds the tag regions into an image (represented as an AbstractFile). * Sizes for thumbnails
*/
public enum IconSize {
SMALL(50),
MEDIUM(100),
LARGE(200);
private final int SIZE;
IconSize(int size) {
this.SIZE = size;
}
public int getSize() {
return SIZE;
}
}
/**
* Embeds the tag regions into an image.
* *
* @param file Base Image * @param file Base Image
* @param tagRegions Tag regions to be saved into the image * @param tagRegions Tag regions to be saved into the image
* @param outputEncoding Output file type encoding (ex. .jpg, .png) * @param outputEncoding Format of image (jpg, png, etc). See OpenCV for
* @return output image in byte array * supported formats. Do not include a "."
* @throws TskCoreException * @return Output image as a BufferedImage
*
* @throws TskCoreException Cannot read from abstract file
* @throws IOException Could not create buffered image from OpenCV result
*/ */
public static byte[] exportTags(AbstractFile file, Collection<ImageTagRegion> tagRegions, String outputEncoding) throws TskCoreException { public static BufferedImage writeTags(AbstractFile file, Collection<ImageTagRegion> tagRegions,
String outputEncoding) throws TskCoreException, IOException {
byte[] imageInMemory = new byte[(int) file.getSize()]; byte[] imageInMemory = new byte[(int) file.getSize()];
file.read(imageInMemory, 0, file.getSize()); file.read(imageInMemory, 0, file.getSize());
Mat originalImage = Highgui.imdecode(new MatOfByte(imageInMemory), Highgui.IMREAD_UNCHANGED); Mat originalImage = Highgui.imdecode(new MatOfByte(imageInMemory), Highgui.IMREAD_UNCHANGED);
@ -58,15 +89,53 @@ public final class ImageTagsUtility {
}); });
MatOfByte matOfByte = new MatOfByte(); MatOfByte matOfByte = new MatOfByte();
Highgui.imencode(outputEncoding, originalImage, matOfByte); MatOfInt params = new MatOfInt(Highgui.IMWRITE_JPEG_QUALITY, 100);
Highgui.imencode("." + outputEncoding, originalImage, matOfByte, params);
originalImage.release(); try (ByteArrayInputStream imageStream = new ByteArrayInputStream(matOfByte.toArray())) {
byte[] output = matOfByte.toArray(); BufferedImage result = ImageIO.read(imageStream);
matOfByte.release(); originalImage.release();
matOfByte.release();
return output; return result;
}
} }
private ImageTagsUtility(){ /**
* Creates a thumbnail version of the image with tags applied.
*
* @param file Input file to apply tags & produce thumbnail from
* @param tagRegions Tags to apply
* @param iconSize Size of the output thumbnail
* @param outputEncoding Format of thumbnail (jpg, png, etc). See OpenCV for
* supported formats. Do not include a "."
* @return BufferedImage representing the thumbnail
*
* @throws TskCoreException Could not read from file
* @throws IOException Could not create buffered image from OpenCV result
*/
public static BufferedImage makeThumbnail(AbstractFile file, Collection<ImageTagRegion> tagRegions,
IconSize iconSize, String outputEncoding) throws TskCoreException, IOException {
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
BufferedImage result = writeTags(file, tagRegions, outputEncoding);
ImageIO.write(result, outputEncoding, baos);
Mat markedUpImage = Highgui.imdecode(new MatOfByte(baos.toByteArray()), Highgui.IMREAD_UNCHANGED);
Mat thumbnail = new Mat();
Size resize = new Size(iconSize.getSize(), iconSize.getSize());
Imgproc.resize(markedUpImage, thumbnail, resize);
MatOfByte matOfByte = new MatOfByte();
Highgui.imencode("." + outputEncoding, thumbnail, matOfByte);
try (ByteArrayInputStream thumbnailStream = new ByteArrayInputStream(matOfByte.toArray())) {
BufferedImage thumbnailImage = ImageIO.read(thumbnailStream);
thumbnail.release();
matOfByte.release();
markedUpImage.release();
return thumbnailImage;
}
}
}
private ImageTagsUtility() {
} }
} }

View File

@ -301,20 +301,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try { try {
/* if (rootNode != null) {
* If the given node is not null and has children, set it as the
* root context of the child OutlineView, otherwise make an
* "empty"node the root context.
*
* IMPORTANT NOTE: This is the first of many times where a
* getChildren call on the current root node causes all of the
* children of the root node to be created and defeats lazy child
* node creation, if it is enabled. It also likely leads to many
* case database round trips.
*/
if (rootNode != null && rootNode.getChildren().getNodesCount() > 0) {
this.rootNode = rootNode;
/** /**
* Check to see if we have previously created a paging support * Check to see if we have previously created a paging support
* class for this node. * class for this node.
@ -363,6 +350,21 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
// No-op // No-op
} }
}); });
}
/*
* If the given node is not null and has children, set it as the
* root context of the child OutlineView, otherwise make an
* "empty"node the root context.
*
* IMPORTANT NOTE: This is the first of many times where a
* getChildren call on the current root node causes all of the
* children of the root node to be created and defeats lazy child
* node creation, if it is enabled. It also likely leads to many
* case database round trips.
*/
if (rootNode != null && rootNode.getChildren().getNodesCount() > 0) {
this.rootNode = rootNode;
this.getExplorerManager().setRootContext(this.rootNode); this.getExplorerManager().setRootContext(this.rootNode);
setupTable(); setupTable();

View File

@ -11,217 +11,278 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <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,-119,0,0,4,73"/>
</AuxValues> </AuxValues>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="iconView" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="pageLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="pageNumLabel" min="-2" pref="95" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="pagesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="pagePrevButton" min="-2" pref="23" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="pageNextButton" min="-2" pref="23" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="goToPageLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="goToPageField" min="-2" pref="54" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
<Component id="imagesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="imagesRangeLabel" min="-2" pref="91" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="thumbnailSizeComboBox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
<Component id="sortButton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="sortLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="filePathLabel" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="2" attributes="0">
<Component id="pageLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageNumLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pagesLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pagePrevButton" alignment="2" min="-2" pref="23" max="-2" attributes="0"/>
<Component id="pageNextButton" alignment="2" min="-2" pref="23" max="-2" attributes="0"/>
<Component id="goToPageLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="goToPageField" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="imagesLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="imagesRangeLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="thumbnailSizeComboBox" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="sortButton" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="sortLabel" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
<Component id="iconView" pref="322" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="filePathLabel" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="pageLabel"> <Container class="javax.swing.JPanel" name="buttonBarPanel">
<Properties> <Constraints>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <BorderConstraints direction="North"/>
</Property> </Constraint>
</Properties> </Constraints>
</Component>
<Component class="javax.swing.JLabel" name="pagesLabel"> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
<Properties> <Property name="alignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Layout>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <SubComponents>
</Property> <Container class="javax.swing.JPanel" name="pagesPanel">
</Properties>
</Component> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<Component class="javax.swing.JButton" name="pagePrevButton"> <SubComponents>
<Properties> <Container class="javax.swing.JPanel" name="pageNumberPane">
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Constraints>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
</Property> <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Constraint>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pagePrevButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </Constraints>
</Property>
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/> <SubComponents>
</Property> <Component class="javax.swing.JLabel" name="pageLabel">
<Property name="focusable" type="boolean" value="false"/> <Properties>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Insets value="[2, 0, 2, 0]"/> </Property>
</Property> </Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Constraints>
<Dimension value="[55, 23]"/> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
</Property> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="23" weightX="0.0" weightY="1.0"/>
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> </Constraint>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/> </Constraints>
</Property> </Component>
<Property name="verticalTextPosition" type="int" value="3"/> <Component class="javax.swing.JLabel" name="pageNumLabel">
</Properties> <Properties>
<Events> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pagePrevButtonActionPerformed"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageNumLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Events> </Property>
</Component> </Properties>
<Component class="javax.swing.JButton" name="pageNextButton"> <Constraints>
<Properties> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="15" anchor="23" weightX="1.0" weightY="0.0"/>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/> </Constraint>
</Property> </Constraints>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Component>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageNextButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </SubComponents>
</Property> </Container>
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> </SubComponents>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/> </Container>
</Property> <Container class="javax.swing.JPanel" name="pageButtonPanel">
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor"> <SubComponents>
<Insets value="[2, 0, 2, 0]"/> <Component class="javax.swing.JLabel" name="pagesLabel">
</Property> <Properties>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Dimension value="[27, 23]"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> </Properties>
<Dimension value="[27, 23]"/> <Constraints>
</Property> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="17" weightX="0.0" weightY="1.0"/>
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/> </Constraint>
</Property> </Constraints>
<Property name="verticalTextPosition" type="int" value="3"/> </Component>
</Properties> <Component class="javax.swing.JButton" name="pagePrevButton">
<Events> <Properties>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pageNextButtonActionPerformed"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
</Events> <Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
</Component> </Property>
<Component class="javax.swing.JLabel" name="imagesLabel"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<Properties> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pagePrevButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Property>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.imagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
</Property> <Border info="null"/>
</Properties> </Property>
</Component> <Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Component class="javax.swing.JLabel" name="imagesRangeLabel"> <Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"/>
<Properties> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="focusable" type="boolean" value="false"/>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.imagesRangeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Property name="horizontalTextPosition" type="int" value="0"/>
</Property> <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
</Properties> <Insets value="[0, 0, 0, 0]"/>
</Component> </Property>
<Component class="javax.swing.JLabel" name="pageNumLabel"> <Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Properties> <Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Property>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageNumLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Property> </Properties>
</Properties> <Events>
</Component> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pagePrevButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="2" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="pageNextButton">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.pageNextButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"/>
</Property>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[0, 0, 0, 0]"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 23]"/>
</Property>
<Property name="rolloverIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pageNextButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="2" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="15" anchor="23" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pageGotoPane">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JLabel" name="goToPageLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="17" weightX="0.0" weightY="1.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JTextField" name="goToPageField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.goToPageField.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="goToPageFieldActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="2" fill="0" ipadX="75" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="15" anchor="23" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="imagePane">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JLabel" name="imagesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.imagesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="9" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="imagesRangeLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.imagesRangeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="15" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JComboBox" name="thumbnailSizeComboBox">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thumbnailSizeComboBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox&lt;&gt;()"/>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Container class="javax.swing.JPanel" name="sortPane">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JLabel" name="sortLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.sortLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="23" weightX="0.0" weightY="1.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="sortButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.sortButton.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="sortButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="15" insetsBottom="0" insetsRight="9" anchor="23" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="filePathLabel"> <Component class="javax.swing.JLabel" name="filePathLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.filePathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.filePathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> <Constraints>
<Component class="javax.swing.JLabel" name="goToPageLabel"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<Properties> <BorderConstraints direction="South"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Constraint>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </Constraints>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="goToPageField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.goToPageField.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="goToPageFieldActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JComboBox" name="thumbnailSizeComboBox">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thumbnailSizeComboBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JComboBox&lt;&gt;()"/>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component> </Component>
<Component class="org.openide.explorer.view.IconView" name="iconView"> <Component class="org.openide.explorer.view.IconView" name="iconView">
</Component> <Constraints>
<Component class="javax.swing.JButton" name="sortButton"> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<Properties> <BorderConstraints direction="Center"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> </Constraint>
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.sortButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> </Constraints>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sortButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="sortLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataResultViewerThumbnail.sortLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component> </Component>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@ -122,6 +122,11 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
currentPage = -1; currentPage = -1;
totalPages = 0; totalPages = 0;
currentPageImages = 0; currentPageImages = 0;
// The GUI builder is using FlowLayout therefore this change so have no
// impact on the initally designed layout. This change will just effect
// how the components are laid out as size of the window changes.
buttonBarPanel.setLayout(new WrapLayout(java.awt.FlowLayout.LEFT));
} }
/** /**
@ -132,33 +137,84 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
// <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() {
java.awt.GridBagConstraints gridBagConstraints;
buttonBarPanel = new javax.swing.JPanel();
pagesPanel = new javax.swing.JPanel();
pageNumberPane = new javax.swing.JPanel();
pageLabel = new javax.swing.JLabel(); pageLabel = new javax.swing.JLabel();
pageNumLabel = new javax.swing.JLabel();
pageButtonPanel = new javax.swing.JPanel();
pagesLabel = new javax.swing.JLabel(); pagesLabel = new javax.swing.JLabel();
pagePrevButton = new javax.swing.JButton(); pagePrevButton = new javax.swing.JButton();
pageNextButton = new javax.swing.JButton(); pageNextButton = new javax.swing.JButton();
imagesLabel = new javax.swing.JLabel(); pageGotoPane = new javax.swing.JPanel();
imagesRangeLabel = new javax.swing.JLabel();
pageNumLabel = new javax.swing.JLabel();
filePathLabel = new javax.swing.JLabel();
goToPageLabel = new javax.swing.JLabel(); goToPageLabel = new javax.swing.JLabel();
goToPageField = new javax.swing.JTextField(); goToPageField = new javax.swing.JTextField();
imagePane = new javax.swing.JPanel();
imagesLabel = new javax.swing.JLabel();
imagesRangeLabel = new javax.swing.JLabel();
thumbnailSizeComboBox = new javax.swing.JComboBox<>(); thumbnailSizeComboBox = new javax.swing.JComboBox<>();
iconView = new org.openide.explorer.view.IconView(); sortPane = new javax.swing.JPanel();
sortButton = new javax.swing.JButton();
sortLabel = new javax.swing.JLabel(); sortLabel = new javax.swing.JLabel();
sortButton = new javax.swing.JButton();
filePathLabel = new javax.swing.JLabel();
iconView = new org.openide.explorer.view.IconView();
setLayout(new java.awt.BorderLayout());
buttonBarPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
pagesPanel.setLayout(new java.awt.GridBagLayout());
pageNumberPane.setLayout(new java.awt.GridBagLayout());
pageLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageLabel.text")); // NOI18N pageLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 9);
pageNumberPane.add(pageLabel, gridBagConstraints);
pageNumLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNumLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 15);
pageNumberPane.add(pageNumLabel, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
pagesPanel.add(pageNumberPane, gridBagConstraints);
buttonBarPanel.add(pagesPanel);
pageButtonPanel.setLayout(new java.awt.GridBagLayout());
pagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagesLabel.text")); // NOI18N pagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagesLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 9);
pageButtonPanel.add(pagesLabel, gridBagConstraints);
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
pagePrevButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagePrevButton.text")); // NOI18N pagePrevButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagePrevButton.text")); // NOI18N
pagePrevButton.setBorder(null);
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
pagePrevButton.setFocusable(false); pagePrevButton.setFocusable(false);
pagePrevButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); pagePrevButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
pagePrevButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pagePrevButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
pagePrevButton.setPreferredSize(new java.awt.Dimension(55, 23));
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
pagePrevButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); pagePrevButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
pagePrevButton.addActionListener(new java.awt.event.ActionListener() { pagePrevButton.addActionListener(new java.awt.event.ActionListener() {
@ -166,13 +222,20 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
pagePrevButtonActionPerformed(evt); pagePrevButtonActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
pageButtonPanel.add(pagePrevButton, gridBagConstraints);
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
pageNextButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNextButton.text")); // NOI18N pageNextButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNextButton.text")); // NOI18N
pageNextButton.setBorder(null);
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
pageNextButton.setFocusable(false); pageNextButton.setFocusable(false);
pageNextButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); pageNextButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pageNextButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
pageNextButton.setMaximumSize(new java.awt.Dimension(27, 23)); pageNextButton.setMaximumSize(new java.awt.Dimension(27, 23));
pageNextButton.setMinimumSize(new java.awt.Dimension(27, 23)); pageNextButton.setMinimumSize(new java.awt.Dimension(27, 23));
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
@ -182,16 +245,27 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
pageNextButtonActionPerformed(evt); pageNextButtonActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 15);
pageButtonPanel.add(pageNextButton, gridBagConstraints);
imagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.imagesLabel.text")); // NOI18N buttonBarPanel.add(pageButtonPanel);
imagesRangeLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.imagesRangeLabel.text")); // NOI18N pageGotoPane.setLayout(new java.awt.GridBagLayout());
pageNumLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNumLabel.text")); // NOI18N
filePathLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.filePathLabel.text")); // NOI18N
goToPageLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.goToPageLabel.text")); // NOI18N goToPageLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.goToPageLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 9);
pageGotoPane.add(goToPageLabel, gridBagConstraints);
goToPageField.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.goToPageField.text")); // NOI18N goToPageField.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.goToPageField.text")); // NOI18N
goToPageField.addActionListener(new java.awt.event.ActionListener() { goToPageField.addActionListener(new java.awt.event.ActionListener() {
@ -199,12 +273,49 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
goToPageFieldActionPerformed(evt); goToPageFieldActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 2;
gridBagConstraints.ipadx = 75;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 15);
pageGotoPane.add(goToPageField, gridBagConstraints);
buttonBarPanel.add(pageGotoPane);
imagePane.setLayout(new java.awt.GridBagLayout());
imagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.imagesLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 9);
imagePane.add(imagesLabel, gridBagConstraints);
imagesRangeLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.imagesRangeLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 15);
imagePane.add(imagesRangeLabel, gridBagConstraints);
buttonBarPanel.add(imagePane);
thumbnailSizeComboBox.addActionListener(new java.awt.event.ActionListener() { thumbnailSizeComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
thumbnailSizeComboBoxActionPerformed(evt); thumbnailSizeComboBoxActionPerformed(evt);
} }
}); });
buttonBarPanel.add(thumbnailSizeComboBox);
sortPane.setLayout(new java.awt.GridBagLayout());
sortLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.sortLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.weighty = 1.0;
sortPane.add(sortLabel, gridBagConstraints);
sortButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.sortButton.text")); // NOI18N sortButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.sortButton.text")); // NOI18N
sortButton.addActionListener(new java.awt.event.ActionListener() { sortButton.addActionListener(new java.awt.event.ActionListener() {
@ -212,65 +323,20 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
sortButtonActionPerformed(evt); sortButtonActionPerformed(evt);
} }
}); });
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 9);
sortPane.add(sortButton, gridBagConstraints);
sortLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.sortLabel.text")); // NOI18N buttonBarPanel.add(sortPane);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); add(buttonBarPanel, java.awt.BorderLayout.NORTH);
this.setLayout(layout);
layout.setHorizontalGroup( filePathLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.filePathLabel.text")); // NOI18N
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) add(filePathLabel, java.awt.BorderLayout.SOUTH);
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() add(iconView, java.awt.BorderLayout.CENTER);
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(iconView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(pageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pageNumLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pagesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pagePrevButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(goToPageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(goToPageField, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12)
.addComponent(imagesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(imagesRangeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(thumbnailSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(30, 30, 30)
.addComponent(sortButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(sortLabel))
.addComponent(filePathLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(pageLabel)
.addComponent(pageNumLabel)
.addComponent(pagesLabel)
.addComponent(pagePrevButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(goToPageLabel)
.addComponent(goToPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(imagesLabel)
.addComponent(imagesRangeLabel)
.addComponent(thumbnailSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sortButton)
.addComponent(sortLabel))
.addGap(13, 13, 13)
.addComponent(iconView, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(filePathLabel))
);
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void pagePrevButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pagePrevButtonActionPerformed private void pagePrevButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pagePrevButtonActionPerformed
@ -355,19 +421,26 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel buttonBarPanel;
private javax.swing.JLabel filePathLabel; private javax.swing.JLabel filePathLabel;
private javax.swing.JTextField goToPageField; private javax.swing.JTextField goToPageField;
private javax.swing.JLabel goToPageLabel; private javax.swing.JLabel goToPageLabel;
private org.openide.explorer.view.IconView iconView; private org.openide.explorer.view.IconView iconView;
private javax.swing.JPanel imagePane;
private javax.swing.JLabel imagesLabel; private javax.swing.JLabel imagesLabel;
private javax.swing.JLabel imagesRangeLabel; private javax.swing.JLabel imagesRangeLabel;
private javax.swing.JPanel pageButtonPanel;
private javax.swing.JPanel pageGotoPane;
private javax.swing.JLabel pageLabel; private javax.swing.JLabel pageLabel;
private javax.swing.JButton pageNextButton; private javax.swing.JButton pageNextButton;
private javax.swing.JLabel pageNumLabel; private javax.swing.JLabel pageNumLabel;
private javax.swing.JPanel pageNumberPane;
private javax.swing.JButton pagePrevButton; private javax.swing.JButton pagePrevButton;
private javax.swing.JLabel pagesLabel; private javax.swing.JLabel pagesLabel;
private javax.swing.JPanel pagesPanel;
private javax.swing.JButton sortButton; private javax.swing.JButton sortButton;
private javax.swing.JLabel sortLabel; private javax.swing.JLabel sortLabel;
private javax.swing.JPanel sortPane;
private javax.swing.JComboBox<String> thumbnailSizeComboBox; private javax.swing.JComboBox<String> thumbnailSizeComboBox;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables

View File

@ -23,6 +23,7 @@ import java.util.EnumSet;
import java.util.Objects; import java.util.Objects;
import java.util.TimeZone; import java.util.TimeZone;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSpinner;
import org.netbeans.spi.options.OptionsPanelController; import org.netbeans.spi.options.OptionsPanelController;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences; import org.sleuthkit.autopsy.casemodule.CasePreferences;
@ -55,6 +56,9 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
groupByDataSourceCheckbox.setEnabled(evt.getNewValue() != null); groupByDataSourceCheckbox.setEnabled(evt.getNewValue() != null);
}); });
this.timeZoneList.setListData(TimeZoneUtils.createTimeZoneList().stream().toArray(String[]::new)); this.timeZoneList.setListData(TimeZoneUtils.createTimeZoneList().stream().toArray(String[]::new));
// Disable manual editing of max results spinner
((JSpinner.DefaultEditor)maxResultsSpinner.getEditor()).getTextField().setEditable(false);
} }
@Override @Override

View File

@ -0,0 +1,203 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2019 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.corecomponents;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
/**
* FlowLayout subclass that fully supports wrapping of components.
*
* Originally written by Rob Camick
* https://tips4java.wordpress.com/2008/11/06/wrap-layout/
*/
class WrapLayout extends FlowLayout {
/**
* Constructs a new <code>WrapLayout</code> with a left alignment and a
* default 5-unit horizontal and vertical gap.
*/
public WrapLayout() {
super();
}
/**
* Constructs a new <code>FlowLayout</code> with the specified alignment
* and a default 5-unit horizontal and vertical gap. The value of the
* alignment argument must be one of <code>WrapLayout</code>,
* <code>WrapLayout</code>, or <code>WrapLayout</code>.
*
* @param align the alignment value
*/
public WrapLayout(int align) {
super(align);
}
/**
* Creates a new flow layout manager with the indicated alignment and
* the indicated horizontal and vertical gaps.
* <p>
* The value of the alignment argument must be one of
* <code>WrapLayout</code>, <code>WrapLayout</code>, or
* <code>WrapLayout</code>.
*
* @param align the alignment value
* @param hgap the horizontal gap between components
* @param vgap the vertical gap between components
*/
public WrapLayout(int align, int hgap, int vgap) {
super(align, hgap, vgap);
}
/**
* Returns the preferred dimensions for this layout given the
* <i>visible</i> components in the specified target container.
*
* @param target the component which needs to be laid out
*
* @return the preferred dimensions to lay out the subcomponents of the
* specified container
*/
@Override
public Dimension preferredLayoutSize(Container target) {
return layoutSize(target, true);
}
/**
* Returns the minimum dimensions needed to layout the <i>visible</i>
* components contained in the specified target container.
*
* @param target the component which needs to be laid out
*
* @return the minimum dimensions to lay out the subcomponents of the
* specified container
*/
@Override
public Dimension minimumLayoutSize(Container target) {
Dimension minimum = layoutSize(target, false);
minimum.width -= (getHgap() + 1);
return minimum;
}
/**
* Returns the minimum or preferred dimension needed to layout the
* target container.
*
* @param target target to get layout size for
* @param preferred should preferred size be calculated
*
* @return the dimension to layout the target container
*/
private Dimension layoutSize(Container target, boolean preferred) {
synchronized (target.getTreeLock()) {
// Each row must fit with the width allocated to the containter.
// When the container width = 0, the preferred width of the container
// has not yet been calculated so lets ask for the maximum.
int targetWidth = target.getSize().width;
Container container = target;
while (container.getSize().width == 0 && container.getParent() != null) {
container = container.getParent();
}
targetWidth = container.getSize().width;
if (targetWidth == 0) {
targetWidth = Integer.MAX_VALUE;
}
int hgap = getHgap();
int vgap = getVgap();
Insets insets = target.getInsets();
int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2);
int maxWidth = targetWidth - horizontalInsetsAndGap;
// Fit components into the allowed width
Dimension dim = new Dimension(0, 0);
int rowWidth = 0;
int rowHeight = 0;
int nmembers = target.getComponentCount();
for (int i = 0; i < nmembers; i++) {
Component m = target.getComponent(i);
if (m.isVisible()) {
Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize();
// Can't add the component to current row. Start a new row.
if (rowWidth + d.width > maxWidth) {
addRow(dim, rowWidth, rowHeight);
rowWidth = 0;
rowHeight = 0;
}
// Add a horizontal gap for all components after the first
if (rowWidth != 0) {
rowWidth += hgap;
}
rowWidth += d.width;
rowHeight = Math.max(rowHeight, d.height);
}
}
addRow(dim, rowWidth, rowHeight);
dim.width += horizontalInsetsAndGap;
dim.height += insets.top + insets.bottom + vgap * 2;
// When using a scroll pane or the DecoratedLookAndFeel we need to
// make sure the preferred size is less than the size of the
// target containter so shrinking the container size works
// correctly. Removing the horizontal gap is an easy way to do this.
Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target);
if (scrollPane != null && target.isValid()) {
dim.width -= (hgap + 1);
}
return dim;
}
}
/*
* A new row has been completed. Use the dimensions of this row to
* update the preferred size for the container.
*
* @param dim update the width and height when appropriate @param
* rowWidth the width of the row to add @param rowHeight the height of
* the row to add
*/
private void addRow(Dimension dim, int rowWidth, int rowHeight) {
dim.width = Math.max(dim.width, rowWidth);
if (dim.height > 0) {
dim.height += getVgap();
}
dim.height += rowHeight;
}
}

View File

@ -221,7 +221,8 @@ public class StringExtract {
StringExtractResult resWin = null; StringExtractResult resWin = null;
if (enableUTF8 && resUTF16 != null) { if (enableUTF8 && resUTF16 != null) {
resWin = runUTF16 && resUTF16.numChars > resUTF8.numChars ? resUTF16 : resUTF8; resWin = runUTF16 && resUTF16.numChars > resUTF8.numChars ? resUTF16 : resUTF8;
} else if (enableUTF16) { } else if (runUTF16) {
//Only let resUTF16 "win" if it was actually run.
resWin = resUTF16; resWin = resUTF16;
} else if (enableUTF8) { } else if (enableUTF8) {
resWin = resUTF8; resWin = resUTF8;

View File

@ -123,7 +123,6 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl); Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl);
} }
private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> { private final PropertyChangeListener pcl = (PropertyChangeEvent evt) -> {
String eventType = evt.getPropertyName(); String eventType = evt.getPropertyName();
@ -201,16 +200,16 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
this.setShortDescription(content.getName()); this.setShortDescription(content.getName());
updateSheet(new NodeProperty<>(ORIGINAL_NAME.toString(), ORIGINAL_NAME.toString(), NO_DESCR, content.getName())); updateSheet(new NodeProperty<>(ORIGINAL_NAME.toString(), ORIGINAL_NAME.toString(), NO_DESCR, content.getName()));
} else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) { } else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) {
SCOData scoData = (SCOData)evt.getNewValue(); SCOData scoData = (SCOData) evt.getNewValue();
if (scoData.getScoreAndDescription() != null) { if (scoData.getScoreAndDescription() != null) {
updateSheet(new NodeProperty<>(SCORE.toString(), SCORE.toString(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft())); updateSheet(new NodeProperty<>(SCORE.toString(), SCORE.toString(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft()));
} }
if (scoData.getComment() != null) { if (scoData.getComment() != null) {
updateSheet(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), NO_DESCR, scoData.getComment())); updateSheet(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), NO_DESCR, scoData.getComment()));
} }
if (scoData.getCountAndDescription() != null && if (scoData.getCountAndDescription() != null
!UserPreferences.hideCentralRepoCommentsAndOccurrences()) { && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
updateSheet(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft())); updateSheet(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft()));
} }
} }
}; };
@ -332,10 +331,9 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
properties.add(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), VALUE_LOADING, "")); properties.add(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), VALUE_LOADING, ""));
} }
// Get the SCO columns data in a background task // Get the SCO columns data in a background task
backgroundTasksPool.submit(new GetSCOTask( backgroundTasksPool.submit(new GetSCOTask(
new WeakReference<>(this), weakPcl)); new WeakReference<>(this), weakPcl));
properties.add(new NodeProperty<>(LOCATION.toString(), LOCATION.toString(), NO_DESCR, getContentPath(content))); properties.add(new NodeProperty<>(LOCATION.toString(), LOCATION.toString(), NO_DESCR, getContentPath(content)));
properties.add(new NodeProperty<>(MOD_TIME.toString(), MOD_TIME.toString(), NO_DESCR, ContentUtils.getStringTime(content.getMtime(), content))); properties.add(new NodeProperty<>(MOD_TIME.toString(), MOD_TIME.toString(), NO_DESCR, ContentUtils.getStringTime(content.getMtime(), content)));
@ -394,20 +392,19 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
@NbBundle.Messages({ @NbBundle.Messages({
"AbstractAbstractFileNode.createSheet.count.displayName=O", "AbstractAbstractFileNode.createSheet.count.displayName=O",
"AbstractAbstractFileNode.createSheet.count.noCentralRepo.description=Central repository was not enabled when this column was populated",
"AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated", "AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated",
"# {0} - occuranceCount", "# {0} - occurenceCount",
"AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurances of the correlation value"}) "AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurences of the MD5 correlation value"})
@Override @Override
protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance attribute) { protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance.Type attributeType, String attributeValue, String defaultDescription) {
Long count = -1L; //The column renderer will not display negative values, negative value used when count unavailble to preserve sorting Long count = -1L; //The column renderer will not display negative values, negative value used when count unavailble to preserve sorting
String description = Bundle.AbstractAbstractFileNode_createSheet_count_noCentralRepo_description(); String description = defaultDescription;
try { try {
//don't perform the query if there is no correlation value //don't perform the query if there is no correlation value
if (attribute != null && StringUtils.isNotBlank(attribute.getCorrelationValue())) { if (attributeType != null && StringUtils.isNotBlank(attributeValue)) {
count = EamDb.getInstance().getCountUniqueCaseDataSourceTuplesHavingTypeValue(attribute.getCorrelationType(), attribute.getCorrelationValue()); count = EamDb.getInstance().getCountUniqueCaseDataSourceTuplesHavingTypeValue(attributeType, attributeValue);
description = Bundle.AbstractAbstractFileNode_createSheet_count_description(count); description = Bundle.AbstractAbstractFileNode_createSheet_count_description(count);
} else if (attribute != null) { } else if (attributeType != null) {
description = Bundle.AbstractAbstractFileNode_createSheet_count_hashLookupNotRun_description(); description = Bundle.AbstractAbstractFileNode_createSheet_count_hashLookupNotRun_description();
} }
} catch (EamDbException ex) { } catch (EamDbException ex) {
@ -415,7 +412,6 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
} catch (CorrelationAttributeNormalizationException ex) { } catch (CorrelationAttributeNormalizationException ex) {
logger.log(Level.WARNING, "Unable to normalize data to get count of datasources with correlation attribute", ex); logger.log(Level.WARNING, "Unable to normalize data to get count of datasources with correlation attribute", ex);
} }
return Pair.of(count, description); return Pair.of(count, description);
} }

View File

@ -35,6 +35,7 @@ import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.Type;
import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable; import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
@ -60,8 +61,8 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
private static final Logger logger = Logger.getLogger(AbstractContentNode.class.getName()); private static final Logger logger = Logger.getLogger(AbstractContentNode.class.getName());
/** /**
* A pool of background tasks to run any long computation needed to * A pool of background tasks to run any long computation needed to populate
* populate this node. * this node.
*/ */
static final ExecutorService backgroundTasksPool; static final ExecutorService backgroundTasksPool;
private static final Integer MAX_POOL_SIZE = 10; private static final Integer MAX_POOL_SIZE = 10;
@ -70,11 +71,11 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
* Default no description string * Default no description string
*/ */
@NbBundle.Messages({"AbstractContentNode.nodescription=no description", @NbBundle.Messages({"AbstractContentNode.nodescription=no description",
"AbstractContentNode.valueLoading=value loading"}) "AbstractContentNode.valueLoading=value loading"})
protected static final String NO_DESCR = Bundle.AbstractContentNode_nodescription(); protected static final String NO_DESCR = Bundle.AbstractContentNode_nodescription();
protected static final String VALUE_LOADING = Bundle.AbstractContentNode_valueLoading(); protected static final String VALUE_LOADING = Bundle.AbstractContentNode_valueLoading();
/** /**
* Event signals to indicate the background tasks have completed processing. * Event signals to indicate the background tasks have completed processing.
* Currently, we have one property task in the background: * Currently, we have one property task in the background:
* *
@ -91,23 +92,24 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
backgroundTasksPool = Executors.newFixedThreadPool(MAX_POOL_SIZE, backgroundTasksPool = Executors.newFixedThreadPool(MAX_POOL_SIZE,
new ThreadFactoryBuilder().setNameFormat("content-node-background-task-%d").build()); new ThreadFactoryBuilder().setNameFormat("content-node-background-task-%d").build());
} }
/** /**
* Handles aspects that depend on the Content object * Handles aspects that depend on the Content object
* *
* @param content Underlying Content instances * @param content Underlying Content instances
*/ */
AbstractContentNode(T content) { AbstractContentNode(T content) {
this(content, Lookups.singleton(content) ); this(content, Lookups.singleton(content));
} }
/** /**
* Handles aspects that depend on the Content object * Handles aspects that depend on the Content object
* *
* @param content Underlying Content instances * @param content Underlying Content instances
* @param lookup The Lookup object for the node. * @param lookup The Lookup object for the node.
*/ */
AbstractContentNode(T content, Lookup lookup) { AbstractContentNode(T content, Lookup lookup) {
super(Children.create(new ContentChildren(content), true), lookup); super(Children.create(new ContentChildren(content), false), lookup);
this.content = content; this.content = content;
//super.setName(ContentUtils.getSystemName(content)); //super.setName(ContentUtils.getSystemName(content));
super.setName("content_" + Long.toString(content.getId())); //NON-NLS super.setName("content_" + Long.toString(content.getId())); //NON-NLS
@ -147,13 +149,14 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
* loading. * loading.
* *
* @param c The content object to look for children on * @param c The content object to look for children on
*
* @return true if has children * @return true if has children
*/ */
public static boolean contentHasVisibleContentChildren(Content c){ public static boolean contentHasVisibleContentChildren(Content c) {
if (c != null) { if (c != null) {
try { try {
if( ! c.hasChildren()) { if (!c.hasChildren()) {
return false; return false;
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
@ -163,18 +166,17 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
} }
String query = "SELECT COUNT(obj_id) AS count FROM " String query = "SELECT COUNT(obj_id) AS count FROM "
+ " ( SELECT obj_id FROM tsk_objects WHERE par_obj_id = " + c.getId() + " AND type = " + " ( SELECT obj_id FROM tsk_objects WHERE par_obj_id = " + c.getId() + " AND type = "
+ TskData.ObjectType.ARTIFACT.getObjectType() + TskData.ObjectType.ARTIFACT.getObjectType()
+ " INTERSECT SELECT artifact_obj_id FROM blackboard_artifacts WHERE obj_id = " + c.getId() + " INTERSECT SELECT artifact_obj_id FROM blackboard_artifacts WHERE obj_id = " + c.getId()
+ " AND (artifact_type_id = " + ARTIFACT_TYPE.TSK_EMAIL_MSG.getTypeID() + " AND (artifact_type_id = " + ARTIFACT_TYPE.TSK_EMAIL_MSG.getTypeID()
+ " OR artifact_type_id = " + ARTIFACT_TYPE.TSK_MESSAGE.getTypeID() + ") " + " OR artifact_type_id = " + ARTIFACT_TYPE.TSK_MESSAGE.getTypeID() + ") "
+ " UNION SELECT obj_id FROM tsk_objects WHERE par_obj_id = " + c.getId() + " UNION SELECT obj_id FROM tsk_objects WHERE par_obj_id = " + c.getId()
+ " AND type = " + TskData.ObjectType.ABSTRACTFILE.getObjectType() + ") AS OBJECT_IDS"; //NON-NLS; + " AND type = " + TskData.ObjectType.ABSTRACTFILE.getObjectType() + ") AS OBJECT_IDS"; //NON-NLS;
try (SleuthkitCase.CaseDbQuery dbQuery = Case.getCurrentCaseThrows().getSleuthkitCase().executeQuery(query)) { try (SleuthkitCase.CaseDbQuery dbQuery = Case.getCurrentCaseThrows().getSleuthkitCase().executeQuery(query)) {
ResultSet resultSet = dbQuery.getResultSet(); ResultSet resultSet = dbQuery.getResultSet();
if(resultSet.next()){ if (resultSet.next()) {
return (0 < resultSet.getInt("count")); return (0 < resultSet.getInt("count"));
} }
} catch (TskCoreException | SQLException | NoCurrentCaseException ex) { } catch (TskCoreException | SQLException | NoCurrentCaseException ex) {
@ -282,7 +284,6 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
return content.read(buf, offset, len); return content.read(buf, offset, len);
} }
/** /**
* Updates the values of the properties in the current property sheet with * Updates the values of the properties in the current property sheet with
* the new properties being passed in. Only if that property exists in the * the new properties being passed in. Only if that property exists in the
@ -322,10 +323,12 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
*/ */
abstract protected List<Tag> getAllTagsFromDatabase(); abstract protected List<Tag> getAllTagsFromDatabase();
/** /**
* Returns correlation attribute instance for the underlying content of the node. * Returns correlation attribute instance for the underlying content of the
* node.
* *
* @return correlation attribute instance for the underlying content of the node. * @return correlation attribute instance for the underlying content of the
* node.
*/ */
abstract protected CorrelationAttributeInstance getCorrelationAttributeInstance(); abstract protected CorrelationAttributeInstance getCorrelationAttributeInstance();
@ -341,7 +344,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
/** /**
* Returns comment property for the node. * Returns comment property for the node.
* *
* @param tags list of tags * @param tags list of tags
* @param attribute correlation attribute instance * @param attribute correlation attribute instance
* *
* @return Comment property for the underlying content of the node. * @return Comment property for the underlying content of the node.
@ -351,9 +354,12 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
/** /**
* Returns occurrences/count property for the node. * Returns occurrences/count property for the node.
* *
* @param attribute correlation attribute instance * @param attributeType the type of the attribute to count
* @param attributeValue the value of the attribute to count
* @param defaultDescription a description to use when none is determined by
* the getCountPropertyAndDescription method
* *
* @return count property for the underlying content of the node. * @return count property for the underlying content of the node.
*/ */
abstract protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance attribute); abstract protected Pair<Long, String> getCountPropertyAndDescription(Type attributeType, String attributeValue, String defaultDescription);
} }

View File

@ -52,6 +52,7 @@ import org.sleuthkit.autopsy.casemodule.events.CommentChangedEvent;
import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent;
import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.Type;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil; import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
@ -151,18 +152,17 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
removeListeners(); removeListeners();
contentCache.invalidateAll(); contentCache.invalidateAll();
} }
} } else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) {
else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) { SCOData scoData = (SCOData) evt.getNewValue();
SCOData scoData = (SCOData)evt.getNewValue();
if (scoData.getScoreAndDescription() != null) { if (scoData.getScoreAndDescription() != null) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft()));
} }
if (scoData.getComment() != null) { if (scoData.getComment() != null) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR, scoData.getComment())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR, scoData.getComment()));
} }
if (scoData.getCountAndDescription() != null && if (scoData.getCountAndDescription() != null
!UserPreferences.hideCentralRepoCommentsAndOccurrences()) { && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft()));
} }
} }
} }
@ -372,7 +372,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
// Get the SCO columns data in a background task // Get the SCO columns data in a background task
backgroundTasksPool.submit(new GetSCOTask( backgroundTasksPool.submit(new GetSCOTask(
new WeakReference<>(this), weakPcl)); new WeakReference<>(this), weakPcl));
if (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) { if (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) {
try { try {
@ -582,6 +582,12 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
NO_DESCR, tags.stream().map(t -> t.getName().getDisplayName()).collect(Collectors.joining(", ")))); NO_DESCR, tags.stream().map(t -> t.getName().getDisplayName()).collect(Collectors.joining(", "))));
} }
/**
* Gets the correlation attribute for the associated file
*
* @return the correlation attribute for the file associated with this
* BlackboardArtifactNode
*/
@Override @Override
protected final CorrelationAttributeInstance getCorrelationAttributeInstance() { protected final CorrelationAttributeInstance getCorrelationAttributeInstance() {
CorrelationAttributeInstance correlationAttribute = null; CorrelationAttributeInstance correlationAttribute = null;
@ -601,15 +607,15 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
* artifact's associated file, null if central repo is not * artifact's associated file, null if central repo is not
* enabled * enabled
* *
* @deprecated Use the GetSCOTask to get this data on a background thread..., * @deprecated Use the GetSCOTask to get this data on a background
* and then update the property sheet asynchronously * thread..., and then update the property sheet asynchronously
*/ */
@NbBundle.Messages({"BlackboardArtifactNode.createSheet.comment.name=C", @NbBundle.Messages({"BlackboardArtifactNode.createSheet.comment.name=C",
"BlackboardArtifactNode.createSheet.comment.displayName=C"}) "BlackboardArtifactNode.createSheet.comment.displayName=C"})
@Deprecated @Deprecated
protected final void addCommentProperty(Sheet.Set sheetSet, List<Tag> tags, CorrelationAttributeInstance attribute) { protected final void addCommentProperty(Sheet.Set sheetSet, List<Tag> tags, CorrelationAttributeInstance attribute) {
HasCommentStatus status = getCommentProperty(tags, attribute ); HasCommentStatus status = getCommentProperty(tags, attribute);
sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR, sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR,
status)); status));
} }
@ -620,6 +626,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
* @param attribute the correlation attribute associated with this * @param attribute the correlation attribute associated with this
* artifact's associated file, null if central repo is not * artifact's associated file, null if central repo is not
* enabled * enabled
*
* @return comment property * @return comment property
*/ */
@Override @Override
@ -645,6 +652,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
} }
return status; return status;
} }
/** /**
* Used by (subclasses of) BlackboardArtifactNode to add the Score property * Used by (subclasses of) BlackboardArtifactNode to add the Score property
* to their sheets. * to their sheets.
@ -652,8 +660,8 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
* @param sheetSet the modifiable Sheet.Set to add the property to * @param sheetSet the modifiable Sheet.Set to add the property to
* @param tags the list of tags associated with the file * @param tags the list of tags associated with the file
* *
* @deprecated Use the GetSCOTask to get this data on a background thread..., * @deprecated Use the GetSCOTask to get this data on a background
* and then update the property sheet asynchronously * thread..., and then update the property sheet asynchronously
*/ */
@NbBundle.Messages({"BlackboardArtifactNode.createSheet.score.name=S", @NbBundle.Messages({"BlackboardArtifactNode.createSheet.score.name=S",
"BlackboardArtifactNode.createSheet.score.displayName=S", "BlackboardArtifactNode.createSheet.score.displayName=S",
@ -671,13 +679,13 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
/** /**
* Get the score property for the node. * Get the score property for the node.
* *
* @param tags the list of tags associated with the file * @param tags the list of tags associated with the file
* *
* @return score property and description * @return score property and description
*/ */
@Override @Override
protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) { protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) {
Score score = Score.NO_SCORE; Score score = Score.NO_SCORE;
String description = Bundle.BlackboardArtifactNode_createSheet_noScore_description(); String description = Bundle.BlackboardArtifactNode_createSheet_noScore_description();
if (associated instanceof AbstractFile) { if (associated instanceof AbstractFile) {
if (((AbstractFile) associated).getKnown() == TskData.FileKnown.BAD) { if (((AbstractFile) associated).getKnown() == TskData.FileKnown.BAD) {
@ -724,48 +732,53 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
return Pair.of(score, description); return Pair.of(score, description);
} }
/** /**
* Used by (subclasses of) BlackboardArtifactNode to add the Occurrences property * Used by (subclasses of) BlackboardArtifactNode to add the Occurrences
* to their sheets. * property to their sheets.
* *
* @param sheetSet the modifiable Sheet.Set to add the property to * @param sheetSet the modifiable Sheet.Set to add the property to
* @param attribute correlation attribute instance * @param attribute correlation attribute instance
* *
* @deprecated Use the GetSCOTask to get this data on a background thread..., * @deprecated Use the GetSCOTask to get this data on a background
* and then update the property sheet asynchronously * thread..., and then update the property sheet asynchronously
*/ */
@NbBundle.Messages({"BlackboardArtifactNode.createSheet.count.name=O", @NbBundle.Messages({"BlackboardArtifactNode.createSheet.count.name=O",
"BlackboardArtifactNode.createSheet.count.displayName=O", "BlackboardArtifactNode.createSheet.count.displayName=O",
"BlackboardArtifactNode.createSheet.count.noCentralRepo.description=Central repository was not enabled when this column was populated", "BlackboardArtifactNode.createSheet.count.noCorrelationAttributes.description=No correlation properties found",
"BlackboardArtifactNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this artifact's associated file when the column was populated", "BlackboardArtifactNode.createSheet.count.noCorrelationValues.description=Unable to find other occurrences because no value exists for the available correlation property",
"# {0} - occuranceCount", "# {0} - occurenceCount",
"BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurances of the correlation value"}) "# {1} - attributeType",
"BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1}"})
@Deprecated @Deprecated
protected final void addCountProperty(Sheet.Set sheetSet, CorrelationAttributeInstance attribute) { protected final void addCountProperty(Sheet.Set sheetSet, CorrelationAttributeInstance attribute) {
Pair<Long, String> countAndDescription = getCountPropertyAndDescription(attribute); Pair<Long, String> countAndDescription = getCountPropertyAndDescription(attribute.getCorrelationType(), attribute.getCorrelationValue(), Bundle.BlackboardArtifactNode_createSheet_count_noCorrelationAttributes_description());
sheetSet.put( sheetSet.put(
new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), countAndDescription.getRight(), countAndDescription.getLeft())); new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), countAndDescription.getRight(), countAndDescription.getLeft()));
} }
/** /**
* Gets the Occurrences property for the node. * Gets the Occurrences property for the node.
* *
* @param attribute correlation attribute instance * @param attributeType the type of the attribute to count
* @param attributeValue the value of the attribute to count
* @param defaultDescription a description to use when none is determined by
* the getCountPropertyAndDescription method
* *
* @return count and description * @return count and description
* *
*/ */
@Override @Override
protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance attribute) { protected Pair<Long, String> getCountPropertyAndDescription(Type attributeType, String attributeValue, String defaultDescription) {
Long count = -1L; Long count = -1L;
String description = Bundle.BlackboardArtifactNode_createSheet_count_noCentralRepo_description(); String description = defaultDescription;
try { try {
//don't perform the query if there is no correlation value //don't perform the query if there is no correlation value
if (attribute != null && StringUtils.isNotBlank(attribute.getCorrelationValue())) { if (attributeType != null && StringUtils.isNotBlank(attributeValue)) {
count = EamDb.getInstance().getCountUniqueCaseDataSourceTuplesHavingTypeValue(attribute.getCorrelationType(), attribute.getCorrelationValue()); count = EamDb.getInstance().getCountUniqueCaseDataSourceTuplesHavingTypeValue(attributeType, attributeValue);
description = Bundle.BlackboardArtifactNode_createSheet_count_description(count); description = Bundle.BlackboardArtifactNode_createSheet_count_description(count, attributeType.getDisplayName());
} else if (attribute != null) { } else if (attributeType != null) {
description = Bundle.BlackboardArtifactNode_createSheet_count_hashLookupNotRun_description(); description = Bundle.BlackboardArtifactNode_createSheet_count_noCorrelationValues_description();
} }
} catch (EamDbException ex) { } catch (EamDbException ex) {
logger.log(Level.WARNING, "Error getting count of datasources with correlation attribute", ex); logger.log(Level.WARNING, "Error getting count of datasources with correlation attribute", ex);
@ -773,7 +786,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
logger.log(Level.WARNING, "Unable to normalize data to get count of datasources with correlation attribute", ex); logger.log(Level.WARNING, "Unable to normalize data to get count of datasources with correlation attribute", ex);
} }
return Pair.of(count, description); return Pair.of(count, description);
} }
private void updateSheet() { private void updateSheet() {
this.setSheet(createSheet()); this.setSheet(createSheet());

View File

@ -4,12 +4,11 @@ AbstractAbstractFileNode.changeTimeColLbl=Change Time
AbstractAbstractFileNode.createdTimeColLbl=Created Time AbstractAbstractFileNode.createdTimeColLbl=Created Time
AbstractAbstractFileNode.createSheet.comment.displayName=C AbstractAbstractFileNode.createSheet.comment.displayName=C
AbstractAbstractFileNode.createSheet.comment.name=C AbstractAbstractFileNode.createSheet.comment.name=C
# {0} - occuranceCount # {0} - occurenceCount
AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurances of the correlation value AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurences of the MD5 correlation value
AbstractAbstractFileNode.createSheet.count.displayName=O AbstractAbstractFileNode.createSheet.count.displayName=O
AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated
AbstractAbstractFileNode.createSheet.count.name=O AbstractAbstractFileNode.createSheet.count.name=O
AbstractAbstractFileNode.createSheet.count.noCentralRepo.description=Central repository was not enabled when this column was populated
AbstractAbstractFileNode.createSheet.interestingResult.description=File has interesting result associated with it. AbstractAbstractFileNode.createSheet.interestingResult.description=File has interesting result associated with it.
AbstractAbstractFileNode.createSheet.noScore.description=No score AbstractAbstractFileNode.createSheet.noScore.description=No score
AbstractAbstractFileNode.createSheet.notableFile.description=File recognized as notable. AbstractAbstractFileNode.createSheet.notableFile.description=File recognized as notable.
@ -54,12 +53,13 @@ BlackboardArtifactNode.createSheet.artifactType.displayName=Result Type
BlackboardArtifactNode.createSheet.artifactType.name=Result Type BlackboardArtifactNode.createSheet.artifactType.name=Result Type
BlackboardArtifactNode.createSheet.comment.displayName=C BlackboardArtifactNode.createSheet.comment.displayName=C
BlackboardArtifactNode.createSheet.comment.name=C BlackboardArtifactNode.createSheet.comment.name=C
# {0} - occuranceCount # {0} - occurenceCount
BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurances of the correlation value # {1} - attributeType
BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1}
BlackboardArtifactNode.createSheet.count.displayName=O BlackboardArtifactNode.createSheet.count.displayName=O
BlackboardArtifactNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this artifact's associated file when the column was populated
BlackboardArtifactNode.createSheet.count.name=O BlackboardArtifactNode.createSheet.count.name=O
BlackboardArtifactNode.createSheet.count.noCentralRepo.description=Central repository was not enabled when this column was populated BlackboardArtifactNode.createSheet.count.noCorrelationAttributes.description=No correlation properties found
BlackboardArtifactNode.createSheet.count.noCorrelationValues.description=Unable to find other occurrences because no value exists for the available correlation property
BlackboardArtifactNode.createSheet.fileSize.displayName=Size BlackboardArtifactNode.createSheet.fileSize.displayName=Size
BlackboardArtifactNode.createSheet.fileSize.name=Size BlackboardArtifactNode.createSheet.fileSize.name=Size
BlackboardArtifactNode.createSheet.interestingResult.description=Result has an interesting result associated with it. BlackboardArtifactNode.createSheet.interestingResult.description=Result has an interesting result associated with it.
@ -115,6 +115,8 @@ FileTypesByMimeTypeNode.createSheet.mediaSubtype.name=Subtype
FileTypesByMimeTypeNode.createSheet.mediaType.desc=no description FileTypesByMimeTypeNode.createSheet.mediaType.desc=no description
FileTypesByMimeTypeNode.createSheet.mediaType.displayName=Type FileTypesByMimeTypeNode.createSheet.mediaType.displayName=Type
FileTypesByMimeTypeNode.createSheet.mediaType.name=Type FileTypesByMimeTypeNode.createSheet.mediaType.name=Type
GetSCOTask.occurrences.defaultDescription=No correlation properties found
GetSCOTask.occurrences.multipleProperties=Multiple different correlation properties exist for this result
ImageNode.action.runIngestMods.text=Run Ingest Modules ImageNode.action.runIngestMods.text=Run Ingest Modules
ImageNode.createSheet.deviceId.desc=Device ID of the image ImageNode.createSheet.deviceId.desc=Device ID of the image
ImageNode.createSheet.deviceId.displayName=Device ID ImageNode.createSheet.deviceId.displayName=Device ID

View File

@ -57,7 +57,7 @@ public class DataSourcesNode extends DisplayableItemNode {
} }
public DataSourcesNode(long dsObjId) { public DataSourcesNode(long dsObjId) {
super(Children.create(new DataSourcesNodeChildren(dsObjId), true), Lookups.singleton(NAME)); super(Children.create(new DataSourcesNodeChildren(dsObjId), false), Lookups.singleton(NAME));
displayName = (dsObjId > 0) ? NbBundle.getMessage(DataSourcesNode.class, "DataSourcesNode.group_by_datasource.name") : NAME; displayName = (dsObjId > 0) ? NbBundle.getMessage(DataSourcesNode.class, "DataSourcesNode.group_by_datasource.name") : NAME;
init(); init();
} }

View File

@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -37,7 +36,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
@ -59,7 +57,7 @@ import org.sleuthkit.datamodel.VirtualDirectory;
public class DeletedContent implements AutopsyVisitableItem { public class DeletedContent implements AutopsyVisitableItem {
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
@NbBundle.Messages({"DeletedContent.fsDelFilter.text=File System", @NbBundle.Messages({"DeletedContent.fsDelFilter.text=File System",
"DeletedContent.allDelFilter.text=All"}) "DeletedContent.allDelFilter.text=All"})
@ -105,11 +103,11 @@ public class DeletedContent implements AutopsyVisitableItem {
public DeletedContent(SleuthkitCase skCase, long dsObjId) { public DeletedContent(SleuthkitCase skCase, long dsObjId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = dsObjId; this.filteringDSObjId = dsObjId;
} }
long filteringDataSourceObjId() { long filteringDataSourceObjId() {
return this.datasourceObjId; return this.filteringDSObjId;
} }
@Override @Override
@ -439,7 +437,7 @@ public class DeletedContent implements AutopsyVisitableItem {
} }
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
query += " AND data_source_obj_id = " + filteringDSObjId; query += " AND data_source_obj_id = " + filteringDSObjId;
} }
return query; return query;

View File

@ -28,7 +28,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -40,7 +39,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
@ -88,7 +86,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
} }
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final EmailResults emailResults; private final EmailResults emailResults;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
@ -110,7 +108,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
*/ */
public EmailExtracted(SleuthkitCase skCase, long objId) { public EmailExtracted(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
emailResults = new EmailResults(); emailResults = new EmailResults();
} }
@ -162,8 +160,8 @@ public class EmailExtracted implements AutopsyVisitableItem {
+ "attribute_type_id=" + pathAttrId //NON-NLS + "attribute_type_id=" + pathAttrId //NON-NLS
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS + " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS + " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
query += " AND blackboard_artifacts.data_source_obj_id = " + datasourceObjId; query += " AND blackboard_artifacts.data_source_obj_id = " + filteringDSObjId;
} }
try (CaseDbQuery dbQuery = skCase.executeQuery(query)) { try (CaseDbQuery dbQuery = skCase.executeQuery(query)) {

View File

@ -26,7 +26,6 @@ import java.util.Comparator;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.logging.Level; import java.util.logging.Level;
import org.openide.nodes.ChildFactory; import org.openide.nodes.ChildFactory;
import org.openide.nodes.Children; import org.openide.nodes.Children;
@ -35,7 +34,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
@ -64,7 +62,7 @@ public class ExtractedContent implements AutopsyVisitableItem {
private SleuthkitCase skCase; // set to null after case has been closed private SleuthkitCase skCase; // set to null after case has been closed
private Blackboard blackboard; private Blackboard blackboard;
public static final String NAME = NbBundle.getMessage(RootNode.class, "ExtractedContentNode.name.text"); public static final String NAME = NbBundle.getMessage(RootNode.class, "ExtractedContentNode.name.text");
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
/** /**
* Constructs extracted content object * Constructs extracted content object
@ -83,7 +81,7 @@ public class ExtractedContent implements AutopsyVisitableItem {
*/ */
public ExtractedContent(SleuthkitCase skCase, long objId) { public ExtractedContent(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
this.blackboard = skCase.getBlackboard(); this.blackboard = skCase.getBlackboard();
} }
@ -307,8 +305,8 @@ public class ExtractedContent implements AutopsyVisitableItem {
protected boolean createKeys(List<BlackboardArtifact.Type> list) { protected boolean createKeys(List<BlackboardArtifact.Type> list) {
if (skCase != null) { if (skCase != null) {
try { try {
List<BlackboardArtifact.Type> types = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) ? List<BlackboardArtifact.Type> types = (filteringDSObjId > 0) ?
blackboard.getArtifactTypesInUse(datasourceObjId) : blackboard.getArtifactTypesInUse(filteringDSObjId) :
skCase.getArtifactTypesInUse() ; skCase.getArtifactTypesInUse() ;
types.removeAll(doNotShow); types.removeAll(doNotShow);
@ -372,8 +370,8 @@ public class ExtractedContent implements AutopsyVisitableItem {
// a performance increase might be had by adding a // a performance increase might be had by adding a
// "getBlackboardArtifactCount()" method to skCase // "getBlackboardArtifactCount()" method to skCase
try { try {
this.childCount = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) ? this.childCount = (filteringDSObjId > 0) ?
blackboard.getArtifactsCount(type.getTypeID(), datasourceObjId) : blackboard.getArtifactsCount(type.getTypeID(), filteringDSObjId) :
skCase.getBlackboardArtifactsTypeCount(type.getTypeID()); skCase.getBlackboardArtifactsTypeCount(type.getTypeID());
} catch (TskException ex) { } catch (TskException ex) {
Logger.getLogger(TypeNode.class.getName()) Logger.getLogger(TypeNode.class.getName())
@ -501,8 +499,8 @@ public class ExtractedContent implements AutopsyVisitableItem {
protected List<BlackboardArtifact> makeKeys() { protected List<BlackboardArtifact> makeKeys() {
if (skCase != null) { if (skCase != null) {
try { try {
return Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) return (filteringDSObjId > 0)
? blackboard.getArtifacts(type.getTypeID(), datasourceObjId) ? blackboard.getArtifacts(type.getTypeID(), filteringDSObjId)
: skCase.getBlackboardArtifacts(type.getTypeID()); : skCase.getBlackboardArtifacts(type.getTypeID());
} catch (TskException ex) { } catch (TskException ex) {
Logger.getLogger(ArtifactFactory.class.getName()).log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex); //NON-NLS Logger.getLogger(ArtifactFactory.class.getName()).log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex); //NON-NLS

View File

@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -37,9 +36,7 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
@ -63,7 +60,7 @@ import org.sleuthkit.datamodel.VirtualDirectory;
public class FileSize implements AutopsyVisitableItem { public class FileSize implements AutopsyVisitableItem {
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
public enum FileSizeFilter implements AutopsyVisitableItem { public enum FileSizeFilter implements AutopsyVisitableItem {
@ -105,7 +102,7 @@ public class FileSize implements AutopsyVisitableItem {
public FileSize(SleuthkitCase skCase, long dsObjId) { public FileSize(SleuthkitCase skCase, long dsObjId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = dsObjId; this.filteringDSObjId = dsObjId;
} }
@Override @Override
@ -118,7 +115,7 @@ public class FileSize implements AutopsyVisitableItem {
} }
long filteringDataSourceObjId() { long filteringDataSourceObjId() {
return this.datasourceObjId; return this.filteringDSObjId;
} }
/* /*
* Root node. Children are nodes for specific sizes. * Root node. Children are nodes for specific sizes.
@ -437,7 +434,7 @@ public class FileSize implements AutopsyVisitableItem {
query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")"; //NON-NLS query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")"; //NON-NLS
// filter by datasource if indicated in case preferences // filter by datasource if indicated in case preferences
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
query += " AND data_source_obj_id = " + filteringDSObjId; query += " AND data_source_obj_id = " + filteringDSObjId;
} }

View File

@ -24,7 +24,6 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -39,7 +38,6 @@ import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
@ -366,7 +364,7 @@ public final class FileTypesByExtension implements AutopsyVisitableItem {
+ (UserPreferences.hideKnownFilesInViewsTree() + (UserPreferences.hideKnownFilesInViewsTree()
? " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ")" ? " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ")"
: " ") : " ")
+ (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) + (filteringDataSourceObjId() > 0
? " AND data_source_obj_id = " + filteringDataSourceObjId() ? " AND data_source_obj_id = " + filteringDataSourceObjId()
: " ") : " ")
+ " AND (extension IN (" + filter.getFilter().stream() + " AND (extension IN (" + filter.getFilter().stream()

View File

@ -28,7 +28,6 @@ import java.util.EnumSet;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -42,7 +41,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import static org.sleuthkit.autopsy.core.UserPreferences.hideKnownFilesInViewsTree; import static org.sleuthkit.autopsy.core.UserPreferences.hideKnownFilesInViewsTree;
import static org.sleuthkit.autopsy.core.UserPreferences.hideSlackFilesInViewsTree; import static org.sleuthkit.autopsy.core.UserPreferences.hideSlackFilesInViewsTree;
@ -103,7 +101,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
+ TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal() + TskData.TSK_DB_FILES_TYPE_ENUM.LOCAL.ordinal()
+ (hideSlackFilesInViewsTree() ? "" : ("," + TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.ordinal())) + (hideSlackFilesInViewsTree() ? "" : ("," + TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.ordinal()))
+ "))" + "))"
+ ( Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) ? " AND data_source_obj_id = " + this.filteringDataSourceObjId() : " ") + ( (filteringDataSourceObjId() > 0) ? " AND data_source_obj_id = " + this.filteringDataSourceObjId() : " ")
+ (hideKnownFilesInViewsTree() ? (" AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ")") : ""); + (hideKnownFilesInViewsTree() ? (" AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ")") : "");
} }

View File

@ -22,26 +22,38 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
import java.util.logging.Level;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.Type;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.events.AutopsyEvent; import org.sleuthkit.autopsy.events.AutopsyEvent;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.Tag; import org.sleuthkit.datamodel.Tag;
import org.sleuthkit.datamodel.TskCoreException;
/** /**
* Background task to get Score, Comment and Occurrences values for an * Background task to get Score, Comment and Occurrences values for an Abstract
* Abstract content node. * content node.
* *
*/ */
class GetSCOTask implements Runnable { class GetSCOTask implements Runnable {
private final WeakReference<AbstractContentNode<?>> weakNodeRef; private final WeakReference<AbstractContentNode<?>> weakNodeRef;
private final PropertyChangeListener listener; private final PropertyChangeListener listener;
private static final Logger logger = Logger.getLogger(GetSCOTask.class.getName());
GetSCOTask(WeakReference<AbstractContentNode<?>> weakContentRef, PropertyChangeListener listener) { GetSCOTask(WeakReference<AbstractContentNode<?>> weakContentRef, PropertyChangeListener listener) {
this.weakNodeRef = weakContentRef; this.weakNodeRef = weakContentRef;
this.listener = listener; this.listener = listener;
} }
@Messages({"GetSCOTask.occurrences.defaultDescription=No correlation properties found",
"GetSCOTask.occurrences.multipleProperties=Multiple different correlation properties exist for this result"})
@Override @Override
public void run() { public void run() {
AbstractContentNode<?> contentNode = weakNodeRef.get(); AbstractContentNode<?> contentNode = weakNodeRef.get();
@ -53,17 +65,61 @@ class GetSCOTask implements Runnable {
// get the SCO column values // get the SCO column values
List<Tag> tags = contentNode.getAllTagsFromDatabase(); List<Tag> tags = contentNode.getAllTagsFromDatabase();
CorrelationAttributeInstance attribute = contentNode.getCorrelationAttributeInstance(); CorrelationAttributeInstance fileAttribute = contentNode.getCorrelationAttributeInstance();
SCOData scoData = new SCOData(); SCOData scoData = new SCOData();
scoData.setScoreAndDescription(contentNode.getScorePropertyAndDescription(tags)); scoData.setScoreAndDescription(contentNode.getScorePropertyAndDescription(tags));
scoData.setComment(contentNode.getCommentProperty(tags, attribute)); scoData.setComment(contentNode.getCommentProperty(tags, fileAttribute));
if (!UserPreferences.hideCentralRepoCommentsAndOccurrences()) { if (!UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
scoData.setCountAndDescription(contentNode.getCountPropertyAndDescription(attribute)); Type type = null;
String value = null;
String description = Bundle.GetSCOTask_occurrences_defaultDescription();
if (contentNode instanceof BlackboardArtifactNode) {
BlackboardArtifact bbArtifact = ((BlackboardArtifactNode) contentNode).getArtifact();
//for specific artifact types we still want to display information for the file instance correlation attribute
if (bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_SUSPECTED.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_OBJECT_DETECTED.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_EXT_MISMATCH_DETECTED.getTypeID()
|| bbArtifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID()) {
try {
if (bbArtifact.getParent() instanceof AbstractFile) {
type = CorrelationAttributeInstance.getDefaultCorrelationTypes().get(CorrelationAttributeInstance.FILES_TYPE_ID);
value = ((AbstractFile) bbArtifact.getParent()).getMd5Hash();
}
} catch (TskCoreException | EamDbException ex) {
logger.log(Level.WARNING, "Unable to get correlation type or value to determine value for O column for artifact", ex);
}
} else {
List<CorrelationAttributeInstance> listOfPossibleAttributes = EamArtifactUtil.makeInstancesFromBlackboardArtifact(bbArtifact, false);
if (listOfPossibleAttributes.size() > 1) {
//Don't display anything if there is more than 1 correlation property for an artifact but let the user know
description = Bundle.GetSCOTask_occurrences_multipleProperties();
} else if (!listOfPossibleAttributes.isEmpty()) {
//there should only be one item in the list
type = listOfPossibleAttributes.get(0).getCorrelationType();
value = listOfPossibleAttributes.get(0).getCorrelationValue();
}
}
} else if (contentNode.getContent() instanceof AbstractFile) {
//use the file instance correlation attribute if the node is not a BlackboardArtifactNode
try {
type = CorrelationAttributeInstance.getDefaultCorrelationTypes().get(CorrelationAttributeInstance.FILES_TYPE_ID);
value = ((AbstractFile) contentNode.getContent()).getMd5Hash();
} catch (EamDbException ex) {
logger.log(Level.WARNING, "Unable to get correlation type to determine value for O column for file", ex);
}
}
scoData.setCountAndDescription(contentNode.getCountPropertyAndDescription(type, value, description));
} }
// signal SCO data is available. // signal SCO data is available.
if (listener != null) { if (listener
!= null) {
listener.propertyChange(new PropertyChangeEvent( listener.propertyChange(new PropertyChangeEvent(
AutopsyEvent.SourceType.LOCAL.toString(), AutopsyEvent.SourceType.LOCAL.toString(),
AbstractAbstractFileNode.NodeSpecificEvents.SCO_AVAILABLE.toString(), AbstractAbstractFileNode.NodeSpecificEvents.SCO_AVAILABLE.toString(),

View File

@ -30,7 +30,6 @@ import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -42,7 +41,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
@ -65,7 +63,7 @@ public class HashsetHits implements AutopsyVisitableItem {
private static final Logger logger = Logger.getLogger(HashsetHits.class.getName()); private static final Logger logger = Logger.getLogger(HashsetHits.class.getName());
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final HashsetResults hashsetResults; private final HashsetResults hashsetResults;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
/** /**
@ -87,7 +85,7 @@ public class HashsetHits implements AutopsyVisitableItem {
*/ */
public HashsetHits(SleuthkitCase skCase, long objId) { public HashsetHits(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
hashsetResults = new HashsetResults(); hashsetResults = new HashsetResults();
} }
@ -142,8 +140,8 @@ public class HashsetHits implements AutopsyVisitableItem {
+ "attribute_type_id=" + setNameId //NON-NLS + "attribute_type_id=" + setNameId //NON-NLS
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS + " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS + " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
query += " AND blackboard_artifacts.data_source_obj_id = " + datasourceObjId; query += " AND blackboard_artifacts.data_source_obj_id = " + filteringDSObjId;
} }
try (CaseDbQuery dbQuery = skCase.executeQuery(query)) { try (CaseDbQuery dbQuery = skCase.executeQuery(query)) {

View File

@ -265,12 +265,15 @@ public class ImageNode extends AbstractContentNode<Image> {
protected List<Tag> getAllTagsFromDatabase() { protected List<Tag> getAllTagsFromDatabase() {
return new ArrayList<>(); return new ArrayList<>();
} }
/** /**
* Returns correlation attribute instance for the underlying content of the node. * Returns correlation attribute instance for the underlying content of the
* node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @return correlation attribute instance for the underlying content of the node. * @return correlation attribute instance for the underlying content of the
* node.
*/ */
@Override @Override
protected CorrelationAttributeInstance getCorrelationAttributeInstance() { protected CorrelationAttributeInstance getCorrelationAttributeInstance() {
@ -290,12 +293,13 @@ public class ImageNode extends AbstractContentNode<Image> {
protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) { protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) {
return Pair.of(DataResultViewerTable.Score.NO_SCORE, NO_DESCR); return Pair.of(DataResultViewerTable.Score.NO_SCORE, NO_DESCR);
} }
/** /**
* Returns comment property for the node. * Returns comment property for the node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @param tags list of tags * @param tags list of tags
* @param attribute correlation attribute instance * @param attribute correlation attribute instance
* *
* @return Comment property for the underlying content of the node. * @return Comment property for the underlying content of the node.
@ -304,17 +308,21 @@ public class ImageNode extends AbstractContentNode<Image> {
protected DataResultViewerTable.HasCommentStatus getCommentProperty(List<Tag> tags, CorrelationAttributeInstance attribute) { protected DataResultViewerTable.HasCommentStatus getCommentProperty(List<Tag> tags, CorrelationAttributeInstance attribute) {
return DataResultViewerTable.HasCommentStatus.NO_COMMENT; return DataResultViewerTable.HasCommentStatus.NO_COMMENT;
} }
/** /**
* Returns occurrences/count property for the node. * Returns occurrences/count property for the node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @param attribute correlation attribute instance * @param attributeType the type of the attribute to count
* @param attributeValue the value of the attribute to coun
* @param defaultDescription a description to use when none is determined by
* the getCountPropertyAndDescription method
* *
* @return count property for the underlying content of the node. * @return count property for the underlying content of the node.
*/ */
@Override @Override
protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance attribute) { protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance.Type attributeType, String attributeValue, String defaultDescription) {
return Pair.of(-1L, NO_DESCR); return Pair.of(-1L, NO_DESCR);
} }
} }

View File

@ -30,7 +30,6 @@ import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -42,7 +41,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestManager;
@ -61,7 +59,7 @@ public class InterestingHits implements AutopsyVisitableItem {
private static final Logger logger = Logger.getLogger(InterestingHits.class.getName()); private static final Logger logger = Logger.getLogger(InterestingHits.class.getName());
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final InterestingResults interestingResults = new InterestingResults(); private final InterestingResults interestingResults = new InterestingResults();
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
/** /**
* Constructor * Constructor
@ -82,7 +80,7 @@ public class InterestingHits implements AutopsyVisitableItem {
*/ */
public InterestingHits(SleuthkitCase skCase, long objId) { public InterestingHits(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
interestingResults.update(); interestingResults.update();
} }
@ -133,8 +131,8 @@ public class InterestingHits implements AutopsyVisitableItem {
+ "attribute_type_id=" + setNameId //NON-NLS + "attribute_type_id=" + setNameId //NON-NLS
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS + " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS + " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
query += " AND blackboard_artifacts.data_source_obj_id = " + datasourceObjId; query += " AND blackboard_artifacts.data_source_obj_id = " + filteringDSObjId;
} }
try (CaseDbQuery dbQuery = skCase.executeQuery(query)) { try (CaseDbQuery dbQuery = skCase.executeQuery(query)) {

View File

@ -31,7 +31,6 @@ import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -45,7 +44,6 @@ import org.openide.util.Lookup;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import static org.sleuthkit.autopsy.datamodel.Bundle.*; import static org.sleuthkit.autopsy.datamodel.Bundle.*;
@ -76,7 +74,7 @@ public class KeywordHits implements AutopsyVisitableItem {
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final KeywordResults keywordResults; private final KeywordResults keywordResults;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
/** /**
* String used in the instance MAP so that exact matches and substring can * String used in the instance MAP so that exact matches and substring can
@ -123,7 +121,7 @@ public class KeywordHits implements AutopsyVisitableItem {
*/ */
public KeywordHits(SleuthkitCase skCase, long objId) { public KeywordHits(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
keywordResults = new KeywordResults(); keywordResults = new KeywordResults();
} }
@ -344,8 +342,8 @@ public class KeywordHits implements AutopsyVisitableItem {
} }
String queryStr = KEYWORD_HIT_ATTRIBUTES_QUERY; String queryStr = KEYWORD_HIT_ATTRIBUTES_QUERY;
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
queryStr += " AND blackboard_artifacts.data_source_obj_id = " + datasourceObjId; queryStr += " AND blackboard_artifacts.data_source_obj_id = " + filteringDSObjId;
} }
try (CaseDbQuery dbQuery = skCase.executeQuery(queryStr)) { try (CaseDbQuery dbQuery = skCase.executeQuery(queryStr)) {

View File

@ -25,6 +25,7 @@ import org.openide.nodes.Children;
import org.openide.nodes.Node; import org.openide.nodes.Node;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.datamodel.accounts.Accounts; import org.sleuthkit.autopsy.datamodel.accounts.Accounts;
import org.sleuthkit.datamodel.SleuthkitVisitableItem;
/** /**
* Children implementation for the root node of a ContentNode tree. Accepts a * Children implementation for the root node of a ContentNode tree. Accepts a
@ -34,6 +35,7 @@ public class RootContentChildren extends Children.Keys<Object> {
private final Collection<? extends Object> contentKeys; private final Collection<? extends Object> contentKeys;
private final CreateAutopsyNodeVisitor createAutopsyNodeVisitor = new CreateAutopsyNodeVisitor(); private final CreateAutopsyNodeVisitor createAutopsyNodeVisitor = new CreateAutopsyNodeVisitor();
private final CreateSleuthkitNodeVisitor createSleuthkitNodeVisitor = new CreateSleuthkitNodeVisitor();
/** /**
* @param contentKeys root Content objects for the Node tree * @param contentKeys root Content objects for the Node tree
@ -68,7 +70,7 @@ public class RootContentChildren extends Children.Keys<Object> {
if (key instanceof AutopsyVisitableItem) { if (key instanceof AutopsyVisitableItem) {
return new Node[] {((AutopsyVisitableItem)key).accept(createAutopsyNodeVisitor)}; return new Node[] {((AutopsyVisitableItem)key).accept(createAutopsyNodeVisitor)};
} else { } else {
return null; return new Node[] {((SleuthkitVisitableItem)key).accept(createSleuthkitNodeVisitor)};
} }
} }

View File

@ -23,7 +23,6 @@ import java.beans.PropertyChangeListener;
import java.util.Collections; import java.util.Collections;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Set; import java.util.Set;
@ -35,7 +34,6 @@ import org.openide.nodes.Sheet;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.casemodule.services.TagsManager;
import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.core.UserPreferences;
@ -61,14 +59,14 @@ public class Tags implements AutopsyVisitableItem {
private static final String USER_NAME_PROPERTY = "user.name"; //NON-NLS private static final String USER_NAME_PROPERTY = "user.name"; //NON-NLS
private final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS private final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
Tags() { Tags() {
this(0); this(0);
} }
Tags(long dsObjId) { Tags(long dsObjId) {
this.datasourceObjId = dsObjId; this.filteringDSObjId = dsObjId;
} }
/** /**
@ -81,7 +79,7 @@ public class Tags implements AutopsyVisitableItem {
} }
long filteringDataSourceObjId() { long filteringDataSourceObjId() {
return this.datasourceObjId; return this.filteringDSObjId;
} }
@Override @Override
@ -156,7 +154,7 @@ public class Tags implements AutopsyVisitableItem {
private class TagNameNodeFactory extends ChildFactory.Detachable<TagName> implements Observer { private class TagNameNodeFactory extends ChildFactory.Detachable<TagName> implements Observer {
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
private final Set<Case.Events> CASE_EVENTS_OF_INTEREST = EnumSet.of(Case.Events.BLACKBOARD_ARTIFACT_TAG_ADDED, private final Set<Case.Events> CASE_EVENTS_OF_INTEREST = EnumSet.of(Case.Events.BLACKBOARD_ARTIFACT_TAG_ADDED,
Case.Events.BLACKBOARD_ARTIFACT_TAG_DELETED, Case.Events.BLACKBOARD_ARTIFACT_TAG_DELETED,
@ -219,7 +217,7 @@ public class Tags implements AutopsyVisitableItem {
* @param objId data source object id * @param objId data source object id
*/ */
TagNameNodeFactory(long objId) { TagNameNodeFactory(long objId) {
this.datasourceObjId = objId; this.filteringDSObjId = objId;
} }
@ -246,12 +244,12 @@ public class Tags implements AutopsyVisitableItem {
List<TagName> tagNamesInUse; List<TagName> tagNamesInUse;
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);
tagNamesInUse = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagNamesInUse = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUseForUser(datasourceObjId, userName) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUseForUser(filteringDSObjId, userName)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUseForUser(userName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUseForUser(userName);
} else { } else {
tagNamesInUse = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagNamesInUse = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse(datasourceObjId) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse(filteringDSObjId)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse(); : Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
} }
Collections.sort(tagNamesInUse); Collections.sort(tagNamesInUse);
@ -303,17 +301,17 @@ public class Tags implements AutopsyVisitableItem {
TagsManager tm = Case.getCurrentCaseThrows().getServices().getTagsManager(); TagsManager tm = Case.getCurrentCaseThrows().getServices().getTagsManager();
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
tagsCount = tm.getContentTagsCountByTagNameForUser(tagName, datasourceObjId, userName); tagsCount = tm.getContentTagsCountByTagNameForUser(tagName, filteringDSObjId, userName);
tagsCount += tm.getBlackboardArtifactTagsCountByTagNameForUser(tagName, datasourceObjId, userName); tagsCount += tm.getBlackboardArtifactTagsCountByTagNameForUser(tagName, filteringDSObjId, userName);
} else { } else {
tagsCount = tm.getContentTagsCountByTagNameForUser(tagName, userName); tagsCount = tm.getContentTagsCountByTagNameForUser(tagName, userName);
tagsCount += tm.getBlackboardArtifactTagsCountByTagNameForUser(tagName, userName); tagsCount += tm.getBlackboardArtifactTagsCountByTagNameForUser(tagName, userName);
} }
} else { } else {
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
tagsCount = tm.getContentTagsCountByTagName(tagName, datasourceObjId); tagsCount = tm.getContentTagsCountByTagName(tagName, filteringDSObjId);
tagsCount += tm.getBlackboardArtifactTagsCountByTagName(tagName, datasourceObjId); tagsCount += tm.getBlackboardArtifactTagsCountByTagName(tagName, filteringDSObjId);
} else { } else {
tagsCount = tm.getContentTagsCountByTagName(tagName); tagsCount = tm.getContentTagsCountByTagName(tagName);
tagsCount += tm.getBlackboardArtifactTagsCountByTagName(tagName); tagsCount += tm.getBlackboardArtifactTagsCountByTagName(tagName);
@ -424,12 +422,12 @@ public class Tags implements AutopsyVisitableItem {
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);
tagsCount = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagsCount = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagNameForUser(tagName, datasourceObjId, userName) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagNameForUser(tagName, filteringDSObjId, userName)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagNameForUser(tagName, userName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagNameForUser(tagName, userName);
} else { } else {
tagsCount = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagsCount = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagName(tagName, datasourceObjId) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagName(tagName, filteringDSObjId)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagName(tagName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsCountByTagName(tagName);
} }
} catch (TskCoreException | NoCurrentCaseException ex) { } catch (TskCoreException | NoCurrentCaseException ex) {
@ -486,8 +484,8 @@ public class Tags implements AutopsyVisitableItem {
protected boolean createKeys(List<ContentTag> keys) { protected boolean createKeys(List<ContentTag> keys) {
// Use the content tags bearing the specified tag name as the keys. // Use the content tags bearing the specified tag name as the keys.
try { try {
List<ContentTag> contentTags = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) List<ContentTag> contentTags = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByTagName(tagName, datasourceObjId) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByTagName(tagName, filteringDSObjId)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByTagName(tagName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByTagName(tagName);
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);
@ -544,12 +542,12 @@ public class Tags implements AutopsyVisitableItem {
try { try {
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);
tagsCount = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagsCount = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagNameForUser(tagName, datasourceObjId, userName) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagNameForUser(tagName, filteringDSObjId, userName)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagNameForUser(tagName, userName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagNameForUser(tagName, userName);
} else { } else {
tagsCount = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) tagsCount = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName, datasourceObjId) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName, filteringDSObjId)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsCountByTagName(tagName);
} }
} catch (TskCoreException | NoCurrentCaseException ex) { } catch (TskCoreException | NoCurrentCaseException ex) {
@ -606,8 +604,8 @@ public class Tags implements AutopsyVisitableItem {
protected boolean createKeys(List<BlackboardArtifactTag> keys) { protected boolean createKeys(List<BlackboardArtifactTag> keys) {
try { try {
// Use the blackboard artifact tags bearing the specified tag name as the keys. // Use the blackboard artifact tags bearing the specified tag name as the keys.
List<BlackboardArtifactTag> artifactTags = Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true) List<BlackboardArtifactTag> artifactTags = (filteringDSObjId > 0)
? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByTagName(tagName, datasourceObjId) ? Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByTagName(tagName, filteringDSObjId)
: Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByTagName(tagName); : Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByTagName(tagName);
if (UserPreferences.showOnlyCurrentUserTags()) { if (UserPreferences.showOnlyCurrentUserTags()) {
String userName = System.getProperty(USER_NAME_PROPERTY); String userName = System.getProperty(USER_NAME_PROPERTY);

View File

@ -50,6 +50,7 @@ import org.sleuthkit.datamodel.Tag;
* root directory of a file system * root directory of a file system
*/ */
public class VolumeNode extends AbstractContentNode<Volume> { public class VolumeNode extends AbstractContentNode<Volume> {
private static final Logger logger = Logger.getLogger(VolumeNode.class.getName()); private static final Logger logger = Logger.getLogger(VolumeNode.class.getName());
/** /**
@ -217,6 +218,7 @@ public class VolumeNode extends AbstractContentNode<Volume> {
public String getItemType() { public String getItemType() {
return DisplayableItemNode.FILE_PARENT_NODE_KEY; return DisplayableItemNode.FILE_PARENT_NODE_KEY;
} }
/** /**
* Reads and returns a list of all tags associated with this content node. * Reads and returns a list of all tags associated with this content node.
* *
@ -228,12 +230,15 @@ public class VolumeNode extends AbstractContentNode<Volume> {
protected List<Tag> getAllTagsFromDatabase() { protected List<Tag> getAllTagsFromDatabase() {
return new ArrayList<>(); return new ArrayList<>();
} }
/** /**
* Returns correlation attribute instance for the underlying content of the node. * Returns correlation attribute instance for the underlying content of the
* node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @return correlation attribute instance for the underlying content of the node. * @return correlation attribute instance for the underlying content of the
* node.
*/ */
@Override @Override
protected CorrelationAttributeInstance getCorrelationAttributeInstance() { protected CorrelationAttributeInstance getCorrelationAttributeInstance() {
@ -253,12 +258,13 @@ public class VolumeNode extends AbstractContentNode<Volume> {
protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) { protected Pair<DataResultViewerTable.Score, String> getScorePropertyAndDescription(List<Tag> tags) {
return Pair.of(DataResultViewerTable.Score.NO_SCORE, NO_DESCR); return Pair.of(DataResultViewerTable.Score.NO_SCORE, NO_DESCR);
} }
/** /**
* Returns comment property for the node. * Returns comment property for the node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @param tags list of tags * @param tags list of tags
* @param attribute correlation attribute instance * @param attribute correlation attribute instance
* *
* @return Comment property for the underlying content of the node. * @return Comment property for the underlying content of the node.
@ -267,17 +273,21 @@ public class VolumeNode extends AbstractContentNode<Volume> {
protected DataResultViewerTable.HasCommentStatus getCommentProperty(List<Tag> tags, CorrelationAttributeInstance attribute) { protected DataResultViewerTable.HasCommentStatus getCommentProperty(List<Tag> tags, CorrelationAttributeInstance attribute) {
return DataResultViewerTable.HasCommentStatus.NO_COMMENT; return DataResultViewerTable.HasCommentStatus.NO_COMMENT;
} }
/** /**
* Returns occurrences/count property for the node. * Returns occurrences/count property for the node.
* *
* Null implementation of an abstract method. * Null implementation of an abstract method.
* *
* @param attribute correlation attribute instance * @param attributeType the type of the attribute to count
* @param attributeValue the value of the attribute to coun
* @param defaultDescription a description to use when none is determined by
* the getCountPropertyAndDescription method
* *
* @return count property for the underlying content of the node. * @return count property for the underlying content of the node.
*/ */
@Override @Override
protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance attribute) { protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance.Type attributeType, String attributeValue, String defaultDescription) {
return Pair.of(-1L, NO_DESCR); return Pair.of(-1L, NO_DESCR);
} }
} }

View File

@ -57,9 +57,7 @@ import org.openide.util.NbBundle;
import org.openide.util.Utilities; import org.openide.util.Utilities;
import org.openide.util.lookup.Lookups; import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.CasePreferences;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent; import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.datamodel.AutopsyItemVisitor; import org.sleuthkit.autopsy.datamodel.AutopsyItemVisitor;
@ -96,7 +94,7 @@ final public class Accounts implements AutopsyVisitableItem {
final public static String NAME = Bundle.AccountsRootNode_name(); final public static String NAME = Bundle.AccountsRootNode_name();
private SleuthkitCase skCase; private SleuthkitCase skCase;
private final long datasourceObjId; private final long filteringDSObjId; // 0 if not filtering/grouping by data source
private final EventBus reviewStatusBus = new EventBus("ReviewStatusBus"); private final EventBus reviewStatusBus = new EventBus("ReviewStatusBus");
@ -123,7 +121,7 @@ final public class Accounts implements AutopsyVisitableItem {
*/ */
public Accounts(SleuthkitCase skCase, long objId) { public Accounts(SleuthkitCase skCase, long objId) {
this.skCase = skCase; this.skCase = skCase;
this.datasourceObjId = objId; this.filteringDSObjId = objId;
this.rejectActionInstance = new RejectAccounts(); this.rejectActionInstance = new RejectAccounts();
this.approveActionInstance = new ApproveAccounts(); this.approveActionInstance = new ApproveAccounts();
@ -153,8 +151,8 @@ final public class Accounts implements AutopsyVisitableItem {
* based on the CasePreferences groupItemsInTreeByDataSource setting * based on the CasePreferences groupItemsInTreeByDataSource setting
*/ */
private String getFilterByDataSourceClause() { private String getFilterByDataSourceClause() {
if (Objects.equals(CasePreferences.getGroupItemsInTreeByDataSource(), true)) { if (filteringDSObjId > 0) {
return " AND blackboard_artifacts.data_source_obj_id = " + datasourceObjId + " "; return " AND blackboard_artifacts.data_source_obj_id = " + filteringDSObjId + " ";
} }
return " "; return " ";

View File

@ -6,7 +6,7 @@ OptionsCategory_Name_InterestingItemDefinitions=Interesting Files
OptionsCategory_Keywords_InterestingItemDefinitions=InterestingItemDefinitions OptionsCategory_Keywords_InterestingItemDefinitions=InterestingItemDefinitions
InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier
InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets. InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets.
FilesSetPanel.interesting.title=Interesting Files Set FilesSetPanel.interesting.title=Interesting Files Set Rule
FilesSetPanel.interesting.messages.filesSetsMustBeNamed=Interesting files sets must be named. FilesSetPanel.interesting.messages.filesSetsMustBeNamed=Interesting files sets must be named.
FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name. FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name.
FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files
@ -31,13 +31,13 @@ FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *
FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression. FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression.
FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0} FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0}
FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists. FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists.
FilesSetRulePanel.pathSeparatorInfoLabel.text=Use / as path separator FilesSetRulePanel.pathSeparatorInfoLabel.text=Folder must be in parent path. Use '/' to give consecutive names
FilesIdentifierIngestJobSettingsPanel.border.title=Select interesting files sets to enable during ingest: FilesIdentifierIngestJobSettingsPanel.border.title=Select interesting files sets to enable during ingest:
FilesSetRulePanel.jLabel1.text=Type: FilesSetRulePanel.jLabel1.text=Type:
FilesSetRulePanel.interesting.jLabel5.text=Enter information about files that you want to find. FilesSetRulePanel.interesting.jLabel5.text=Enter information about files that you want to find.
FilesSetRulePanel.ingest.jLabel5.text=Enter information about files that you want to run ingest on. FilesSetRulePanel.ingest.jLabel5.text=Enter information about files that you want to run ingest on.
FilesSetRulePanel.nameCheck.text=Name: FilesSetRulePanel.nameCheck.text=Name:
FilesSetRulePanel.pathCheck.text=Path Substring: FilesSetRulePanel.pathCheck.text=Folder Name:
FilesSetRulePanel.filesRadioButton.text=Files FilesSetRulePanel.filesRadioButton.text=Files
FilesSetRulePanel.dirsRadioButton.text=Directories FilesSetRulePanel.dirsRadioButton.text=Directories
FilesSetDefsPanel.interesting.setsListLabel.text=Rule Sets: FilesSetDefsPanel.interesting.setsListLabel.text=Rule Sets:

View File

@ -37,6 +37,8 @@ FilesSetPanel.ingest.createNewFilter=Create/edit file ingest filters...
FilesSetPanel.ingest.messages.filtersMustBeNamed=File ingest filters must be named. FilesSetPanel.ingest.messages.filtersMustBeNamed=File ingest filters must be named.
FilesSetPanel.rule.title=File Filter Rule FilesSetPanel.rule.title=File Filter Rule
FilesSetRulePanel.bytes=Bytes FilesSetRulePanel.bytes=Bytes
#{0} - regex
FilesSetRulePanel.CommaInRegexWarning=Warning: Comma(s) in the file extension field will be interpreted as part of a regex and will not split the entry into multiple extensions (Entered: "{0}")
FilesSetRulePanel.DaysIncludedEmptyError=Number of days included cannot be empty. FilesSetRulePanel.DaysIncludedEmptyError=Number of days included cannot be empty.
FilesSetRulePanel.DaysIncludedInvalidError=Number of days included must be a positive integer. FilesSetRulePanel.DaysIncludedInvalidError=Number of days included must be a positive integer.
FilesSetRulePanel.gigaBytes=Gigabytes FilesSetRulePanel.gigaBytes=Gigabytes
@ -60,7 +62,7 @@ OptionsCategory_Name_InterestingItemDefinitions=Interesting Files
OptionsCategory_Keywords_InterestingItemDefinitions=InterestingItemDefinitions OptionsCategory_Keywords_InterestingItemDefinitions=InterestingItemDefinitions
InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier
InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets. InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets.
FilesSetPanel.interesting.title=Interesting Files Set FilesSetPanel.interesting.title=Interesting Files Set Rule
FilesSetPanel.interesting.messages.filesSetsMustBeNamed=Interesting files sets must be named. FilesSetPanel.interesting.messages.filesSetsMustBeNamed=Interesting files sets must be named.
FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name. FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name.
FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files
@ -85,13 +87,13 @@ FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *
FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression. FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression.
FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0} FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0}
FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists. FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists.
FilesSetRulePanel.pathSeparatorInfoLabel.text=Use / as path separator FilesSetRulePanel.pathSeparatorInfoLabel.text=Folder must be in parent path. Use '/' to give consecutive names
FilesIdentifierIngestJobSettingsPanel.border.title=Select interesting files sets to enable during ingest: FilesIdentifierIngestJobSettingsPanel.border.title=Select interesting files sets to enable during ingest:
FilesSetRulePanel.jLabel1.text=Type: FilesSetRulePanel.jLabel1.text=Type:
FilesSetRulePanel.interesting.jLabel5.text=Enter information about files that you want to find. FilesSetRulePanel.interesting.jLabel5.text=Enter information about files that you want to find.
FilesSetRulePanel.ingest.jLabel5.text=Enter information about files that you want to run ingest on. FilesSetRulePanel.ingest.jLabel5.text=Enter information about files that you want to run ingest on.
FilesSetRulePanel.nameCheck.text=Name: FilesSetRulePanel.nameCheck.text=Name:
FilesSetRulePanel.pathCheck.text=Path Substring: FilesSetRulePanel.pathCheck.text=Folder Name:
FilesSetRulePanel.filesRadioButton.text=Files FilesSetRulePanel.filesRadioButton.text=Files
FilesSetRulePanel.dirsRadioButton.text=Directories FilesSetRulePanel.dirsRadioButton.text=Directories
FilesSetDefsPanel.interesting.setsListLabel.text=Rule Sets: FilesSetDefsPanel.interesting.setsListLabel.text=Rule Sets:

View File

@ -832,6 +832,7 @@
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="f0" green="f0" red="f0" type="rgb"/> <Color blue="f0" green="f0" red="f0" type="rgb"/>
</Property> </Property>
<Property name="editable" type="boolean" value="true"/>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="new javax.swing.DefaultComboBoxModel&lt;String&gt;(new String[] {&quot;&quot;})" type="code"/> <Connection code="new javax.swing.DefaultComboBoxModel&lt;String&gt;(new String[] {&quot;&quot;})" type="code"/>
</Property> </Property>

View File

@ -811,6 +811,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.jLabel7.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.jLabel7.text")); // NOI18N
mimeTypeComboBox.setBackground(new java.awt.Color(240, 240, 240)); mimeTypeComboBox.setBackground(new java.awt.Color(240, 240, 240));
mimeTypeComboBox.setEditable(true);
mimeTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] {""})); mimeTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] {""}));
mimeTypeComboBox.setEnabled(false); mimeTypeComboBox.setEnabled(false);
mimeTypeComboBox.setMinimumSize(new java.awt.Dimension(0, 20)); mimeTypeComboBox.setMinimumSize(new java.awt.Dimension(0, 20));

View File

@ -57,7 +57,9 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
"FilesSetRulePanel.NoPathError=Path cannot be empty", "FilesSetRulePanel.NoPathError=Path cannot be empty",
"FilesSetRulePanel.DaysIncludedEmptyError=Number of days included cannot be empty.", "FilesSetRulePanel.DaysIncludedEmptyError=Number of days included cannot be empty.",
"FilesSetRulePanel.DaysIncludedInvalidError=Number of days included must be a positive integer.", "FilesSetRulePanel.DaysIncludedInvalidError=Number of days included must be a positive integer.",
"FilesSetRulePanel.ZeroFileSizeError=File size condition value must not be 0 (Unless = is selected)." "FilesSetRulePanel.ZeroFileSizeError=File size condition value must not be 0 (Unless = is selected).",
"#{0} - regex",
"FilesSetRulePanel.CommaInRegexWarning=Warning: Comma(s) in the file extension field will be interpreted as part of a regex and will not split the entry into multiple extensions (Entered: \"{0}\")",
}) })
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -130,6 +132,7 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
this.setButtons(okButton, cancelButton); this.setButtons(okButton, cancelButton);
updateNameTextFieldPrompt(); updateNameTextFieldPrompt();
setComponentsForSearchType();
} }
/** /**
@ -358,6 +361,16 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
return false; return false;
} }
if (this.nameRegexCheckbox.isSelected()) { if (this.nameRegexCheckbox.isSelected()) {
// If extension is also selected and the regex contains a comma, display a warning
// since it is unclear whether the comma is part of a regex or is separating extensions.
if (this.extensionRadioButton.isSelected() && this.nameTextField.getText().contains(",")) {
NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
Bundle.FilesSetRulePanel_CommaInRegexWarning(this.nameTextField.getText()),
NotifyDescriptor.WARNING_MESSAGE);
DialogDisplayer.getDefault().notify(notifyDesc);
}
try { try {
Pattern.compile(this.nameTextField.getText()); Pattern.compile(this.nameTextField.getText());
} catch (PatternSyntaxException ex) { } catch (PatternSyntaxException ex) {

View File

@ -48,18 +48,18 @@ import java.util.TreeMap;
import java.util.logging.Level; import java.util.logging.Level;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.swing.JPanel; import javax.swing.JPanel;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.openide.filesystems.FileUtil; import org.openide.filesystems.FileUtil;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.casemodule.services.Services;
import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.casemodule.services.TagsManager;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewerTagManager.ContentViewerTag;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagRegion;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization; import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagsUtility;
import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.autopsy.coreutils.EscapeUtil;
import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
@ -732,6 +732,29 @@ class ReportHTML implements TableReportModule {
} }
} }
/**
* Finds all associated image tags.
*
* @param contentTags
* @return
*/
private List<ImageTagRegion> getTaggedRegions(List<ContentTag> contentTags) {
ArrayList<ImageTagRegion> tagRegions = new ArrayList<>();
contentTags.forEach((contentTag) -> {
try {
ContentViewerTag<ImageTagRegion> contentViewerTag = ContentViewerTagManager
.getTag(contentTag, ImageTagRegion.class);
if (contentViewerTag != null) {
tagRegions.add(contentViewerTag.getDetails());
}
} catch (TskCoreException | NoCurrentCaseException ex) {
logger.log(Level.WARNING, "Could not get content viewer tag "
+ "from case db for content_tag with id %d", contentTag.getId());
}
});
return tagRegions;
}
/** /**
* Add the body of the thumbnails table. * Add the body of the thumbnails table.
* *
@ -770,13 +793,54 @@ class ReportHTML implements TableReportModule {
} }
AbstractFile file = (AbstractFile) content; AbstractFile file = (AbstractFile) content;
List<ContentTag> contentTags = new ArrayList<>();
String thumbnailPath = null;
String imageWithTagsFullPath = null;
try {
//Get content tags and all image tags
contentTags = Case.getCurrentCase().getServices()
.getTagsManager().getContentTagsByContent(file);
List<ImageTagRegion> imageTags = getTaggedRegions(contentTags);
if(!imageTags.isEmpty()) {
//Write the tags to the fullsize and thumbnail images
BufferedImage fullImageWithTags = ImageTagsUtility.writeTags(file, imageTags, "png");
BufferedImage thumbnailImageWithTags = ImageTagsUtility.makeThumbnail(file,
imageTags, ImageTagsUtility.IconSize.MEDIUM, "png");
String fileName = org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName(file.getName());
//Create paths in report to write tagged images
File thumbnailImageWithTagsFile = Paths.get(thumbsPath, FilenameUtils.removeExtension(fileName) + ".png").toFile();
String fullImageWithTagsPath = makeCustomUniqueFilePath(file, "thumbs_fullsize");
fullImageWithTagsPath = FilenameUtils.removeExtension(fullImageWithTagsPath) + ".png";
File fullImageWithTagsFile = Paths.get(fullImageWithTagsPath).toFile();
//Save images
ImageIO.write(thumbnailImageWithTags, "png", thumbnailImageWithTagsFile);
ImageIO.write(fullImageWithTags, "png", fullImageWithTagsFile);
thumbnailPath = THUMBS_REL_PATH + thumbnailImageWithTagsFile.getName();
//Relative path
imageWithTagsFullPath = fullImageWithTagsPath.substring(subPath.length());
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Could not get tags for file.", ex); //NON-NLS
} catch (IOException ex) {
logger.log(Level.WARNING, "Could make marked up thumbnail.", ex); //NON-NLS
}
// save copies of the orginal image and thumbnail image // save copies of the orginal image and thumbnail image
String thumbnailPath = prepareThumbnail(file); if(thumbnailPath == null) {
thumbnailPath = prepareThumbnail(file);
}
if (thumbnailPath == null) { if (thumbnailPath == null) {
continue; continue;
} }
String contentPath = saveContent(file, "thumbs_fullsize"); //NON-NLS String contentPath = saveContent(file, "original"); //NON-NLS
String nameInImage; String nameInImage;
try { try {
nameInImage = file.getUniquePath(); nameInImage = file.getUniquePath();
@ -785,32 +849,27 @@ class ReportHTML implements TableReportModule {
} }
StringBuilder linkToThumbnail = new StringBuilder(); StringBuilder linkToThumbnail = new StringBuilder();
linkToThumbnail.append("<div id='thumbnail_link'>"); linkToThumbnail.append("<div id='thumbnail_link'><a href=\"")
linkToThumbnail.append("<a href=\""); //NON-NLS .append((imageWithTagsFullPath != null) ? imageWithTagsFullPath : contentPath)
linkToThumbnail.append(contentPath); .append("\" target=\"_top\"><img src=\"")
linkToThumbnail.append("\" target=\"_top\">"); .append(thumbnailPath).append("\" title=\"").append(nameInImage).append("\"/></a><br>") //NON-NLS
linkToThumbnail.append("<img src=\"").append(thumbnailPath).append("\" title=\"").append(nameInImage).append("\"/>"); //NON-NLS .append(file.getName()).append("<br>"); //NON-NLS
linkToThumbnail.append("</a><br>"); //NON-NLS if(imageWithTagsFullPath != null) {
linkToThumbnail.append(file.getName()).append("<br>"); //NON-NLS linkToThumbnail.append("<a href=\"").append(contentPath).append("\" target=\"_top\">View Original</a><br>");
Services services = currentCase.getServices();
TagsManager tagsManager = services.getTagsManager();
try {
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
if (tags.size() > 0) {
linkToThumbnail.append(NbBundle.getMessage(this.getClass(), "ReportHTML.thumbLink.tags"));
}
for (int i = 0; i < tags.size(); i++) {
ContentTag tag = tags.get(i);
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
linkToThumbnail.append(tag.getName().getDisplayName()).append(notableString);
if (i != tags.size() - 1) {
linkToThumbnail.append(", ");
}
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Could not find get tags for file.", ex); //NON-NLS
} }
if (!contentTags.isEmpty()) {
linkToThumbnail.append(NbBundle.getMessage(this.getClass(), "ReportHTML.thumbLink.tags"));
}
for (int i = 0; i < contentTags.size(); i++) {
ContentTag tag = contentTags.get(i);
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
linkToThumbnail.append(tag.getName().getDisplayName()).append(notableString);
if (i != contentTags.size() - 1) {
linkToThumbnail.append(", ");
}
}
linkToThumbnail.append("</div>"); linkToThumbnail.append("</div>");
currentRow.add(linkToThumbnail.toString()); currentRow.add(linkToThumbnail.toString());
@ -840,16 +899,7 @@ class ReportHTML implements TableReportModule {
|| file.getType() == TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS; || file.getType() == TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS;
} }
/** private String makeCustomUniqueFilePath(AbstractFile file, String dirName) {
* Save a local copy of the given file in the reports folder.
*
* @param file File to save
* @param dirName Custom top-level folder to use to store the files in (tag
* name, etc.)
*
* @return Path to where file was stored (relative to root of HTML folder)
*/
public String saveContent(AbstractFile file, String dirName) {
// clean up the dir name passed in // clean up the dir name passed in
String dirName2 = org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName(dirName); String dirName2 = org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName(dirName);
@ -884,15 +934,31 @@ class ReportHTML implements TableReportModule {
localFilePath.append(File.separator); localFilePath.append(File.separator);
localFilePath.append(fileName); localFilePath.append(fileName);
return localFilePath.toString();
}
/**
* Save a local copy of the given file in the reports folder.
*
* @param file File to save
* @param dirName Custom top-level folder to use to store the files in (tag
* name, etc.)
*
* @return Path to where file was stored (relative to root of HTML folder)
*/
public String saveContent(AbstractFile file, String dirName) {
String localFilePath = makeCustomUniqueFilePath(file, dirName);
// If the local file doesn't already exist, create it now. // If the local file doesn't already exist, create it now.
// The existence check is necessary because it is possible to apply multiple tags with the same tagName to a file. // The existence check is necessary because it is possible to apply multiple tags with the same tagName to a file.
File localFile = new File(localFilePath.toString()); File localFile = new File(localFilePath);
if (!localFile.exists()) { if (!localFile.exists()) {
ExtractFscContentVisitor.extract(file, localFile, null, null); ExtractFscContentVisitor.extract(file, localFile, null, null);
} }
// get the relative path // get the relative path
return localFilePath.toString().substring(subPath.length()); return localFilePath.substring(subPath.length());
} }
/** /**

View File

@ -217,10 +217,10 @@ class QueryResults {
SleuthkitCase tskCase = Case.getCurrentCaseThrows().getSleuthkitCase(); SleuthkitCase tskCase = Case.getCurrentCaseThrows().getSleuthkitCase();
content = tskCase.getContentById(hit.getContentID()); content = tskCase.getContentById(hit.getContentID());
} catch (TskCoreException | NoCurrentCaseException tskCoreException) { } catch (TskCoreException | NoCurrentCaseException tskCoreException) {
logger.log(Level.SEVERE, "Failed to get text source object for ", tskCoreException); //NON-NLS logger.log(Level.SEVERE, "Failed to get text source object for keyword hit", tskCoreException); //NON-NLS
} }
if (saveResults) { if ((content != null) && saveResults) {
/* /*
* Post an artifact for the hit to the blackboard. * Post an artifact for the hit to the blackboard.
*/ */

View File

@ -42,7 +42,7 @@ The top line allows you to choose whether you want to match only files, only dir
Each rule must have at least one condition. To create conditions, check the box to the left of the condition you want to enable. The following is a description of each condition, with some full examples after. Each rule must have at least one condition. To create conditions, check the box to the left of the condition you want to enable. The following is a description of each condition, with some full examples after.
<ul> <ul>
<li><b>Name</b> - Enter either the full file name or one or more extensions, and select whether this is an exact match or a substring/regex match. If substring/regex match is enabled, it will automatically add wildcards to the beginning and end of the text. If you're only matching directories, this will match the directory name. If you're using a comma-separated list of extensions, make sure the regex checkbox is disabled - the two features do not work together. The following table shows some examples of what the different combinations can be used for. <li><b>Name</b> - Enter either the full file name or one or more extensions, and select whether this is an exact match or a substring/regex match. If substring/regex match is enabled, it will automatically add wildcards to the beginning and end of the text. If you're only matching directories, this will match the directory name. If you're using a comma-separated list of extensions, make sure the regex checkbox is disabled - the entire contents will be interpreted as one regex when the checkbox is selected. The following table shows some examples of what the different combinations can be used for.
<table> <table>
<tr><th>Type</th><th>Substring/Regex</th><th>Text</th><th>Description</th><th>Sample match</th></tr> <tr><th>Type</th><th>Substring/Regex</th><th>Text</th><th>Description</th><th>Sample match</th></tr>