From e95dcdf69db1606437fb452206cecbc123e72815 Mon Sep 17 00:00:00 2001 From: adam-m Date: Tue, 21 Feb 2012 14:26:16 -0500 Subject: [PATCH] add clear messages button --- .../autopsy/ingest/Bundle.properties | 2 ++ .../autopsy/ingest/IngestMessagePanel.form | 22 +++++++++++++++++-- .../autopsy/ingest/IngestMessagePanel.java | 22 +++++++++++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/Ingest/src/org/sleuthkit/autopsy/ingest/Bundle.properties b/Ingest/src/org/sleuthkit/autopsy/ingest/Bundle.properties index 2c68ed0f9c..deb0c62c72 100644 --- a/Ingest/src/org/sleuthkit/autopsy/ingest/Bundle.properties +++ b/Ingest/src/org/sleuthkit/autopsy/ingest/Bundle.properties @@ -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 diff --git a/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.form b/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.form index 04251ab155..56ad717ebc 100644 --- a/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.form +++ b/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.form @@ -21,7 +21,9 @@ - + + + @@ -36,7 +38,10 @@ - + + + + @@ -135,5 +140,18 @@ + + + + + + + + + + + + + diff --git a/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java b/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java index ff672a47f1..ec70361aaa 100644 --- a/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java +++ b/Ingest/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java @@ -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;