1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

These changes in support of AUT-740 concerning KeywordSearch 'Advanced

Keyword Search Configuration' dialog box. Renamed 'Save As' button to
'Copy List'. Added cancel button. Altered logic so that when a copy list
operation is aborted, a dialog no longer pops up saying that the list was
saved.
This commit is contained in:
Tim McIver
2013-01-11 12:35:02 -05:00
parent 47fc2abb80
commit e840fa0a0e
6 changed files with 48 additions and 17 deletions

View File

@@ -59,18 +59,22 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="343" max="32767" attributes="0"/>
<Component id="applyButton" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="242" max="32767" attributes="0"/>
<Component id="applyButton" min="-2" pref="70" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cancelButton" min="-2" pref="70" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
<Component id="applyButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="applyButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="4" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -83,6 +87,16 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="cancelButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AdvancedConfigurationDialog.cancelButton.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="cancelButtonActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.Box$Filler" name="filler2">

View File

@@ -85,6 +85,7 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog {
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4));
jPanel1 = new javax.swing.JPanel();
applyButton = new javax.swing.JButton();
cancelButton = new javax.swing.JButton();
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4));
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
@@ -98,21 +99,31 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog {
applyButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.applyButton.text")); // NOI18N
cancelButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.cancelButton.text")); // NOI18N
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(343, Short.MAX_VALUE)
.addComponent(applyButton)
.addContainerGap())
.addContainerGap(242, Short.MAX_VALUE)
.addComponent(applyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(applyButton)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(applyButton)
.addComponent(cancelButton))
.addGap(0, 4, Short.MAX_VALUE))
);
getContentPane().add(jPanel1);
@@ -121,8 +132,13 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog {
pack();
}// </editor-fold>//GEN-END:initComponents
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
close();
}//GEN-LAST:event_cancelButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton applyButton;
private javax.swing.JButton cancelButton;
private javax.swing.Box.Filler filler1;
private javax.swing.Box.Filler filler2;
private javax.swing.JPanel jPanel1;
@@ -132,8 +148,8 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog {
public void addApplyButtonListener(ActionListener l) {
this.applyButton.addActionListener(l);
}
public void close() {
this.dispose();
dispose();
}
}

View File

@@ -103,3 +103,4 @@ GeneralPanel.useBestViewerRB.text=Change to the most specific file viewer
GeneralPanel.keepCurrentViewerRB.text=Stay on the same file viewer
GeneralPanel.useBestViewerRB.toolTipText=For example, change from Hex to Media when a JPEG is selected.
GeneralPanel.keepCurrentViewerRB.toolTipText=For example, stay in Hex view when a JPEG is selected.
AdvancedConfigurationDialog.cancelButton.text=Cancel

View File

@@ -18,7 +18,7 @@ ExtractedContentPanel.hitPreviousButton.text=
ExtractedContentPanel.hitNextButton.text=
ExtractedContentPanel.copyMenuItem.text=Copy
ExtractedContentPanel.selectAllMenuItem.text=Select All
KeywordSearchEditListPanel.saveListButton.text=Save As
KeywordSearchEditListPanel.saveListButton.text=Copy List
KeywordSearchEditListPanel.addWordField.text=
KeywordSearchEditListPanel.addWordButton.text=Add
KeywordSearchEditListPanel.chRegex.text=Regular Expression

View File

@@ -118,10 +118,11 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme
if (shouldAdd) {
writer.addList(listName, keywords);
KeywordSearchUtil.displayDialog(FEATURE_NAME, "Keyword List <" + listName + "> saved", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO);
}
currentKeywordList = writer.getList(listName);
KeywordSearchUtil.displayDialog(FEATURE_NAME, "Keyword List <" + listName + "> saved", KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO);
//currentKeywordList = writer.getList(listName);
listsManagementPanel.resync();
}
});

View File

@@ -37,7 +37,6 @@ import javax.swing.DefaultListSelectionModel;
import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;