mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 00:46:16 +00:00
6305 adjustments for UI to resize better
This commit is contained in:
parent
53eff40214
commit
cf89bc536d
@ -15,7 +15,7 @@ import javax.swing.event.ListSelectionListener;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
abstract class AbstractDiscoveryFiltersPanel extends javax.swing.JPanel {
|
||||
abstract class AbstractDiscoveryFilterPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -56,4 +56,17 @@ abstract class AbstractDiscoveryFiltersPanel extends javax.swing.JPanel {
|
||||
|
||||
abstract FileSearchFiltering.FileFilter getFilter();
|
||||
|
||||
void removeListeners() {
|
||||
if (getCheckbox() != null) {
|
||||
for (ActionListener listener : getCheckbox().getActionListeners()) {
|
||||
getCheckbox().removeActionListener(listener);
|
||||
}
|
||||
}
|
||||
if (getList() != null) {
|
||||
for (ListSelectionListener listener : getList().getListSelectionListeners()) {
|
||||
getList().removeListSelectionListener(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -20,86 +20,88 @@ import javax.swing.event.ListSelectionListener;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
abstract class AbstractFilterPanel extends javax.swing.JPanel implements ActionListener {
|
||||
abstract class AbstractFiltersPanel extends javax.swing.JPanel implements ActionListener, ListSelectionListener {
|
||||
|
||||
AbstractFilterPanel() {
|
||||
constraints.fill = GridBagConstraints.VERTICAL;
|
||||
constraints.gridx = 0;
|
||||
constraints.gridy = 0;
|
||||
constraints.gridheight = 2;
|
||||
constraints.gridwidth = LABEL_WIDTH;
|
||||
constraints.weightx = LABEL_WEIGHT;
|
||||
constraints.anchor = GridBagConstraints.NORTHWEST;
|
||||
constraints.insets = new Insets(0, 8, 12, 8);
|
||||
}
|
||||
private static boolean isInitialized = false;
|
||||
private static final double LABEL_WEIGHT = 0;
|
||||
private static final double PANEL_WEIGHT = 0;
|
||||
private static final double PANEL_WEIGHT = .1;
|
||||
private static final int LABEL_WIDTH = 1;
|
||||
private static final int PANEL_WIDTH = 2;
|
||||
private static final int NUMBER_OF_COLUMNS = 6;
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final GridBagLayout layout = new GridBagLayout();
|
||||
private final GridBagConstraints constraints = new GridBagConstraints();
|
||||
private final List<AbstractDiscoveryFiltersPanel> filters = new ArrayList<>();
|
||||
private final List<AbstractDiscoveryFilterPanel> filters = new ArrayList<>();
|
||||
|
||||
abstract FileSearchData.FileType getFileType();
|
||||
|
||||
void addFilter(AbstractDiscoveryFiltersPanel filterPanel, boolean isSelected, int[] indicesSelected) {
|
||||
final synchronized void addFilter(AbstractDiscoveryFilterPanel filterPanel, boolean isSelected, int[] indicesSelected) {
|
||||
if (!isInitialized) {
|
||||
constraints.fill = GridBagConstraints.VERTICAL;
|
||||
constraints.gridx = 0;
|
||||
constraints.gridy = 0;
|
||||
constraints.gridheight = 2;
|
||||
constraints.gridwidth = LABEL_WIDTH;
|
||||
constraints.weightx = LABEL_WEIGHT;
|
||||
constraints.anchor = GridBagConstraints.NORTHWEST;
|
||||
constraints.insets = new Insets(0, 8, 12, 8);
|
||||
isInitialized = true;
|
||||
}
|
||||
filterPanel.configurePanel(isSelected, indicesSelected);
|
||||
filterPanel.addListeners(this, new ListSelectionListener() {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent evt) {
|
||||
if (!evt.getValueIsAdjusting()) {
|
||||
validateFields();
|
||||
}
|
||||
}
|
||||
});
|
||||
filters.add(filterPanel);
|
||||
addToGridBagLayout(filterPanel.getCheckbox(), null);
|
||||
addToGridBagLayout(filterPanel, null);
|
||||
constraints.weightx = .9;
|
||||
constraints.fill = GridBagConstraints.BOTH;
|
||||
addToGridBagLayout(new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)), null);
|
||||
filterPanel.addListeners(this, this);
|
||||
constraints.fill = GridBagConstraints.VERTICAL;
|
||||
filters.add(filterPanel);
|
||||
constraints.weightx = LABEL_WEIGHT;
|
||||
constraints.gridwidth = LABEL_WIDTH;
|
||||
addToGridBagLayout(filterPanel.getCheckbox(), null);
|
||||
nextSpot(LABEL_WIDTH);
|
||||
constraints.fill = GridBagConstraints.BOTH;
|
||||
constraints.weightx = PANEL_WEIGHT;
|
||||
constraints.gridwidth = PANEL_WIDTH;
|
||||
addToGridBagLayout(filterPanel, null);
|
||||
nextSpot(PANEL_WIDTH);
|
||||
updateLayout();
|
||||
}
|
||||
|
||||
void endPanel() {
|
||||
private void nextSpot(int width) {
|
||||
constraints.gridx += width;
|
||||
if (constraints.gridx >= NUMBER_OF_COLUMNS) {
|
||||
constraints.weightx = .9;
|
||||
constraints.gridwidth = LABEL_WIDTH;
|
||||
add(new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)), constraints);
|
||||
constraints.fill = GridBagConstraints.VERTICAL;
|
||||
constraints.gridy += constraints.gridheight;
|
||||
constraints.gridx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
final synchronized void endPanel() {
|
||||
//add filler at end
|
||||
constraints.gridy++;
|
||||
constraints.gridy += constraints.gridheight;
|
||||
constraints.fill = GridBagConstraints.BOTH;
|
||||
constraints.weightx = .9;
|
||||
constraints.weighty = .9;
|
||||
add(new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767)), constraints);
|
||||
}
|
||||
|
||||
void clearFilters() {
|
||||
final synchronized void clearFilters() {
|
||||
for (AbstractDiscoveryFilterPanel filterPanel : filters){
|
||||
filterPanel.removeListeners();
|
||||
}
|
||||
filters.clear();
|
||||
}
|
||||
|
||||
private void addToGridBagLayout(Component componentToAdd, Component additionalComponentToAdd) {
|
||||
if (constraints.gridx % 2 == 0) {
|
||||
constraints.weightx = LABEL_WEIGHT;
|
||||
constraints.gridwidth = LABEL_WIDTH;
|
||||
} else {
|
||||
constraints.weightx = PANEL_WEIGHT;
|
||||
constraints.gridwidth = PANEL_WIDTH;
|
||||
}
|
||||
if (additionalComponentToAdd != null) {
|
||||
constraints.gridheight = 1;
|
||||
constraints.gridheight /= 2;
|
||||
add(componentToAdd, constraints);
|
||||
constraints.gridy++;
|
||||
constraints.gridy += constraints.gridheight;
|
||||
add(additionalComponentToAdd, constraints);
|
||||
constraints.gridy--;
|
||||
constraints.gridheight = 2;
|
||||
constraints.gridy -= constraints.gridheight;
|
||||
constraints.gridheight *= 2;
|
||||
} else {
|
||||
add(componentToAdd, constraints);
|
||||
}
|
||||
constraints.gridx = (constraints.gridx + LABEL_WIDTH) % NUMBER_OF_COLUMNS;
|
||||
if (constraints.gridx == 0) {
|
||||
constraints.gridy += constraints.gridheight;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateLayout() {
|
||||
@ -113,6 +115,7 @@ abstract class AbstractFilterPanel extends javax.swing.JPanel implements ActionL
|
||||
* @param error
|
||||
*/
|
||||
private void setInvalid(String error) {
|
||||
System.out.println("ERROR FIRED " + error);
|
||||
firePropertyChange("FilterError", error, error);
|
||||
}
|
||||
|
||||
@ -120,26 +123,41 @@ abstract class AbstractFilterPanel extends javax.swing.JPanel implements ActionL
|
||||
* The settings are valid so enable the Search button
|
||||
*/
|
||||
private void setValid() {
|
||||
System.out.println("VALID FIRED");
|
||||
firePropertyChange("FilterError", null, null);
|
||||
}
|
||||
|
||||
private void validateFields() {
|
||||
String errorString;
|
||||
for (AbstractDiscoveryFiltersPanel filterPanel : filters) {
|
||||
System.out.println("VALIDATE FIELDS");
|
||||
for (AbstractDiscoveryFilterPanel filterPanel : filters) {
|
||||
errorString = filterPanel.checkForError();
|
||||
if (errorString != null) {
|
||||
setInvalid(errorString);
|
||||
return;
|
||||
}
|
||||
System.out.println("FILTER VALID");
|
||||
}
|
||||
setValid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
System.out.println("ACTION PERFORMED");
|
||||
validateFields();
|
||||
}
|
||||
|
||||
boolean isObjectsFilterSupported(){
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isHashSetFilterSupported(){
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isInterestingItemsFilterSupported(){
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Get a list of all filters selected by the user.
|
||||
*
|
||||
@ -150,10 +168,10 @@ abstract class AbstractFilterPanel extends javax.swing.JPanel implements ActionL
|
||||
*
|
||||
* @return the list of filters
|
||||
*/
|
||||
List<FileSearchFiltering.FileFilter> getFilters() {
|
||||
synchronized List<FileSearchFiltering.FileFilter> getFilters() {
|
||||
List<FileSearchFiltering.FileFilter> filtersToUse = new ArrayList<>();
|
||||
filtersToUse.add(new FileSearchFiltering.FileTypeFilter(getFileType()));
|
||||
for (AbstractDiscoveryFiltersPanel filterPanel : filters) {
|
||||
for (AbstractDiscoveryFilterPanel filterPanel : filters) {
|
||||
if (filterPanel.getCheckbox().isSelected()) {
|
||||
FileSearchFiltering.FileFilter filter = filterPanel.getFilter();
|
||||
if (filter != null) {
|
||||
@ -164,4 +182,12 @@ abstract class AbstractFilterPanel extends javax.swing.JPanel implements ActionL
|
||||
return filtersToUse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent evt) {
|
||||
System.out.println("VALUE CHANGED");
|
||||
if (!evt.getValueIsAdjusting()) {
|
||||
validateFields();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -73,7 +73,6 @@ UserCreatedFilterPanel.userCreatedCheckbox.text=Possibly User Created
|
||||
# and open the template in the editor.
|
||||
HashSetFilterPanel.hashSetCheckbox.text=Hash Set:
|
||||
InterestingItemFilterPanel.interestingItemsCheckbox.text=Interesting Item:
|
||||
ObjectDetectedFilterPanel.objectsCheckbox.text=Object Detected:
|
||||
ParentFolderFilterPanel.parentCheckbox.text=Parent Folder:
|
||||
ParentFolderFilterPanel.deleteButton.text=Delete
|
||||
ParentFolderFilterPanel.excludeRadioButton.text=Exclude
|
||||
@ -93,3 +92,8 @@ ParentFolderFilterPanel.parentLabel.text_1=(All will be used)
|
||||
InterestingItemsFilterPanel.interestingItemsCheckbox.text=Interesting Item:
|
||||
UserCreatedFilterPanel.userCreatedCheckbox.text_1=Possibly User Created
|
||||
PastOccurrencesFilterPanel.pastOccurrencesCheckbox.text=Past Occurrences:
|
||||
ObjectDetectedFilterPanel.text=Object Detected:
|
||||
DiscoveryDialog.sortingPanel.border.title=Grouping
|
||||
DiscoveryDialog.groupByLabel.text=Group By:
|
||||
DiscoveryDialog.orderByLabel.text=Order Within Groups By:
|
||||
DiscoveryDialog.orderGroupsByLabel.text=Order Groups By:
|
||||
|
@ -227,7 +227,6 @@ UserCreatedFilterPanel.userCreatedCheckbox.text=Possibly User Created
|
||||
# and open the template in the editor.
|
||||
HashSetFilterPanel.hashSetCheckbox.text=Hash Set:
|
||||
InterestingItemFilterPanel.interestingItemsCheckbox.text=Interesting Item:
|
||||
ObjectDetectedFilterPanel.objectsCheckbox.text=Object Detected:
|
||||
ParentFolderFilterPanel.parentCheckbox.text=Parent Folder:
|
||||
ParentFolderFilterPanel.deleteButton.text=Delete
|
||||
ParentFolderFilterPanel.excludeRadioButton.text=Exclude
|
||||
@ -247,6 +246,11 @@ ParentFolderFilterPanel.parentLabel.text_1=(All will be used)
|
||||
InterestingItemsFilterPanel.interestingItemsCheckbox.text=Interesting Item:
|
||||
UserCreatedFilterPanel.userCreatedCheckbox.text_1=Possibly User Created
|
||||
PastOccurrencesFilterPanel.pastOccurrencesCheckbox.text=Past Occurrences:
|
||||
ObjectDetectedFilterPanel.text=Object Detected:
|
||||
DiscoveryDialog.sortingPanel.border.title=Grouping
|
||||
DiscoveryDialog.groupByLabel.text=Group By:
|
||||
DiscoveryDialog.orderByLabel.text=Order Within Groups By:
|
||||
DiscoveryDialog.orderGroupsByLabel.text=Order Groups By:
|
||||
VideoThumbnailPanel.bytes.text=bytes
|
||||
VideoThumbnailPanel.deleted.text=All instances of file are deleted.
|
||||
VideoThumbnailPanel.gigaBytes.text=GB
|
||||
|
@ -21,7 +21,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
final class DataSourceFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
final class DataSourceFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger logger = Logger.getLogger(DataSourceFilterPanel.class.getName());
|
||||
|
@ -4,10 +4,10 @@
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[800, 600]"/>
|
||||
<Dimension value="[1000, 300]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[1000, 600]"/>
|
||||
<Dimension value="[1200, 600]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
@ -158,20 +158,26 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" pref="828" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="sortingPanel" pref="976" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="errorLabel" pref="828" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="sortingPanel" min="-2" pref="95" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="errorLabel" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
@ -217,6 +223,129 @@
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="sortingPanel">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Grouping">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.sortingPanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[345, 112]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="groupByLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="88" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="groupSortingComboBox" max="32767" attributes="0"/>
|
||||
<Component id="groupByCombobox" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orderByLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orderByCombobox" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="orderGroupsByLabel" min="-2" max="-2" 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">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="groupByCombobox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="groupByLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orderByCombobox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orderByLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="groupSortingComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orderGroupsByLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="groupByCombobox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<GroupingAttributeType>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="orderByCombobox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<SortingMethod>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orderGroupsByLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.orderGroupsByLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orderByLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.orderByLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="groupByLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.groupByLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="groupSortingComboBox">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<GroupSortingAlgorithm>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -28,6 +28,9 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.discovery.FileGroup.GroupSortingAlgorithm;
|
||||
import org.sleuthkit.autopsy.discovery.FileSearch.GroupingAttributeType;
|
||||
import org.sleuthkit.autopsy.discovery.FileSorter.SortingMethod;
|
||||
|
||||
final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
|
||||
@ -41,6 +44,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
private SearchWorker searchWorker = null;
|
||||
private static DiscoveryDialog discoveryDialog;
|
||||
private FileSearchData.FileType fileType = FileSearchData.FileType.IMAGE;
|
||||
private final PropertyChangeListener listener;
|
||||
|
||||
private DiscoveryDialog() {
|
||||
this(null, true);
|
||||
@ -59,10 +63,12 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
private DiscoveryDialog(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
initComponents();
|
||||
PropertyChangeListener listener = new PropertyChangeListener() {
|
||||
listener = new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
System.out.println("PROPERTY CHANGE EVENT");
|
||||
if (evt.getNewValue() instanceof String) {
|
||||
System.out.println("IS A STRING");
|
||||
String errorMessage = (String) evt.getNewValue();
|
||||
if (StringUtils.isBlank(errorMessage)) {
|
||||
setValid();
|
||||
@ -73,11 +79,10 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
|
||||
}
|
||||
};
|
||||
imageFilterPanel.addPropertyChangeListener(listener);
|
||||
videoFilterPanel.addPropertyChangeListener(listener);
|
||||
documentFilterPanel.addPropertyChangeListener(listener);
|
||||
for (GroupSortingAlgorithm groupSortAlgorithm : GroupSortingAlgorithm.values()) {
|
||||
groupSortingComboBox.addItem(groupSortAlgorithm);
|
||||
}
|
||||
updateSearchSettings();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,9 +102,34 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
fileType = FileSearchData.FileType.IMAGE;
|
||||
remove(imageFilterPanel);
|
||||
remove(videoFilterPanel);
|
||||
videoFilterPanel.removePropertyChangeListener(listener);
|
||||
remove(documentFilterPanel);
|
||||
documentFilterPanel.removePropertyChangeListener(listener);
|
||||
add(imageFilterPanel, CENTER);
|
||||
imageFilterPanel.removePropertyChangeListener(listener);
|
||||
imageFilterPanel.addPropertyChangeListener(listener);
|
||||
groupByCombobox.removeAllItems();
|
||||
// Set up the grouping attributes
|
||||
for (FileSearch.GroupingAttributeType type : FileSearch.GroupingAttributeType.getOptionsForGrouping()) {
|
||||
if ((type != GroupingAttributeType.FREQUENCY || CentralRepository.isEnabled())
|
||||
&& (type != GroupingAttributeType.OBJECT_DETECTED || imageFilterPanel.isObjectsFilterSupported())
|
||||
&& (type != GroupingAttributeType.INTERESTING_ITEM_SET || imageFilterPanel.isInterestingItemsFilterSupported())
|
||||
&& (type != GroupingAttributeType.HASH_LIST_NAME || imageFilterPanel.isHashSetFilterSupported())) {
|
||||
groupByCombobox.addItem(type);
|
||||
}
|
||||
}
|
||||
|
||||
orderByCombobox.removeAllItems();
|
||||
// Set up the file order list
|
||||
for (FileSorter.SortingMethod method : FileSorter.SortingMethod.getOptionsForOrdering()) {
|
||||
if (method != SortingMethod.BY_FREQUENCY || CentralRepository.isEnabled()) {
|
||||
orderByCombobox.addItem(method);
|
||||
}
|
||||
}
|
||||
|
||||
groupSortingComboBox.setSelectedIndex(0);
|
||||
pack();
|
||||
repaint();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,10 +149,17 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
searchButton = new javax.swing.JButton();
|
||||
errorLabel = new javax.swing.JLabel();
|
||||
javax.swing.JButton cancelButton = new javax.swing.JButton();
|
||||
javax.swing.JPanel sortingPanel = new javax.swing.JPanel();
|
||||
groupByCombobox = new javax.swing.JComboBox<>();
|
||||
orderByCombobox = new javax.swing.JComboBox<>();
|
||||
javax.swing.JLabel orderGroupsByLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel orderByLabel = new javax.swing.JLabel();
|
||||
javax.swing.JLabel groupByLabel = new javax.swing.JLabel();
|
||||
groupSortingComboBox = new javax.swing.JComboBox<>();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setMinimumSize(new java.awt.Dimension(800, 600));
|
||||
setPreferredSize(new java.awt.Dimension(1000, 600));
|
||||
setMinimumSize(new java.awt.Dimension(1000, 300));
|
||||
setPreferredSize(new java.awt.Dimension(1200, 600));
|
||||
|
||||
imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.imagesButton.text")); // NOI18N
|
||||
@ -206,23 +243,72 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
sortingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.sortingPanel.border.title"))); // NOI18N
|
||||
sortingPanel.setPreferredSize(new java.awt.Dimension(345, 112));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orderGroupsByLabel, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.orderGroupsByLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orderByLabel, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.orderByLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(groupByLabel, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.groupByLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout sortingPanelLayout = new javax.swing.GroupLayout(sortingPanel);
|
||||
sortingPanel.setLayout(sortingPanelLayout);
|
||||
sortingPanelLayout.setHorizontalGroup(
|
||||
sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(sortingPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(sortingPanelLayout.createSequentialGroup()
|
||||
.addComponent(groupByLabel)
|
||||
.addGap(88, 88, 88)
|
||||
.addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(groupSortingComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(groupByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(orderByLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(orderByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(orderGroupsByLabel))
|
||||
.addContainerGap())
|
||||
);
|
||||
sortingPanelLayout.setVerticalGroup(
|
||||
sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(sortingPanelLayout.createSequentialGroup()
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(groupByCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(groupByLabel)
|
||||
.addComponent(orderByCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(orderByLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(groupSortingComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(orderGroupsByLabel))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 828, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(searchButton)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 976, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 828, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(searchButton)))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(sortingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
@ -239,7 +325,9 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed
|
||||
// resetTopComponent();
|
||||
remove(videoFilterPanel);
|
||||
videoFilterPanel.removePropertyChangeListener(listener);
|
||||
remove(documentFilterPanel);
|
||||
documentFilterPanel.removePropertyChangeListener(listener);
|
||||
add(imageFilterPanel, CENTER);
|
||||
imagesButton.setSelected(true);
|
||||
imagesButton.setEnabled(false);
|
||||
@ -252,11 +340,16 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
documentsButton.setEnabled(true);
|
||||
documentsButton.setBackground(UNSELECTED_COLOR);
|
||||
fileType = FileSearchData.FileType.IMAGE;
|
||||
imageFilterPanel.addPropertyChangeListener(listener);
|
||||
pack();
|
||||
repaint();
|
||||
}//GEN-LAST:event_imagesButtonActionPerformed
|
||||
|
||||
private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed
|
||||
remove(imageFilterPanel);
|
||||
imageFilterPanel.removePropertyChangeListener(listener);
|
||||
remove(documentFilterPanel);
|
||||
documentFilterPanel.removePropertyChangeListener(listener);
|
||||
add(videoFilterPanel, CENTER);
|
||||
imagesButton.setSelected(false);
|
||||
imagesButton.setEnabled(true);
|
||||
@ -268,13 +361,19 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
documentsButton.setSelected(false);
|
||||
documentsButton.setEnabled(true);
|
||||
documentsButton.setBackground(UNSELECTED_COLOR);
|
||||
videoFilterPanel.addPropertyChangeListener(listener);
|
||||
fileType = FileSearchData.FileType.VIDEO;
|
||||
pack();
|
||||
repaint();
|
||||
}//GEN-LAST:event_videosButtonActionPerformed
|
||||
|
||||
private void documentsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsButtonActionPerformed
|
||||
remove(imageFilterPanel);
|
||||
remove(documentFilterPanel);
|
||||
imageFilterPanel.removePropertyChangeListener(listener);
|
||||
remove(videoFilterPanel);
|
||||
videoFilterPanel.removePropertyChangeListener(listener);
|
||||
add(documentFilterPanel, CENTER);
|
||||
documentFilterPanel.removePropertyChangeListener(listener);
|
||||
documentsButton.setSelected(true);
|
||||
documentsButton.setEnabled(false);
|
||||
documentsButton.setBackground(SELECTED_COLOR);
|
||||
@ -286,6 +385,9 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
imagesButton.setEnabled(true);
|
||||
imagesButton.setBackground(UNSELECTED_COLOR);
|
||||
fileType = FileSearchData.FileType.DOCUMENTS;
|
||||
documentFilterPanel.addPropertyChangeListener(listener);
|
||||
pack();
|
||||
repaint();
|
||||
}//GEN-LAST:event_documentsButtonActionPerformed
|
||||
|
||||
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
||||
@ -347,6 +449,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
* The settings are valid so enable the Search button
|
||||
*/
|
||||
private void setValid() {
|
||||
System.out.println("SET VALID");
|
||||
errorLabel.setText("");
|
||||
searchButton.setEnabled(true);
|
||||
}
|
||||
@ -358,6 +461,7 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
* @param error
|
||||
*/
|
||||
private void setInvalid(String error) {
|
||||
System.out.println("SET INVALID");
|
||||
errorLabel.setText(error);
|
||||
searchButton.setEnabled(false);
|
||||
}
|
||||
@ -365,8 +469,11 @@ final class DiscoveryDialog extends javax.swing.JDialog {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton documentsButton;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JComboBox<GroupingAttributeType> groupByCombobox;
|
||||
private javax.swing.JComboBox<GroupSortingAlgorithm> groupSortingComboBox;
|
||||
private javax.swing.JButton imagesButton;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JComboBox<SortingMethod> orderByCombobox;
|
||||
private javax.swing.JButton searchButton;
|
||||
private javax.swing.JButton videosButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
|
@ -11,7 +11,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
final class DocumentFilterPanel extends AbstractFilterPanel {
|
||||
final class DocumentFilterPanel extends AbstractFiltersPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final FileSearchData.FileType FILE_TYPE = FileSearchData.FileType.DOCUMENTS;
|
||||
@ -20,10 +20,8 @@ final class DocumentFilterPanel extends AbstractFilterPanel {
|
||||
* Creates new form DocumentFilterPanel
|
||||
*/
|
||||
DocumentFilterPanel() {
|
||||
super();
|
||||
initComponents();
|
||||
SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(FileSearchData.FileType.DOCUMENTS);
|
||||
addFilter(sizeFilterPanel, false, null);
|
||||
addFilter(new SizeFilterPanel(FileSearchData.FileType.DOCUMENTS), false, null);
|
||||
addFilter(new DataSourceFilterPanel(), false, null);
|
||||
int[] pastOccurrencesIndices;
|
||||
if (!CentralRepository.isEnabled()) {
|
||||
|
@ -20,7 +20,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class HashSetFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger logger = Logger.getLogger(HashSetFilterPanel.class.getName());
|
||||
|
@ -11,7 +11,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
final class ImageFilterPanel extends AbstractFilterPanel {
|
||||
final class ImageFilterPanel extends AbstractFiltersPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final FileSearchData.FileType FILE_TYPE = FileSearchData.FileType.IMAGE;
|
||||
@ -20,12 +20,11 @@ final class ImageFilterPanel extends AbstractFilterPanel {
|
||||
* Creates new form ImageFilterPanel
|
||||
*/
|
||||
ImageFilterPanel() {
|
||||
super();
|
||||
initComponents();
|
||||
SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(FILE_TYPE);
|
||||
int[] sizeIndicesSelected = {1, 2, 3, 4, 5};
|
||||
addFilter(sizeFilterPanel, true, sizeIndicesSelected);
|
||||
addFilter(new DataSourceFilterPanel(), false, null);
|
||||
addFilter(new ObjectDetectedFilterPanel(), false, null);
|
||||
int[] pastOccurrencesIndices;
|
||||
if (!CentralRepository.isEnabled()) {
|
||||
pastOccurrencesIndices = new int[]{0};
|
||||
@ -36,7 +35,8 @@ final class ImageFilterPanel extends AbstractFilterPanel {
|
||||
addFilter(new UserCreatedFilterPanel(), false, null);
|
||||
addFilter(new HashSetFilterPanel(), false, null);
|
||||
addFilter(new InterestingItemsFilterPanel(), false, null);
|
||||
addFilter(new ObjectDetectedFilterPanel(), false, null);
|
||||
|
||||
addFilter(new DataSourceFilterPanel(), false, null);
|
||||
addFilter(new ParentFolderFilterPanel(), false, null);
|
||||
endPanel();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class InterestingItemsFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class InterestingItemsFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger logger = Logger.getLogger(InterestingItemsFilterPanel.class.getName());
|
||||
|
@ -5,8 +5,22 @@
|
||||
<Component class="javax.swing.JCheckBox" name="objectsCheckbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="ObjectDetectedFilterPanel.objectsCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="ObjectDetectedFilterPanel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="verticalTextPosition" type="int" value="1"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="objectsCheckboxActionPerformed"/>
|
||||
@ -14,6 +28,9 @@
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 60]"/>
|
||||
</Property>
|
||||
@ -33,20 +50,26 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="objectsScrollPane" min="-2" pref="300" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="12" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="objectsScrollPane" alignment="0" pref="300" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="objectsScrollPane" pref="60" max="32767" attributes="0"/>
|
||||
<Component id="objectsScrollPane" pref="64" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="objectsScrollPane">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[260, 50]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
@ -20,7 +20,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class ObjectDetectedFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class ObjectDetectedFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger logger = Logger.getLogger(ObjectDetectedFilterPanel.class.getName());
|
||||
@ -66,15 +66,28 @@ public class ObjectDetectedFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
objectsScrollPane = new javax.swing.JScrollPane();
|
||||
objectsList = new javax.swing.JList<>();
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(objectsCheckbox, org.openide.util.NbBundle.getMessage(ObjectDetectedFilterPanel.class, "ObjectDetectedFilterPanel.objectsCheckbox.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(objectsCheckbox, org.openide.util.NbBundle.getMessage(ObjectDetectedFilterPanel.class, "ObjectDetectedFilterPanel.text")); // NOI18N
|
||||
objectsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
objectsCheckbox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
objectsCheckbox.setMaximumSize(new java.awt.Dimension(103, 25));
|
||||
objectsCheckbox.setMinimumSize(new java.awt.Dimension(103, 25));
|
||||
objectsCheckbox.setName(""); // NOI18N
|
||||
objectsCheckbox.setPreferredSize(new java.awt.Dimension(103, 25));
|
||||
objectsCheckbox.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
objectsCheckbox.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
|
||||
objectsCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
objectsCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(200, 30));
|
||||
setPreferredSize(new java.awt.Dimension(300, 60));
|
||||
|
||||
objectsScrollPane.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
objectsScrollPane.setName(""); // NOI18N
|
||||
objectsScrollPane.setPreferredSize(new java.awt.Dimension(260, 50));
|
||||
|
||||
objectsList.setModel(new DefaultListModel<String>());
|
||||
objectsList.setEnabled(false);
|
||||
objectsList.setVisibleRowCount(2);
|
||||
@ -84,13 +97,11 @@ public class ObjectDetectedFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(objectsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 12, Short.MAX_VALUE))
|
||||
.addComponent(objectsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(objectsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE)
|
||||
.addComponent(objectsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
@ -17,11 +17,12 @@ import org.sleuthkit.autopsy.discovery.FileSearchFiltering.ParentSearchTerm;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class ParentFolderFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private DefaultListModel<FileSearchFiltering.ParentSearchTerm> parentListModel;
|
||||
|
||||
private static final String[] DEFAULT_IGNORED_PATHS = {"/Windows/", "/Program Files/"}; //NON-NLS
|
||||
|
||||
/**
|
||||
* Creates new form ParentFolderFilterPanel
|
||||
*/
|
||||
@ -37,6 +38,9 @@ public class ParentFolderFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
fullRadioButton.setSelected(true);
|
||||
includeRadioButton.setSelected(true);
|
||||
parentListModel = (DefaultListModel<FileSearchFiltering.ParentSearchTerm>) parentList.getModel();
|
||||
for (String ignorePath : DEFAULT_IGNORED_PATHS) {
|
||||
parentListModel.add(parentListModel.size(), new ParentSearchTerm(ignorePath, false, false));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@ import org.sleuthkit.autopsy.discovery.FileSearchData.Frequency;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class PastOccurrencesFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -7,6 +7,19 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="SizeFilterPanel.sizeCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 25]"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="verticalTextPosition" type="int" value="1"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sizeCheckboxActionPerformed"/>
|
||||
@ -14,6 +27,9 @@
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 60]"/>
|
||||
</Property>
|
||||
@ -33,7 +49,7 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="sizeScrollPane" min="-2" pref="300" max="-2" attributes="0"/>
|
||||
<Component id="sizeScrollPane" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
@ -47,6 +63,11 @@
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="sizeScrollPane">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[300, 60]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
@ -17,7 +17,7 @@ import org.sleuthkit.autopsy.discovery.FileSearchData.FileSize;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
final class SizeFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
final class SizeFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -43,14 +43,24 @@ final class SizeFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
sizeList = new javax.swing.JList<>();
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sizeCheckbox, org.openide.util.NbBundle.getMessage(SizeFilterPanel.class, "SizeFilterPanel.sizeCheckbox.text")); // NOI18N
|
||||
sizeCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
sizeCheckbox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
sizeCheckbox.setMaximumSize(new java.awt.Dimension(103, 25));
|
||||
sizeCheckbox.setMinimumSize(new java.awt.Dimension(103, 25));
|
||||
sizeCheckbox.setPreferredSize(new java.awt.Dimension(103, 25));
|
||||
sizeCheckbox.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
sizeCheckbox.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
|
||||
sizeCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
sizeCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(200, 30));
|
||||
setPreferredSize(new java.awt.Dimension(300, 60));
|
||||
|
||||
sizeScrollPane.setPreferredSize(new java.awt.Dimension(300, 60));
|
||||
|
||||
sizeList.setModel(new DefaultListModel<FileSize>());
|
||||
sizeList.setEnabled(false);
|
||||
sizeList.setVisibleRowCount(5);
|
||||
@ -60,12 +70,12 @@ final class SizeFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(sizeScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(sizeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(sizeScrollPane)
|
||||
.addComponent(sizeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
@ -13,7 +13,7 @@ import javax.swing.JList;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class UserCreatedFilterPanel extends AbstractDiscoveryFiltersPanel {
|
||||
public class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
|
@ -11,7 +11,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
final class VideoFilterPanel extends AbstractFilterPanel {
|
||||
final class VideoFilterPanel extends AbstractFiltersPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final FileSearchData.FileType FILE_TYPE = FileSearchData.FileType.VIDEO;
|
||||
@ -20,10 +20,8 @@ final class VideoFilterPanel extends AbstractFilterPanel {
|
||||
* Creates new form VideoFilterPanel
|
||||
*/
|
||||
VideoFilterPanel() {
|
||||
super();
|
||||
initComponents();
|
||||
SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(FileSearchData.FileType.VIDEO);
|
||||
addFilter(sizeFilterPanel, true, null);
|
||||
addFilter(new SizeFilterPanel(FileSearchData.FileType.VIDEO), true, null);
|
||||
addFilter(new DataSourceFilterPanel(), false, null);
|
||||
int[] pastOccurrencesIndices;
|
||||
if (!CentralRepository.isEnabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user