mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 08:56:15 +00:00
Merge pull request #5373 from wschaeferB/5674-ExcludeFoldersFilter
5674 exclude folders filter
This commit is contained in:
commit
6ceee42dc8
@ -58,3 +58,7 @@ ResultsPanel.gotoPageLabel.text=Go to Page:
|
||||
ResultsPanel.pageSizeLabel.text=Page size:
|
||||
ResultsPanel.instancesList.border.title=Instances
|
||||
DiscoveryExtractAction.title.extractFiles.text=Extract File
|
||||
FileSearchPanel.includeRadioButton.text=Include
|
||||
FileSearchPanel.excludeRadioButton.text=Exclude
|
||||
FileSearchPanel.knownFilesCheckbox.toolTipText=
|
||||
FileSearchPanel.knownFilesCheckbox.text=Hide known files
|
||||
|
@ -86,6 +86,7 @@ FileSearchFiltering.HashSetFilter.desc=Files with hash set hits in set(s): {0}
|
||||
FileSearchFiltering.InterestingItemSetFilter.desc=Files with interesting item hits in set(s): {0}
|
||||
# {0} - filters
|
||||
FileSearchFiltering.KeywordListFilter.desc=Files with keywords in list(s): {0}
|
||||
FileSearchFiltering.KnownFilter.desc=Files which are not known
|
||||
# {0} - filters
|
||||
FileSearchFiltering.ObjectDetectionFilter.desc=Files with objects detected in set(s): {0}
|
||||
# {0} - filters
|
||||
@ -93,10 +94,10 @@ FileSearchFiltering.ParentFilter.desc=Files with paths matching: {0}
|
||||
FileSearchFiltering.ParentFilter.exact=(exact match)
|
||||
FileSearchFiltering.ParentFilter.or=\ or
|
||||
FileSearchFiltering.ParentFilter.substring=(substring)
|
||||
# {0} - search term
|
||||
FileSearchFiltering.ParentSearchTerm.fullString=\ {0} (exact)
|
||||
# {0} - search term
|
||||
FileSearchFiltering.ParentSearchTerm.subString=\ {0} (substring)
|
||||
FileSearchFiltering.ParentSearchTerm.excludeString=\ (exclude)
|
||||
FileSearchFiltering.ParentSearchTerm.fullString=\ (exact)
|
||||
FileSearchFiltering.ParentSearchTerm.includeString=\ (include)
|
||||
FileSearchFiltering.ParentSearchTerm.subString=\ (substring)
|
||||
FileSearchFiltering.PreviouslyNotableFilter.desc=Files that were previously marked as notable
|
||||
# {0} - filters
|
||||
FileSearchFiltering.ScoreFilter.desc=Files with score(s) of : {0}
|
||||
@ -178,6 +179,10 @@ ResultsPanel.gotoPageLabel.text=Go to Page:
|
||||
ResultsPanel.pageSizeLabel.text=Page size:
|
||||
ResultsPanel.instancesList.border.title=Instances
|
||||
DiscoveryExtractAction.title.extractFiles.text=Extract File
|
||||
FileSearchPanel.includeRadioButton.text=Include
|
||||
FileSearchPanel.excludeRadioButton.text=Exclude
|
||||
FileSearchPanel.knownFilesCheckbox.toolTipText=
|
||||
FileSearchPanel.knownFilesCheckbox.text=Hide known files
|
||||
ResultsPanel.viewFileInDir.name=View File in Directory
|
||||
SearchNode.getName.text=Search Result
|
||||
# {0} - numberOfInstances
|
||||
|
@ -1092,9 +1092,9 @@ public class FileSearchDialog extends javax.swing.JDialog implements ActionListe
|
||||
if ( ! parentTextField.getText().isEmpty()) {
|
||||
ParentSearchTerm searchTerm;
|
||||
if (parentFullRadioButton.isSelected()) {
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), true);
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), true, true);
|
||||
} else {
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), false);
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), false, true);
|
||||
}
|
||||
parentListModel.add(parentListModel.size(), searchTerm);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,16 @@
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.ButtonGroup" name="parentButtonGroup">
|
||||
<Component class="javax.swing.ButtonGroup" name="parentPathButtonGroup">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="orderGroupsByButtonGroup">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="parentIncludeButtonGroup">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
@ -170,7 +176,7 @@
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -203,7 +209,7 @@
|
||||
<Component class="javax.swing.JRadioButton" name="fullRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="parentButtonGroup"/>
|
||||
<ComponentRef name="parentPathButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
@ -213,14 +219,14 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="14" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="substringRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="parentButtonGroup"/>
|
||||
<ComponentRef name="parentPathButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="FileSearchPanel.substringRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
@ -229,7 +235,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="14" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -239,7 +245,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="14" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="6" insetsRight="0" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="16" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="6" insetsRight="0" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -264,7 +270,7 @@
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="3" gridY="14" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="6" insetsRight="6" anchor="24" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="3" gridY="16" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="6" insetsRight="6" anchor="24" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -289,7 +295,7 @@
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="3" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="4" insetsRight="6" anchor="24" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="3" gridY="15" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="4" insetsRight="6" anchor="24" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -379,7 +385,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.1"/>
|
||||
<GridBagConstraints gridX="0" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -389,7 +395,7 @@
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="11" gridWidth="3" gridHeight="2" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="6" anchor="23" weightX="0.5" weightY="0.1"/>
|
||||
<GridBagConstraints gridX="1" gridY="12" gridWidth="3" gridHeight="2" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="6" anchor="23" weightX="0.5" weightY="0.1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -641,6 +647,54 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JRadioButton" name="includeRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="parentIncludeButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="FileSearchPanel.includeRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="15" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="excludeRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="parentIncludeButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="FileSearchPanel.excludeRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="15" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="23" weightX="0.5" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="knownFilesCheckbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="FileSearchPanel.knownFilesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="FileSearchPanel.knownFilesCheckbox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</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="11" gridWidth="4" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="4" insetsRight="6" anchor="23" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -58,10 +58,10 @@ import org.sleuthkit.datamodel.TagName;
|
||||
* Dialog to allow the user to choose filtering and grouping options.
|
||||
*/
|
||||
final class FileSearchPanel extends javax.swing.JPanel implements ActionListener {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger logger = Logger.getLogger(FileSearchPanel.class.getName());
|
||||
|
||||
|
||||
private DefaultListModel<FileSearchFiltering.ParentSearchTerm> parentListModel;
|
||||
private final SleuthkitCase caseDb;
|
||||
private final EamDb centralRepoDb;
|
||||
@ -82,7 +82,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* Set up all the UI components
|
||||
*/
|
||||
private void customizeComponents() {
|
||||
|
||||
|
||||
searchButton.setEnabled(false);
|
||||
|
||||
// Set up the filters
|
||||
@ -204,7 +204,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
int count = 0;
|
||||
try {
|
||||
DefaultListModel<String> kwListModel = (DefaultListModel<String>) keywordList.getModel();
|
||||
|
||||
|
||||
List<String> setNames = getSetNames(BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME);
|
||||
for (String name : setNames) {
|
||||
@ -225,7 +225,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
int count = 0;
|
||||
try {
|
||||
DefaultListModel<String> hashListModel = (DefaultListModel<String>) hashSetList.getModel();
|
||||
|
||||
|
||||
List<String> setNames = getSetNames(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME);
|
||||
for (String name : setNames) {
|
||||
@ -247,7 +247,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
int count = 0;
|
||||
try {
|
||||
DefaultListModel<String> intListModel = (DefaultListModel<String>) interestingItemsList.getModel();
|
||||
|
||||
|
||||
List<String> setNames = getSetNames(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME);
|
||||
for (String name : setNames) {
|
||||
@ -269,7 +269,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
int count = 0;
|
||||
try {
|
||||
DefaultListModel<TagName> tagsListModel = (DefaultListModel<TagName>) tagsList.getModel();
|
||||
|
||||
|
||||
List<TagName> tagNames = caseDb.getTagNamesInUse();
|
||||
for (TagName name : tagNames) {
|
||||
tagsListModel.add(count, name);
|
||||
@ -288,9 +288,9 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* TagsListCellRenderer
|
||||
*/
|
||||
private class TagsListCellRenderer extends DefaultListCellRenderer {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@Override
|
||||
public java.awt.Component getListCellRendererComponent(
|
||||
JList<?> list,
|
||||
@ -314,7 +314,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
int count = 0;
|
||||
try {
|
||||
DefaultListModel<String> objListModel = (DefaultListModel<String>) objectsList.getModel();
|
||||
|
||||
|
||||
List<String> setNames = getSetNames(BlackboardArtifact.ARTIFACT_TYPE.TSK_OBJECT_DETECTED, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DESCRIPTION);
|
||||
for (String name : setNames) {
|
||||
objListModel.add(count, name);
|
||||
@ -332,7 +332,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* Initialize the score filter
|
||||
*/
|
||||
private void setUpScoreFilter() {
|
||||
|
||||
|
||||
int count = 0;
|
||||
DefaultListModel<Score> scoreListModel = (DefaultListModel<Score>) scoreList.getModel();
|
||||
for (Score score : Score.getOptionsForFiltering()) {
|
||||
@ -374,9 +374,10 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* Initialize the parent path filter
|
||||
*/
|
||||
private void setUpParentPathFilter() {
|
||||
parentButtonGroup.add(fullRadioButton);
|
||||
parentButtonGroup.add(substringRadioButton);
|
||||
parentPathButtonGroup.add(fullRadioButton);
|
||||
parentPathButtonGroup.add(substringRadioButton);
|
||||
fullRadioButton.setSelected(true);
|
||||
includeRadioButton.setSelected(true);
|
||||
parentListModel = (DefaultListModel<FileSearchFiltering.ParentSearchTerm>) parentList.getModel();
|
||||
addListeners(parentCheckbox, parentList);
|
||||
}
|
||||
@ -391,57 +392,62 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
|
||||
// There will always be a file type selected
|
||||
filters.add(new FileSearchFiltering.FileTypeFilter(fileTypeComboBox.getItemAt(fileTypeComboBox.getSelectedIndex())));
|
||||
|
||||
|
||||
if (parentCheckbox.isSelected()) {
|
||||
// For the parent paths, everything in the box is used (not just the selected entries)
|
||||
filters.add(new FileSearchFiltering.ParentFilter(getParentPaths()));
|
||||
}
|
||||
|
||||
|
||||
if (dataSourceCheckbox.isSelected()) {
|
||||
List<DataSource> dataSources = dataSourceList.getSelectedValuesList().stream().map(t -> t.getDataSource()).collect(Collectors.toList());
|
||||
filters.add(new FileSearchFiltering.DataSourceFilter(dataSources));
|
||||
}
|
||||
|
||||
|
||||
if (crFrequencyCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.FrequencyFilter(crFrequencyList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (sizeCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.SizeFilter(sizeList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (keywordCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.KeywordListFilter(keywordList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (hashSetCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.HashSetFilter(hashSetList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (interestingItemsCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.InterestingFileSetFilter(interestingItemsList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (objectsCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.ObjectDetectionFilter(objectsList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (tagsCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.TagsFilter(tagsList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
if (exifCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.ExifFilter());
|
||||
}
|
||||
|
||||
|
||||
if (notableCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.NotableFilter());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (knownFilesCheckbox.isSelected()){
|
||||
filters.add(new FileSearchFiltering.KnownFilter());
|
||||
}
|
||||
|
||||
if (scoreCheckbox.isSelected()) {
|
||||
filters.add(new FileSearchFiltering.ScoreFilter(scoreList.getSelectedValuesList()));
|
||||
}
|
||||
|
||||
|
||||
return filters;
|
||||
}
|
||||
|
||||
@ -488,7 +494,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
FileSorter.SortingMethod getFileSortingMethod() {
|
||||
return (FileSorter.SortingMethod) orderByCombobox.getSelectedItem();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
validateFields();
|
||||
@ -499,17 +505,17 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* name
|
||||
*/
|
||||
private class DataSourceItem {
|
||||
|
||||
|
||||
private final DataSource ds;
|
||||
|
||||
|
||||
DataSourceItem(DataSource ds) {
|
||||
this.ds = ds;
|
||||
}
|
||||
|
||||
|
||||
DataSource getDataSource() {
|
||||
return ds;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ds.getName() + " (ID: " + ds.getId() + ")";
|
||||
@ -549,27 +555,27 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
setInvalid("At least one parent path must be entered");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (hashSetCheckbox.isSelected() && hashSetList.getSelectedValuesList().isEmpty()) {
|
||||
setInvalid("At least one hash set name must be selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (interestingItemsCheckbox.isSelected() && interestingItemsList.getSelectedValuesList().isEmpty()) {
|
||||
setInvalid("At least one interesting file set name must be selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (objectsCheckbox.isSelected() && objectsList.getSelectedValuesList().isEmpty()) {
|
||||
setInvalid("At least one object type name must be selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (tagsCheckbox.isSelected() && tagsList.getSelectedValuesList().isEmpty()) {
|
||||
setInvalid("At least one tag name must be selected");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (scoreCheckbox.isSelected() && scoreList.getSelectedValuesList().isEmpty()) {
|
||||
setInvalid("At least one score must be selected");
|
||||
return;
|
||||
@ -606,8 +612,9 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
parentButtonGroup = new javax.swing.ButtonGroup();
|
||||
parentPathButtonGroup = new javax.swing.ButtonGroup();
|
||||
orderGroupsByButtonGroup = new javax.swing.ButtonGroup();
|
||||
javax.swing.ButtonGroup parentIncludeButtonGroup = new javax.swing.ButtonGroup();
|
||||
filtersScrollPane = new javax.swing.JScrollPane();
|
||||
filtersPanel = new javax.swing.JPanel();
|
||||
sizeCheckbox = new javax.swing.JCheckBox();
|
||||
@ -648,6 +655,9 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
interestingItemsList = new javax.swing.JList<>();
|
||||
scoreScrollPane = new javax.swing.JScrollPane();
|
||||
scoreList = new javax.swing.JList<>();
|
||||
includeRadioButton = new javax.swing.JRadioButton();
|
||||
excludeRadioButton = new javax.swing.JRadioButton();
|
||||
knownFilesCheckbox = new javax.swing.JCheckBox();
|
||||
fileTypeLabel = new javax.swing.JLabel();
|
||||
searchButton = new javax.swing.JButton();
|
||||
sortingPanel = new javax.swing.JPanel();
|
||||
@ -730,7 +740,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 6, 4, 0);
|
||||
filtersPanel.add(parentCheckbox, gridBagConstraints);
|
||||
@ -751,23 +761,23 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 6);
|
||||
filtersPanel.add(dataSourceScrollPane, gridBagConstraints);
|
||||
|
||||
parentButtonGroup.add(fullRadioButton);
|
||||
parentPathButtonGroup.add(fullRadioButton);
|
||||
fullRadioButton.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(fullRadioButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.fullRadioButton.text")); // NOI18N
|
||||
fullRadioButton.setEnabled(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 0);
|
||||
filtersPanel.add(fullRadioButton, gridBagConstraints);
|
||||
|
||||
parentButtonGroup.add(substringRadioButton);
|
||||
parentPathButtonGroup.add(substringRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(substringRadioButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.substringRadioButton.text")); // NOI18N
|
||||
substringRadioButton.setEnabled(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.weightx = 0.5;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 0);
|
||||
@ -776,7 +786,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
parentTextField.setEnabled(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.gridy = 16;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
@ -796,7 +806,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 3;
|
||||
gridBagConstraints.gridy = 14;
|
||||
gridBagConstraints.gridy = 16;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 6);
|
||||
filtersPanel.add(addButton, gridBagConstraints);
|
||||
@ -813,7 +823,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 3;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.gridy = 15;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 10, 4, 6);
|
||||
filtersPanel.add(deleteButton, gridBagConstraints);
|
||||
@ -867,7 +877,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
org.openide.awt.Mnemonics.setLocalizedText(parentLabel, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.parentLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.gridy = 13;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.weighty = 0.1;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 6, 4, 0);
|
||||
@ -885,7 +895,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridy = 12;
|
||||
gridBagConstraints.gridwidth = 3;
|
||||
gridBagConstraints.gridheight = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
@ -1057,6 +1067,38 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 6);
|
||||
filtersPanel.add(scoreScrollPane, gridBagConstraints);
|
||||
|
||||
parentIncludeButtonGroup.add(includeRadioButton);
|
||||
includeRadioButton.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(includeRadioButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.includeRadioButton.text")); // NOI18N
|
||||
includeRadioButton.setEnabled(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 15;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 0);
|
||||
filtersPanel.add(includeRadioButton, gridBagConstraints);
|
||||
|
||||
parentIncludeButtonGroup.add(excludeRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(excludeRadioButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.excludeRadioButton.text")); // NOI18N
|
||||
excludeRadioButton.setEnabled(false);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 15;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.weightx = 0.5;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 4, 4, 0);
|
||||
filtersPanel.add(excludeRadioButton, gridBagConstraints);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(knownFilesCheckbox, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.knownFilesCheckbox.text")); // NOI18N
|
||||
knownFilesCheckbox.setToolTipText(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.knownFilesCheckbox.toolTipText")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 11;
|
||||
gridBagConstraints.gridwidth = 4;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 6, 4, 6);
|
||||
filtersPanel.add(knownFilesCheckbox, gridBagConstraints);
|
||||
|
||||
filtersScrollPane.setViewportView(filtersPanel);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(fileTypeLabel, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.fileTypeLabel.text")); // NOI18N
|
||||
@ -1195,7 +1237,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
|
||||
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
||||
enableSearch(false);
|
||||
|
||||
|
||||
FileType searchType = fileTypeComboBox.getItemAt(fileTypeComboBox.getSelectedIndex());
|
||||
DiscoveryEvents.getDiscoveryEventBus().post(new DiscoveryEvents.SearchStartedEvent(searchType));
|
||||
// For testing, allow the user to run different searches in loop
|
||||
@ -1262,6 +1304,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
scoreList.setEnabled(enabled && scoreCheckbox.isSelected());
|
||||
exifCheckbox.setEnabled(enabled);
|
||||
notableCheckbox.setEnabled(enabled);
|
||||
knownFilesCheckbox.setEnabled(enabled);
|
||||
parentCheckbox.setEnabled(enabled);
|
||||
parentScrollPane.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
parentList.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
@ -1270,6 +1313,8 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
deleteButton.setEnabled(enabled && parentCheckbox.isSelected() && !parentListModel.isEmpty());
|
||||
fullRadioButton.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
substringRadioButton.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
includeRadioButton.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
excludeRadioButton.setEnabled(enabled && parentCheckbox.isSelected());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1300,6 +1345,8 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
parentList.setEnabled(parentCheckbox.isSelected());
|
||||
fullRadioButton.setEnabled(parentCheckbox.isSelected());
|
||||
substringRadioButton.setEnabled(parentCheckbox.isSelected());
|
||||
includeRadioButton.setEnabled(parentCheckbox.isSelected());
|
||||
excludeRadioButton.setEnabled(parentCheckbox.isSelected());
|
||||
parentTextField.setEnabled(parentCheckbox.isSelected());
|
||||
addButton.setEnabled(parentCheckbox.isSelected());
|
||||
deleteButton.setEnabled(parentCheckbox.isSelected() && !parentListModel.isEmpty());
|
||||
@ -1320,13 +1367,10 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed
|
||||
if (!parentTextField.getText().isEmpty()) {
|
||||
ParentSearchTerm searchTerm;
|
||||
if (fullRadioButton.isSelected()) {
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), true);
|
||||
} else {
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), false);
|
||||
}
|
||||
searchTerm = new ParentSearchTerm(parentTextField.getText(), fullRadioButton.isSelected(), includeRadioButton.isSelected());
|
||||
parentListModel.add(parentListModel.size(), searchTerm);
|
||||
validateFields();
|
||||
parentTextField.setText("");
|
||||
}
|
||||
}//GEN-LAST:event_addButtonActionPerformed
|
||||
|
||||
@ -1396,6 +1440,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
private javax.swing.JScrollPane dataSourceScrollPane;
|
||||
private javax.swing.JButton deleteButton;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JRadioButton excludeRadioButton;
|
||||
private javax.swing.JCheckBox exifCheckbox;
|
||||
private javax.swing.JComboBox<FileType> fileTypeComboBox;
|
||||
private javax.swing.JLabel fileTypeLabel;
|
||||
@ -1408,12 +1453,14 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
private javax.swing.JCheckBox hashSetCheckbox;
|
||||
private javax.swing.JList<String> hashSetList;
|
||||
private javax.swing.JScrollPane hashSetScrollPane;
|
||||
private javax.swing.JRadioButton includeRadioButton;
|
||||
private javax.swing.JCheckBox interestingItemsCheckbox;
|
||||
private javax.swing.JList<String> interestingItemsList;
|
||||
private javax.swing.JScrollPane interestingItemsScrollPane;
|
||||
private javax.swing.JCheckBox keywordCheckbox;
|
||||
private javax.swing.JList<String> keywordList;
|
||||
private javax.swing.JScrollPane keywordScrollPane;
|
||||
private javax.swing.JCheckBox knownFilesCheckbox;
|
||||
private javax.swing.JCheckBox notableCheckbox;
|
||||
private javax.swing.JCheckBox objectsCheckbox;
|
||||
private javax.swing.JList<String> objectsList;
|
||||
@ -1422,10 +1469,10 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
private javax.swing.JLabel orderByLabel;
|
||||
private javax.swing.ButtonGroup orderGroupsByButtonGroup;
|
||||
private javax.swing.JLabel orderGroupsByLabel;
|
||||
private javax.swing.ButtonGroup parentButtonGroup;
|
||||
private javax.swing.JCheckBox parentCheckbox;
|
||||
private javax.swing.JLabel parentLabel;
|
||||
private javax.swing.JList<ParentSearchTerm> parentList;
|
||||
private javax.swing.ButtonGroup parentPathButtonGroup;
|
||||
private javax.swing.JScrollPane parentScrollPane;
|
||||
private javax.swing.JTextField parentTextField;
|
||||
private javax.swing.JCheckBox scoreCheckbox;
|
||||
|
Loading…
x
Reference in New Issue
Block a user