add clear messages button

This commit is contained in:
adam-m
2012-02-21 14:26:16 -05:00
parent 9609aea951
commit e95dcdf69d
3 changed files with 42 additions and 4 deletions
@@ -27,3 +27,5 @@ IngestMessagePanel.readAllButton.text=Read All
IngestMessagePanel.viewArtifactButton.toolTipText=Open in a viewer
IngestMessagePanel.viewArtifactButton.text=Open Viewer
IngestMessagePanel.detailsViewerPane.contentType=text/html
IngestMessagePanel.clearAllButton.text=Clear All
IngestMessagePanel.clearAllButton.toolTipText=Clears (removes) all current messages
@@ -21,7 +21,9 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="306" max="32767" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="-2" pref="152" max="-2" attributes="0"/>
<Component id="clearAllButton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="readAllButton" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jScrollPane2" alignment="1" pref="306" max="32767" attributes="0"/>
@@ -36,7 +38,10 @@
<Group type="102" alignment="0" attributes="0">
<Component id="jScrollPane1" min="-2" pref="187" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="readAllButton" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="readAllButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="clearAllButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jScrollPane2" pref="112" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
@@ -135,5 +140,18 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="readAllButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="clearAllButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessagePanel.clearAllButton.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/ingest/Bundle.properties" key="IngestMessagePanel.clearAllButton.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="clearAllButtonActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>
@@ -66,6 +66,7 @@ public class IngestMessagePanel extends javax.swing.JPanel {
detailsViewerPane = new javax.swing.JEditorPane();
viewArtifactButton = new javax.swing.JButton();
readAllButton = new javax.swing.JButton();
clearAllButton = new javax.swing.JButton();
setOpaque(false);
@@ -106,13 +107,23 @@ public class IngestMessagePanel extends javax.swing.JPanel {
}
});
clearAllButton.setText(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.clearAllButton.text")); // NOI18N
clearAllButton.setToolTipText(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.clearAllButton.toolTipText")); // NOI18N
clearAllButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
clearAllButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGap(152, 152, 152)
.addComponent(clearAllButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(readAllButton))
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
@@ -124,7 +135,9 @@ public class IngestMessagePanel extends javax.swing.JPanel {
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(readAllButton)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(readAllButton)
.addComponent(clearAllButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -141,7 +154,12 @@ public class IngestMessagePanel extends javax.swing.JPanel {
tableModel.setVisitedAll();
}//GEN-LAST:event_readAllButtonActionPerformed
private void clearAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearAllButtonActionPerformed
clearMessages();
}//GEN-LAST:event_clearAllButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton clearAllButton;
private javax.swing.JEditorPane detailsViewerPane;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;