5187 more checkbox related changes

This commit is contained in:
William Schaefer 2019-06-19 18:26:15 -04:00
parent 7bacadf95e
commit 19a6cd9f15
4 changed files with 396 additions and 363 deletions

View File

@ -96,16 +96,10 @@ EditFullPathsRulePanel.fullPathsLabel.text=Full paths:
EditFullPathsRulePanel.fullPathsLabel.toolTipText= EditFullPathsRulePanel.fullPathsLabel.toolTipText=
EditNonFullPathsRulePanel.ruleNameTextField.text= EditNonFullPathsRulePanel.ruleNameTextField.text=
EditNonFullPathsRulePanel.ruleNameLabel.text=Name: EditNonFullPathsRulePanel.ruleNameLabel.text=Name:
EditNonFullPathsRulePanel.descriptionLabel.text=Description:
EditNonFullPathsRulePanel.descriptionTextField.text= EditNonFullPathsRulePanel.descriptionTextField.text=
EditNonFullPathsRulePanel.shouldSaveCheckBox.text=Extract file if it matches a condition EditNonFullPathsRulePanel.shouldSaveCheckBox.text=Extract file if it matches a condition
EditNonFullPathsRulePanel.daysIncludedLabel.text=day(s) EditNonFullPathsRulePanel.daysIncludedLabel.text=day(s)
EditNonFullPathsRulePanel.modifiedDateLabel.text=Modified Within:
EditNonFullPathsRulePanel.fileSizeLabel.text=File size (bytes):
EditNonFullPathsRulePanel.folderNamesLabel.text=Folder names:
EditNonFullPathsRulePanel.filenamesLabel.text=File names:
EditNonFullPathsRulePanel.extensionsTextField.text= EditNonFullPathsRulePanel.extensionsTextField.text=
EditNonFullPathsRulePanel.extensionsLabel.text=Extensions:
EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand= EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand=
EditNonFullPathsRulePanel.shouldAlertCheckBox.text=Alert in imager console if a condition matches EditNonFullPathsRulePanel.shouldAlertCheckBox.text=Alert in imager console if a condition matches
ConfigVisualPanel1.browseButton.text=Browse ConfigVisualPanel1.browseButton.text=Browse
@ -113,8 +107,6 @@ ConfigVisualPanel2.fullPathsTable.columnModel.title0=
ConfigVisualPanel2.folderNamesTable.columnModel.title0= ConfigVisualPanel2.folderNamesTable.columnModel.title0=
ConfigVisualPanel2.shouldSaveCheckBox.toolTipText= ConfigVisualPanel2.shouldSaveCheckBox.toolTipText=
NewRuleSetPanel.chooseLabel.text=Choose the type of rule NewRuleSetPanel.chooseLabel.text=Choose the type of rule
EditNonFullPathsRulePanel.minSizeLabel.text=Minimum:
EditNonFullPathsRulePanel.maxSizeLabel.text=Maximum:
EditNonFullPathsRulePanel.minSizeTextField.text= EditNonFullPathsRulePanel.minSizeTextField.text=
EditNonFullPathsRulePanel.maxSizeTextField.text= EditNonFullPathsRulePanel.maxSizeTextField.text=
ConfigVisualPanel2.maxSizeTextField.text= ConfigVisualPanel2.maxSizeTextField.text=
@ -123,8 +115,11 @@ ConfigVisualPanel2.minSizeTextField.text=
ConfigVisualPanel2.minSizeLabel.text=Minimum: ConfigVisualPanel2.minSizeLabel.text=Minimum:
EditNonFullPathsRulePanel.minDaysTextField.text=jFormattedTextField1 EditNonFullPathsRulePanel.minDaysTextField.text=jFormattedTextField1
ConfigVisualPanel1.browseButton.toolTipText= ConfigVisualPanel1.browseButton.toolTipText=
EditNonFullPathsRulePanel.extensionsRadioButton.text=
EditNonFullPathsRulePanel.filenamesRadioButton.text=
EditNonFullPathsRulePanel.extensionsRadioButton.toolTipText=Extensions and File names are mutually exclusive
EditNonFullPathsRulePanel.filenamesRadioButton.toolTipText=Extensions and File names are mutually exclusive
EditNonFullPathsRulePanel.userFolderNote.text=Starting a folder name with the token [USER_FOLDER] will allow matches of all user folders in the file system. EditNonFullPathsRulePanel.userFolderNote.text=Starting a folder name with the token [USER_FOLDER] will allow matches of all user folders in the file system.
EditNonFullPathsRulePanel.minSizeCheckBox.text=Minimum size:
EditNonFullPathsRulePanel.maxSizeCheckBox.text=Maximum size:
EditNonFullPathsRulePanel.modifiedWithinCheckbox.text=Modified within:
EditNonFullPathsRulePanel.folderNamesCheckbox.text=Folder names:
EditNonFullPathsRulePanel.fileNamesCheckbox.text=File names:
EditNonFullPathsRulePanel.extensionsCheckbox.text=Extensions:
EditNonFullPathsRulePanel.descriptionCheckbox.text=Description:

View File

@ -139,16 +139,10 @@ EditFullPathsRulePanel.fullPathsLabel.text=Full paths:
EditFullPathsRulePanel.fullPathsLabel.toolTipText= EditFullPathsRulePanel.fullPathsLabel.toolTipText=
EditNonFullPathsRulePanel.ruleNameTextField.text= EditNonFullPathsRulePanel.ruleNameTextField.text=
EditNonFullPathsRulePanel.ruleNameLabel.text=Name: EditNonFullPathsRulePanel.ruleNameLabel.text=Name:
EditNonFullPathsRulePanel.descriptionLabel.text=Description:
EditNonFullPathsRulePanel.descriptionTextField.text= EditNonFullPathsRulePanel.descriptionTextField.text=
EditNonFullPathsRulePanel.shouldSaveCheckBox.text=Extract file if it matches a condition EditNonFullPathsRulePanel.shouldSaveCheckBox.text=Extract file if it matches a condition
EditNonFullPathsRulePanel.daysIncludedLabel.text=day(s) EditNonFullPathsRulePanel.daysIncludedLabel.text=day(s)
EditNonFullPathsRulePanel.modifiedDateLabel.text=Modified Within:
EditNonFullPathsRulePanel.fileSizeLabel.text=File size (bytes):
EditNonFullPathsRulePanel.folderNamesLabel.text=Folder names:
EditNonFullPathsRulePanel.filenamesLabel.text=File names:
EditNonFullPathsRulePanel.extensionsTextField.text= EditNonFullPathsRulePanel.extensionsTextField.text=
EditNonFullPathsRulePanel.extensionsLabel.text=Extensions:
EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand= EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand=
EditNonFullPathsRulePanel.shouldAlertCheckBox.text=Alert in imager console if a condition matches EditNonFullPathsRulePanel.shouldAlertCheckBox.text=Alert in imager console if a condition matches
ConfigVisualPanel1.browseButton.text=Browse ConfigVisualPanel1.browseButton.text=Browse
@ -165,8 +159,6 @@ LogicalImagerConfigDeserializer.unsupportedKeyException=Unsupported key: {0}
NewRuleSetPanel.attributeRule.description=Search for files based on one or more attributes or metadata fields. NewRuleSetPanel.attributeRule.description=Search for files based on one or more attributes or metadata fields.
NewRuleSetPanel.attributeRule.name=Attribute NewRuleSetPanel.attributeRule.name=Attribute
NewRuleSetPanel.chooseLabel.text=Choose the type of rule NewRuleSetPanel.chooseLabel.text=Choose the type of rule
EditNonFullPathsRulePanel.minSizeLabel.text=Minimum:
EditNonFullPathsRulePanel.maxSizeLabel.text=Maximum:
EditNonFullPathsRulePanel.minSizeTextField.text= EditNonFullPathsRulePanel.minSizeTextField.text=
EditNonFullPathsRulePanel.maxSizeTextField.text= EditNonFullPathsRulePanel.maxSizeTextField.text=
ConfigVisualPanel2.maxSizeTextField.text= ConfigVisualPanel2.maxSizeTextField.text=
@ -175,10 +167,13 @@ ConfigVisualPanel2.minSizeTextField.text=
ConfigVisualPanel2.minSizeLabel.text=Minimum: ConfigVisualPanel2.minSizeLabel.text=Minimum:
EditNonFullPathsRulePanel.minDaysTextField.text=jFormattedTextField1 EditNonFullPathsRulePanel.minDaysTextField.text=jFormattedTextField1
ConfigVisualPanel1.browseButton.toolTipText= ConfigVisualPanel1.browseButton.toolTipText=
EditNonFullPathsRulePanel.extensionsRadioButton.text=
EditNonFullPathsRulePanel.filenamesRadioButton.text=
EditNonFullPathsRulePanel.extensionsRadioButton.toolTipText=Extensions and File names are mutually exclusive
EditNonFullPathsRulePanel.filenamesRadioButton.toolTipText=Extensions and File names are mutually exclusive
EditNonFullPathsRulePanel.userFolderNote.text=Starting a folder name with the token [USER_FOLDER] will allow matches of all user folders in the file system. EditNonFullPathsRulePanel.userFolderNote.text=Starting a folder name with the token [USER_FOLDER] will allow matches of all user folders in the file system.
EditNonFullPathsRulePanel.minSizeCheckBox.text=Minimum size:
EditNonFullPathsRulePanel.maxSizeCheckBox.text=Maximum size:
EditNonFullPathsRulePanel.modifiedWithinCheckbox.text=Modified within:
EditNonFullPathsRulePanel.folderNamesCheckbox.text=Folder names:
EditNonFullPathsRulePanel.fileNamesCheckbox.text=File names:
EditNonFullPathsRulePanel.extensionsCheckbox.text=Extensions:
EditNonFullPathsRulePanel.descriptionCheckbox.text=Description:
NewRuleSetPanel.fullPathRule.description=Search for files based on full exact match path. NewRuleSetPanel.fullPathRule.description=Search for files based on full exact match path.
NewRuleSetPanel.fullPathRule.name=Full Path NewRuleSetPanel.fullPathRule.name=Full Path

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="buttonGroup">
</Component>
</NonVisualComponents>
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@ -20,64 +16,65 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="extensionsRadioButton" min="-2" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0">
<Component id="filenamesRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="shouldAlertCheckBox" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace min="81" pref="81" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="minDaysTextField" max="32767" attributes="0"/>
<Component id="minSizeLabel" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
<Component id="minSizeTextField" min="-2" pref="63" max="-2" attributes="0"/> <Component id="folderNamesCheckbox" pref="101" max="32767" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <Component id="extensionsCheckbox" alignment="0" max="32767" attributes="0"/>
<Component id="maxSizeLabel" min="-2" max="-2" attributes="0"/> <Component id="descriptionCheckbox" alignment="0" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Component id="ruleNameLabel" alignment="0" max="32767" attributes="0"/>
<Component id="maxSizeTextField" min="-2" pref="63" max="-2" attributes="0"/> </Group>
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
<Component id="minSizeCheckBox" alignment="0" max="32767" attributes="0"/>
<Component id="maxSizeCheckBox" alignment="0" pref="101" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="ruleNameTextField" alignment="1" max="32767" attributes="0"/>
<Component id="descriptionTextField" alignment="1" max="32767" attributes="0"/>
<Component id="extensionsTextField" alignment="1" max="32767" attributes="0"/>
<Component id="folderNamesScrollPane" max="32767" attributes="0"/>
<Component id="filenamesScrollPane" alignment="1" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="minSizeTextField" min="-2" pref="63" max="-2" attributes="0"/>
<Component id="maxSizeTextField" min="-2" pref="63" max="-2" attributes="0"/>
<Component id="userFolderNote" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group> </Group>
<Component id="daysIncludedLabel" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<Component id="shouldSaveCheckBox" min="-2" max="-2" attributes="0"/> <Group type="102" attributes="0">
<Component id="fileNamesCheckbox" min="-2" pref="101" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="ruleNameLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0">
<Component id="descriptionLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="modifiedWithinCheckbox" min="-2" max="-2" attributes="0"/>
<Component id="extensionsLabel" alignment="0" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Component id="filenamesLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="modifiedWithTextField" min="-2" pref="63" max="-2" attributes="0"/>
<Component id="folderNamesLabel" alignment="0" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="fileSizeLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="daysIncludedLabel" min="-2" max="-2" attributes="0"/>
<Component id="modifiedDateLabel" alignment="0" min="-2" max="-2" attributes="0"/> </Group>
</Group> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/> <Component id="shouldAlertCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Component id="shouldSaveCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Component id="userFolderNote" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group> </Group>
<Component id="folderNamesScrollPane" alignment="1" max="32767" attributes="0"/>
<Component id="filenamesScrollPane" alignment="1" max="32767" attributes="0"/>
<Component id="extensionsTextField" alignment="1" max="32767" attributes="0"/>
<Component id="descriptionTextField" alignment="1" max="32767" attributes="0"/>
<Component id="ruleNameTextField" alignment="1" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -90,65 +87,59 @@
<Component id="ruleNameTextField" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="ruleNameTextField" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="descriptionLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="descriptionTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="descriptionTextField" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="descriptionCheckbox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="extensionsTextField" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="extensionsTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="extensionsLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="extensionsCheckbox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="extensionsRadioButton" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="filenamesScrollPane" alignment="0" max="32767" attributes="0"/> <Component id="filenamesScrollPane" max="32767" attributes="0"/>
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<Group type="103" groupAlignment="2" attributes="0"> <Component id="fileNamesCheckbox" min="-2" max="-2" attributes="0"/>
<Component id="filenamesLabel" alignment="2" min="-2" max="-2" attributes="0"/> <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Component id="filenamesRadioButton" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="53" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="folderNamesLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="folderNamesScrollPane" max="32767" attributes="0"/>
<Component id="folderNamesScrollPane" alignment="0" max="32767" attributes="0"/> <Group type="102" attributes="0">
<Component id="folderNamesCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="userFolderNote" min="-2" max="-2" attributes="0"/> <Component id="userFolderNote" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="8" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="fileSizeLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="minSizeTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="minSizeLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="minSizeCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="minSizeTextField" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="maxSizeLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="maxSizeTextField" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="maxSizeTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="maxSizeCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="2" attributes="0">
<Component id="modifiedDateLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="daysIncludedLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="daysIncludedLabel" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="minDaysTextField" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="modifiedWithTextField" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="modifiedWithinCheckbox" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="shouldSaveCheckBox" min="-2" max="-2" attributes="0"/> <Component id="shouldSaveCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="shouldAlertCheckBox" min="-2" max="-2" attributes="0"/> <Component id="shouldAlertCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="modifiedDateLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.modifiedDateLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="daysIncludedLabel"> <Component class="javax.swing.JLabel" name="daysIncludedLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
@ -174,39 +165,12 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="extensionsLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="extensionsTextField"> <Component class="javax.swing.JTextField" name="extensionsTextField">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> <Property name="enabled" type="boolean" value="false"/>
</Component>
<Component class="javax.swing.JLabel" name="filenamesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.filenamesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="folderNamesLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.folderNamesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="fileSizeLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.fileSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JTextField" name="descriptionTextField"> <Component class="javax.swing.JTextField" name="descriptionTextField">
@ -214,13 +178,7 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.descriptionTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.descriptionTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> <Property name="enabled" type="boolean" value="false"/>
</Component>
<Component class="javax.swing.JLabel" name="descriptionLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.descriptionLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="ruleNameLabel"> <Component class="javax.swing.JLabel" name="ruleNameLabel">
@ -238,20 +196,19 @@
</Properties> </Properties>
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="filenamesScrollPane"> <Container class="javax.swing.JScrollPane" name="filenamesScrollPane">
<Properties>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
</Container> </Container>
<Container class="javax.swing.JScrollPane" name="folderNamesScrollPane"> <Container class="javax.swing.JScrollPane" name="folderNamesScrollPane">
<Properties>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
</Container> </Container>
<Component class="javax.swing.JLabel" name="minSizeLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.minSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JFormattedTextField" name="minSizeTextField"> <Component class="javax.swing.JFormattedTextField" name="minSizeTextField">
<Properties> <Properties>
<Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor"> <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor">
@ -260,13 +217,7 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.minSizeTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.minSizeTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> <Property name="enabled" type="boolean" value="false"/>
</Component>
<Component class="javax.swing.JLabel" name="maxSizeLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.maxSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JFormattedTextField" name="maxSizeTextField"> <Component class="javax.swing.JFormattedTextField" name="maxSizeTextField">
@ -277,48 +228,17 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.maxSizeTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.maxSizeTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JFormattedTextField" name="minDaysTextField"> <Component class="javax.swing.JFormattedTextField" name="modifiedWithTextField">
<Properties> <Properties>
<Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor"> <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor">
<Format format="####; " subtype="-1" type="0"/> <Format format="####; " subtype="-1" type="0"/>
</Property> </Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="extensionsRadioButton">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup"/>
</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/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsRadioButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="extensionsRadioButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="filenamesRadioButton">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.filenamesRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.filenamesRadioButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="filenamesRadioButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="userFolderNote"> <Component class="javax.swing.JLabel" name="userFolderNote">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
@ -329,5 +249,75 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JCheckBox" name="minSizeCheckBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.minSizeCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="minSizeCheckBoxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="maxSizeCheckBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.maxSizeCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="maxSizeCheckBoxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="modifiedWithinCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.modifiedWithinCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="modifiedWithinCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="folderNamesCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.folderNamesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="folderNamesCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="fileNamesCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.fileNamesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileNamesCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="extensionsCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.extensionsCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="extensionsCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="descriptionCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="EditNonFullPathsRulePanel.descriptionCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="descriptionCheckboxActionPerformed"/>
</Events>
</Component>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy
* *
* Copyright 2011-2019 Basis Technology Corp. * Copyright 2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -43,11 +43,13 @@ import org.openide.util.NbBundle;
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
final class EditNonFullPathsRulePanel extends javax.swing.JPanel { final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private static final Color DISABLED_COLOR = new Color(240,240,240);
private JButton okButton; private JButton okButton;
private JButton cancelButton; private JButton cancelButton;
private final javax.swing.JTextArea filenamesTextArea; private final javax.swing.JTextArea filenamesTextArea;
private final javax.swing.JTextArea folderNamesTextArea; private final javax.swing.JTextArea folderNamesTextArea;
/** /**
* Creates new form EditRulePanel * Creates new form EditRulePanel
*/ */
@ -65,45 +67,46 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
this.setButtons(okButton, cancelButton); this.setButtons(okButton, cancelButton);
setExtensions(rule.getExtensions()); setExtensions(rule.getExtensions());
filenamesTextArea = new JTextArea(); filenamesTextArea = new JTextArea();
initTextArea(filenamesScrollPane, filenamesTextArea); initTextArea(filenamesScrollPane, filenamesTextArea);
setTextArea(filenamesTextArea, rule.getFilenames()); setTextArea(filenamesTextArea, rule.getFilenames());
if (rule.getExtensions() == null) { if (rule.getExtensions() != null) {
extensionsRadioButton.setSelected(false); extensionsCheckbox.setSelected(true);
filenamesRadioButton.setSelected(true); } else if (rule.getFilenames() != null && !rule.getFilenames().isEmpty()) {
} else { fileNamesCheckbox.setSelected(true);
extensionsRadioButton.setSelected(true);
filenamesRadioButton.setSelected(false);
} }
updateExclusiveConditions();
folderNamesTextArea = new JTextArea(); folderNamesTextArea = new JTextArea();
initTextArea(folderNamesScrollPane, folderNamesTextArea); initTextArea(folderNamesScrollPane, folderNamesTextArea);
setTextArea(folderNamesTextArea, rule.getPaths()); setTextArea(folderNamesTextArea, rule.getPaths());
setMinDays(rule.getMinDays()); setMinDays(rule.getMinDays());
minSizeTextField.setText(rule.getMinFileSize() == null ? "" : rule.getMinFileSize().toString()); minSizeTextField.setText(rule.getMinFileSize() == null ? "" : rule.getMinFileSize().toString());
maxSizeTextField.setText(rule.getMaxFileSize() == null ? "" : rule.getMaxFileSize().toString()); maxSizeTextField.setText(rule.getMaxFileSize() == null ? "" : rule.getMaxFileSize().toString());
ruleNameTextField.requestFocus(); ruleNameTextField.requestFocus();
EditRulePanel.setTextFieldPrompts(extensionsTextField, Bundle.EditNonFullPathsRulePanel_example() + "gif,jpg,png"); // NON-NLS EditRulePanel.setTextFieldPrompts(extensionsTextField, Bundle.EditNonFullPathsRulePanel_example() + "gif,jpg,png"); // NON-NLS
EditRulePanel.setTextFieldPrompts(filenamesTextArea, "<html>" EditRulePanel.setTextFieldPrompts(filenamesTextArea, "<html>"
+ Bundle.EditNonFullPathsRulePanel_example() + Bundle.EditNonFullPathsRulePanel_example()
+ "<br>filename.txt<br>readme.txt</html>"); // NON-NLS + "<br>filename.txt<br>readme.txt</html>"); // NON-NLS
EditRulePanel.setTextFieldPrompts(folderNamesTextArea, "<html>" EditRulePanel.setTextFieldPrompts(folderNamesTextArea, "<html>"
+ Bundle.EditNonFullPathsRulePanel_example() + Bundle.EditNonFullPathsRulePanel_example()
+ "<br>[USER_FOLDER]/My Documents/Downloads" + "<br>[USER_FOLDER]/My Documents/Downloads"
+ "<br>/Program Files/Common Files</html>"); // NON-NLS + "<br>/Program Files/Common Files</html>"); // NON-NLS
validate(); validate();
repaint(); repaint();
} }
private void initTextArea(JScrollPane pane, JTextArea textArea) { private void initTextArea(JScrollPane pane, JTextArea textArea) {
textArea.setColumns(20); textArea.setColumns(20);
textArea.setRows(5); textArea.setRows(4);
pane.setViewportView(textArea); pane.setViewportView(textArea);
textArea.setEnabled(false);
textArea.setEditable(false);
textArea.setBackground(DISABLED_COLOR);
textArea.addKeyListener(new KeyAdapter() { textArea.addKeyListener(new KeyAdapter() {
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
@ -115,20 +118,18 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
} }
e.consume(); e.consume();
} }
} }
}); });
} }
private void setMinDays(Integer minDays) { private void setMinDays(Integer minDays) {
minDaysTextField.setText(minDays == null ? "" : minDays.toString()); modifiedWithTextField.setText(minDays == null ? "" : minDays.toString());
} }
private void setTextArea(JTextArea textArea, List<String> set) { private void setTextArea(JTextArea textArea, List<String> set) {
String text = ""; String text = "";
if (set != null) { if (set != null) {
for (String s : set) { text = set.stream().map((s) -> s + System.getProperty("line.separator")).reduce(text, String::concat); // NON-NLS
text += s + System.getProperty("line.separator"); // NON-NLS
}
} }
textArea.setText(text); textArea.setText(text);
} }
@ -138,13 +139,14 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
String content = ""; String content = "";
if (extensions != null) { if (extensions != null) {
boolean first = true; boolean first = true;
for (String ext : extensions) { for (String ext : extensions) {
content += (first ? "" : ",") + ext; content += (first ? "" : ",") + ext;
first = false; first = false;
} }
} }
extensionsTextField.setText(content); extensionsTextField.setText(content);
} }
/** /**
* This method is called from within the constructor to initialize the form. * This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always * WARNING: Do NOT modify this code. The content of this method is always
@ -154,32 +156,26 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
buttonGroup = new javax.swing.ButtonGroup();
modifiedDateLabel = new javax.swing.JLabel();
daysIncludedLabel = new javax.swing.JLabel(); daysIncludedLabel = new javax.swing.JLabel();
shouldSaveCheckBox = new javax.swing.JCheckBox(); shouldSaveCheckBox = new javax.swing.JCheckBox();
shouldAlertCheckBox = new javax.swing.JCheckBox(); shouldAlertCheckBox = new javax.swing.JCheckBox();
extensionsLabel = new javax.swing.JLabel();
extensionsTextField = new javax.swing.JTextField(); extensionsTextField = new javax.swing.JTextField();
filenamesLabel = new javax.swing.JLabel();
folderNamesLabel = new javax.swing.JLabel();
fileSizeLabel = new javax.swing.JLabel();
descriptionTextField = new javax.swing.JTextField(); descriptionTextField = new javax.swing.JTextField();
descriptionLabel = new javax.swing.JLabel();
ruleNameLabel = new javax.swing.JLabel(); ruleNameLabel = new javax.swing.JLabel();
ruleNameTextField = new javax.swing.JTextField(); ruleNameTextField = new javax.swing.JTextField();
filenamesScrollPane = new javax.swing.JScrollPane(); filenamesScrollPane = new javax.swing.JScrollPane();
folderNamesScrollPane = new javax.swing.JScrollPane(); folderNamesScrollPane = new javax.swing.JScrollPane();
minSizeLabel = new javax.swing.JLabel();
minSizeTextField = new javax.swing.JFormattedTextField(); minSizeTextField = new javax.swing.JFormattedTextField();
maxSizeLabel = new javax.swing.JLabel();
maxSizeTextField = new javax.swing.JFormattedTextField(); maxSizeTextField = new javax.swing.JFormattedTextField();
minDaysTextField = new javax.swing.JFormattedTextField(); modifiedWithTextField = new javax.swing.JFormattedTextField();
extensionsRadioButton = new javax.swing.JRadioButton();
filenamesRadioButton = new javax.swing.JRadioButton();
userFolderNote = new javax.swing.JLabel(); userFolderNote = new javax.swing.JLabel();
minSizeCheckBox = new javax.swing.JCheckBox();
org.openide.awt.Mnemonics.setLocalizedText(modifiedDateLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.modifiedDateLabel.text")); // NOI18N maxSizeCheckBox = new javax.swing.JCheckBox();
modifiedWithinCheckbox = new javax.swing.JCheckBox();
folderNamesCheckbox = new javax.swing.JCheckBox();
fileNamesCheckbox = new javax.swing.JCheckBox();
extensionsCheckbox = new javax.swing.JCheckBox();
descriptionCheckbox = new javax.swing.JCheckBox();
org.openide.awt.Mnemonics.setLocalizedText(daysIncludedLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.daysIncludedLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(daysIncludedLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.daysIncludedLabel.text")); // NOI18N
@ -189,108 +185,131 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
org.openide.awt.Mnemonics.setLocalizedText(shouldAlertCheckBox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.shouldAlertCheckBox.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(shouldAlertCheckBox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.shouldAlertCheckBox.text")); // NOI18N
shouldAlertCheckBox.setActionCommand(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand")); // NOI18N shouldAlertCheckBox.setActionCommand(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.shouldAlertCheckBox.actionCommand")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(extensionsLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsLabel.text")); // NOI18N
extensionsTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsTextField.text")); // NOI18N extensionsTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsTextField.text")); // NOI18N
extensionsTextField.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(filenamesLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.filenamesLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(folderNamesLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.folderNamesLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(fileSizeLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.fileSizeLabel.text")); // NOI18N
descriptionTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.descriptionTextField.text")); // NOI18N descriptionTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.descriptionTextField.text")); // NOI18N
descriptionTextField.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(descriptionLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.descriptionLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(ruleNameLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.ruleNameLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(ruleNameLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.ruleNameLabel.text")); // NOI18N
ruleNameTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.ruleNameTextField.text")); // NOI18N ruleNameTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.ruleNameTextField.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(minSizeLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.minSizeLabel.text")); // NOI18N filenamesScrollPane.setEnabled(false);
folderNamesScrollPane.setEnabled(false);
minSizeTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,###; ")))); minSizeTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,###; "))));
minSizeTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.minSizeTextField.text")); // NOI18N minSizeTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.minSizeTextField.text")); // NOI18N
minSizeTextField.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(maxSizeLabel, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.maxSizeLabel.text")); // NOI18N
maxSizeTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,###; ")))); maxSizeTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,###; "))));
maxSizeTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.maxSizeTextField.text")); // NOI18N maxSizeTextField.setText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.maxSizeTextField.text")); // NOI18N
maxSizeTextField.setEnabled(false);
minDaysTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("####; ")))); modifiedWithTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("####; "))));
modifiedWithTextField.setEnabled(false);
buttonGroup.add(extensionsRadioButton);
extensionsRadioButton.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(extensionsRadioButton, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsRadioButton.text")); // NOI18N
extensionsRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsRadioButton.toolTipText")); // NOI18N
extensionsRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
extensionsRadioButtonActionPerformed(evt);
}
});
buttonGroup.add(filenamesRadioButton);
org.openide.awt.Mnemonics.setLocalizedText(filenamesRadioButton, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.filenamesRadioButton.text")); // NOI18N
filenamesRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.filenamesRadioButton.toolTipText")); // NOI18N
filenamesRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filenamesRadioButtonActionPerformed(evt);
}
});
userFolderNote.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N userFolderNote.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(userFolderNote, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.userFolderNote.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(userFolderNote, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.userFolderNote.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(minSizeCheckBox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.minSizeCheckBox.text")); // NOI18N
minSizeCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
minSizeCheckBoxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(maxSizeCheckBox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.maxSizeCheckBox.text")); // NOI18N
maxSizeCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
maxSizeCheckBoxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(modifiedWithinCheckbox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.modifiedWithinCheckbox.text")); // NOI18N
modifiedWithinCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
modifiedWithinCheckboxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(folderNamesCheckbox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.folderNamesCheckbox.text")); // NOI18N
folderNamesCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
folderNamesCheckboxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(fileNamesCheckbox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.fileNamesCheckbox.text")); // NOI18N
fileNamesCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
fileNamesCheckboxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(extensionsCheckbox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.extensionsCheckbox.text")); // NOI18N
extensionsCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
extensionsCheckboxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(descriptionCheckbox, org.openide.util.NbBundle.getMessage(EditNonFullPathsRulePanel.class, "EditNonFullPathsRulePanel.descriptionCheckbox.text")); // NOI18N
descriptionCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
descriptionCheckboxActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(extensionsRadioButton)
.addComponent(filenamesRadioButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(shouldAlertCheckBox)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(81, 81, 81)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(minDaysTextField)
.addComponent(minSizeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(folderNamesCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
.addComponent(extensionsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(descriptionCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(ruleNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(minSizeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(maxSizeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ruleNameTextField, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(descriptionTextField, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(extensionsTextField, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(folderNamesScrollPane)
.addComponent(filenamesScrollPane, javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(18, 18, 18) .addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(maxSizeLabel) .addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(userFolderNote))
.addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))))
.addComponent(daysIncludedLabel))) .addGroup(layout.createSequentialGroup()
.addComponent(shouldSaveCheckBox)) .addComponent(fileNamesCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)) .addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ruleNameLabel)
.addComponent(descriptionLabel)
.addComponent(extensionsLabel)
.addComponent(filenamesLabel)
.addComponent(folderNamesLabel)
.addComponent(fileSizeLabel)
.addComponent(modifiedDateLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(userFolderNote) .addComponent(modifiedWithinCheckbox)
.addGap(0, 0, Short.MAX_VALUE)) .addGap(10, 10, 10)
.addComponent(folderNamesScrollPane, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(modifiedWithTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(filenamesScrollPane, javax.swing.GroupLayout.Alignment.TRAILING) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(extensionsTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(daysIncludedLabel))
.addComponent(descriptionTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ruleNameTextField, javax.swing.GroupLayout.Alignment.TRAILING)))) .addComponent(shouldAlertCheckBox)
.addContainerGap()) .addComponent(shouldSaveCheckBox)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -300,82 +319,118 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
.addComponent(ruleNameLabel) .addComponent(ruleNameLabel)
.addComponent(ruleNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(ruleNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(descriptionLabel) .addComponent(descriptionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(descriptionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(descriptionCheckbox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(extensionsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(extensionsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(extensionsLabel) .addComponent(extensionsCheckbox))
.addComponent(extensionsRadioButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(filenamesScrollPane) .addComponent(filenamesScrollPane)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(fileNamesCheckbox)
.addComponent(filenamesLabel) .addGap(0, 0, Short.MAX_VALUE)))
.addComponent(filenamesRadioButton))
.addGap(0, 53, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(folderNamesLabel) .addComponent(folderNamesScrollPane)
.addComponent(folderNamesScrollPane)) .addGroup(layout.createSequentialGroup()
.addComponent(folderNamesCheckbox)
.addGap(0, 0, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(userFolderNote) .addComponent(userFolderNote)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(fileSizeLabel)
.addComponent(minSizeLabel)
.addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(maxSizeLabel) .addComponent(minSizeCheckBox))
.addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(maxSizeCheckBox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(modifiedDateLabel)
.addComponent(daysIncludedLabel) .addComponent(daysIncludedLabel)
.addComponent(minDaysTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(modifiedWithTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(modifiedWithinCheckbox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(shouldSaveCheckBox) .addComponent(shouldSaveCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(shouldAlertCheckBox) .addComponent(shouldAlertCheckBox)
.addContainerGap()) .addGap(11, 11, 11))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void extensionsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extensionsRadioButtonActionPerformed private void extensionsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extensionsCheckboxActionPerformed
filenamesTextArea.setEnabled(false); if (fileNamesCheckbox.isSelected() && extensionsCheckbox.isSelected()) {
filenamesTextArea.setForeground(Color.LIGHT_GRAY); fileNamesCheckbox.setSelected(false);
extensionsTextField.setEnabled(true); }
extensionsTextField.setForeground(Color.BLACK); updateExclusiveConditions();
}//GEN-LAST:event_extensionsRadioButtonActionPerformed }//GEN-LAST:event_extensionsCheckboxActionPerformed
private void filenamesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filenamesRadioButtonActionPerformed private void fileNamesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileNamesCheckboxActionPerformed
filenamesTextArea.setEnabled(true); if (fileNamesCheckbox.isSelected() && extensionsCheckbox.isSelected()) {
filenamesTextArea.setForeground(Color.BLACK); extensionsCheckbox.setSelected(false);
extensionsTextField.setEnabled(false); }
extensionsTextField.setForeground(Color.LIGHT_GRAY); updateExclusiveConditions();
}//GEN-LAST:event_filenamesRadioButtonActionPerformed }//GEN-LAST:event_fileNamesCheckboxActionPerformed
private void descriptionCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_descriptionCheckboxActionPerformed
descriptionTextField.setEnabled(descriptionCheckbox.isSelected());
}//GEN-LAST:event_descriptionCheckboxActionPerformed
private void folderNamesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_folderNamesCheckboxActionPerformed
folderNamesScrollPane.setEnabled(folderNamesCheckbox.isSelected());
folderNamesTextArea.setEditable(folderNamesCheckbox.isSelected());
folderNamesTextArea.setEnabled(folderNamesCheckbox.isSelected());
updateTextAreaBackgroundColor(folderNamesTextArea);
}//GEN-LAST:event_folderNamesCheckboxActionPerformed
private void minSizeCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_minSizeCheckBoxActionPerformed
minSizeTextField.setEnabled(minSizeCheckBox.isSelected());
}//GEN-LAST:event_minSizeCheckBoxActionPerformed
private void maxSizeCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maxSizeCheckBoxActionPerformed
maxSizeTextField.setEnabled(maxSizeCheckBox.isSelected());
}//GEN-LAST:event_maxSizeCheckBoxActionPerformed
private void modifiedWithinCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modifiedWithinCheckboxActionPerformed
modifiedWithTextField.setEnabled(modifiedWithinCheckbox.isSelected());
}//GEN-LAST:event_modifiedWithinCheckboxActionPerformed
private static void updateTextAreaBackgroundColor(JTextArea textArea){
if (textArea.isEnabled()){
textArea.setBackground(Color.WHITE);
} else {
textArea.setBackground(DISABLED_COLOR);
}
}
private void updateExclusiveConditions() {
extensionsTextField.setEnabled(extensionsCheckbox.isSelected());
filenamesScrollPane.setEnabled(fileNamesCheckbox.isSelected());
filenamesTextArea.setEditable(fileNamesCheckbox.isSelected());
filenamesTextArea.setEnabled(fileNamesCheckbox.isSelected());
updateTextAreaBackgroundColor(filenamesTextArea);
}
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup buttonGroup;
private javax.swing.JLabel daysIncludedLabel; private javax.swing.JLabel daysIncludedLabel;
private javax.swing.JLabel descriptionLabel; private javax.swing.JCheckBox descriptionCheckbox;
private javax.swing.JTextField descriptionTextField; private javax.swing.JTextField descriptionTextField;
private javax.swing.JLabel extensionsLabel; private javax.swing.JCheckBox extensionsCheckbox;
private javax.swing.JRadioButton extensionsRadioButton;
private javax.swing.JTextField extensionsTextField; private javax.swing.JTextField extensionsTextField;
private javax.swing.JLabel fileSizeLabel; private javax.swing.JCheckBox fileNamesCheckbox;
private javax.swing.JLabel filenamesLabel;
private javax.swing.JRadioButton filenamesRadioButton;
private javax.swing.JScrollPane filenamesScrollPane; private javax.swing.JScrollPane filenamesScrollPane;
private javax.swing.JLabel folderNamesLabel; private javax.swing.JCheckBox folderNamesCheckbox;
private javax.swing.JScrollPane folderNamesScrollPane; private javax.swing.JScrollPane folderNamesScrollPane;
private javax.swing.JLabel maxSizeLabel; private javax.swing.JCheckBox maxSizeCheckBox;
private javax.swing.JFormattedTextField maxSizeTextField; private javax.swing.JFormattedTextField maxSizeTextField;
private javax.swing.JFormattedTextField minDaysTextField; private javax.swing.JCheckBox minSizeCheckBox;
private javax.swing.JLabel minSizeLabel;
private javax.swing.JFormattedTextField minSizeTextField; private javax.swing.JFormattedTextField minSizeTextField;
private javax.swing.JLabel modifiedDateLabel; private javax.swing.JFormattedTextField modifiedWithTextField;
private javax.swing.JCheckBox modifiedWithinCheckbox;
private javax.swing.JLabel ruleNameLabel; private javax.swing.JLabel ruleNameLabel;
private javax.swing.JTextField ruleNameTextField; private javax.swing.JTextField ruleNameTextField;
private javax.swing.JCheckBox shouldAlertCheckBox; private javax.swing.JCheckBox shouldAlertCheckBox;
@ -451,32 +506,31 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
"# {1} - minFileSize", "# {1} - minFileSize",
"EditNonFullPathsRulePanel.maxFileSizeSmallerThanMinException=Maximum file size: {0} must be bigger than minimum file size: {1}", "EditNonFullPathsRulePanel.maxFileSizeSmallerThanMinException=Maximum file size: {0} must be bigger than minimum file size: {1}",
"EditNonFullPathsRulePanel.fileNames=File names", "EditNonFullPathsRulePanel.fileNames=File names",
"EditNonFullPathsRulePanel.folderNames=Folder names", "EditNonFullPathsRulePanel.folderNames=Folder names",})
})
ImmutablePair<String, LogicalImagerRule> toRule() throws IOException { ImmutablePair<String, LogicalImagerRule> toRule() throws IOException {
String ruleName = EditRulePanel.validRuleName(ruleNameTextField.getText()); String ruleName = EditRulePanel.validRuleName(ruleNameTextField.getText());
List<String> extensions = validateExtensions(extensionsTextField); List<String> extensions = validateExtensions(extensionsTextField);
List<String> filenames = EditRulePanel.validateTextList(filenamesTextArea, Bundle.EditNonFullPathsRulePanel_fileNames()); List<String> filenames = EditRulePanel.validateTextList(filenamesTextArea, Bundle.EditNonFullPathsRulePanel_fileNames());
List<String> folderNames = EditRulePanel.validateTextList(folderNamesTextArea, Bundle.EditNonFullPathsRulePanel_folderNames()); List<String> folderNames = EditRulePanel.validateTextList(folderNamesTextArea, Bundle.EditNonFullPathsRulePanel_folderNames());
LogicalImagerRule.Builder builder = new LogicalImagerRule.Builder(); LogicalImagerRule.Builder builder = new LogicalImagerRule.Builder();
builder.getName(ruleName) builder.getName(ruleName)
.getDescription(descriptionTextField.getText()) .getDescription(descriptionTextField.getText())
.getShouldAlert(shouldAlertCheckBox.isSelected()) .getShouldAlert(shouldAlertCheckBox.isSelected())
.getShouldSave(shouldSaveCheckBox.isSelected()) .getShouldSave(shouldSaveCheckBox.isSelected())
.getPaths(folderNames); .getPaths(folderNames);
if (extensionsRadioButton.isSelected()) { if (extensionsCheckbox.isSelected()) {
builder.getExtensions(extensions); builder.getExtensions(extensions);
} else { } else if (fileNamesCheckbox.isSelected()) {
builder.getFilenames(filenames); builder.getFilenames(filenames);
} }
int minDays; int minDays;
if (!isBlank(minDaysTextField.getText())) { if (!isBlank(modifiedWithTextField.getText())) {
try { try {
minDaysTextField.commitEdit(); modifiedWithTextField.commitEdit();
minDays = ((Number)minDaysTextField.getValue()).intValue(); minDays = ((Number) modifiedWithTextField.getValue()).intValue();
if (minDays < 0) { if (minDays < 0) {
throw new IOException(Bundle.EditNonFullPathsRulePanel_modifiedDaysNotPositiveException()); throw new IOException(Bundle.EditNonFullPathsRulePanel_modifiedDaysNotPositiveException());
} }
@ -485,12 +539,12 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
throw new IOException(Bundle.EditNonFullPathsRulePanel_modifiedDaysMustBeNumberException(ex.getMessage()), ex); throw new IOException(Bundle.EditNonFullPathsRulePanel_modifiedDaysMustBeNumberException(ex.getMessage()), ex);
} }
} }
int minFileSize = 0; int minFileSize = 0;
if (!isBlank(minSizeTextField.getText())) { if (!isBlank(minSizeTextField.getText())) {
try { try {
minSizeTextField.commitEdit(); minSizeTextField.commitEdit();
minFileSize = ((Number)minSizeTextField.getValue()).intValue(); minFileSize = ((Number) minSizeTextField.getValue()).intValue();
if (minFileSize < 0) { if (minFileSize < 0) {
throw new IOException(Bundle.EditNonFullPathsRulePanel_minFileSizeNotPositiveException()); throw new IOException(Bundle.EditNonFullPathsRulePanel_minFileSizeNotPositiveException());
} }
@ -498,12 +552,12 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
throw new IOException(Bundle.EditNonFullPathsRulePanel_minFileSizeMustBeNumberException(ex.getMessage()), ex); throw new IOException(Bundle.EditNonFullPathsRulePanel_minFileSizeMustBeNumberException(ex.getMessage()), ex);
} }
} }
int maxFileSize = 0; int maxFileSize = 0;
if (!isBlank(maxSizeTextField.getText())) { if (!isBlank(maxSizeTextField.getText())) {
try { try {
maxSizeTextField.commitEdit(); maxSizeTextField.commitEdit();
maxFileSize = ((Number)maxSizeTextField.getValue()).intValue(); maxFileSize = ((Number) maxSizeTextField.getValue()).intValue();
if (maxFileSize < 0) { if (maxFileSize < 0) {
throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeNotPositiveException()); throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeNotPositiveException());
} }
@ -511,7 +565,7 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeMustBeNumberException(ex.getMessage()), ex); throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeMustBeNumberException(ex.getMessage()), ex);
} }
} }
if (maxFileSize != 0 && (maxFileSize < minFileSize)) { if (maxFileSize != 0 && (maxFileSize < minFileSize)) {
throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeSmallerThanMinException(maxFileSize, minFileSize)); throw new IOException(Bundle.EditNonFullPathsRulePanel_maxFileSizeSmallerThanMinException(maxFileSize, minFileSize));
} }
@ -521,25 +575,24 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
if (maxFileSize != 0) { if (maxFileSize != 0) {
builder.getMaxFileSize(maxFileSize); builder.getMaxFileSize(maxFileSize);
} }
LogicalImagerRule rule = builder.build(); LogicalImagerRule rule = builder.build();
return new ImmutablePair<>(ruleName, rule); return new ImmutablePair<>(ruleName, rule);
} }
@NbBundle.Messages({ @NbBundle.Messages({
"EditNonFullPathsRulePanel.emptyExtensionException=Extensions cannot have an empty entry", "EditNonFullPathsRulePanel.emptyExtensionException=Extensions cannot have an empty entry",})
})
private List<String> validateExtensions(JTextField textField) throws IOException { private List<String> validateExtensions(JTextField textField) throws IOException {
if (isBlank(textField.getText())) { if (isBlank(textField.getText())) {
return null; return null;
} }
List<String> extensions = new ArrayList<>(); List<String> extensions = new ArrayList<>();
for (String extension : textField.getText().split(",")) { for (String extension : textField.getText().split(",")) {
extension = strip(extension); String strippedExtension = strip(extension);
if (extension.isEmpty()) { if (extension.isEmpty()) {
throw new IOException(Bundle.EditNonFullPathsRulePanel_emptyExtensionException()); throw new IOException(Bundle.EditNonFullPathsRulePanel_emptyExtensionException());
} }
extensions.add(extension); extensions.add(strippedExtension);
} }
if (extensions.isEmpty()) { if (extensions.isEmpty()) {
return null; return null;