diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties index 52c989c8e7..e55bcd1915 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties @@ -101,3 +101,9 @@ DocumentFilterPanel.documentsFiltersSplitPane.border.title=Step 2: Filter which ImageFilterPanel.imageFiltersSplitPane.border.title=Step 2: Filter which images to show VideoFilterPanel.videoFiltersSplitPane.border.title=Step 2: Filter which videos to show DiscoveryDialog.step1Label.text=Step 1: Choose result type +DividerPanel.jLabel1.text=jLabel1 +DividerPanel.jButton1.text=jButton1 +DividerPanel.jButton2.text=jButton2 +LabeledSplitPaneDivider.jLabel1.text=Details Area +LabeledSplitPaneDivider.jButton1.text= +LabeledSplitPaneDivider.jButton2.text= diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED index 50de856d7b..4430a59ee8 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED @@ -7,6 +7,7 @@ DataSourceModuleWrapper.fileTypeModule.text=File Type Identification module was DataSourceModuleWrapper.hashModule.text=Hash Lookup module was not run on data source: {0}\n DiscoveryDialog.name.text=Discovery DiscoveryTopComponent.cancelButton.text=Cancel Search +DiscoveryTopComponent.details.label=Details Area DiscoveryTopComponent.name=\ Discovery DiscoveryTopComponent.newSearch.text=New Search DiscoveryTopComponent.searchCancelled.text=Search has been cancelled. @@ -262,6 +263,9 @@ DocumentFilterPanel.documentsFiltersSplitPane.border.title=Step 2: Filter which ImageFilterPanel.imageFiltersSplitPane.border.title=Step 2: Filter which images to show VideoFilterPanel.videoFiltersSplitPane.border.title=Step 2: Filter which videos to show DiscoveryDialog.step1Label.text=Step 1: Choose result type +DividerPanel.jLabel1.text=jLabel1 +DividerPanel.jButton1.text=jButton1 +DividerPanel.jButton2.text=jButton2 VideoThumbnailPanel.bytes.text=bytes VideoThumbnailPanel.deleted.text=All instances of file are deleted. VideoThumbnailPanel.gigaBytes.text=GB diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form index 19116a24fe..936dbeed1d 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form @@ -6,9 +6,6 @@ - - - diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java index 33f69712f0..0b88343f8c 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java @@ -226,7 +226,6 @@ final class DiscoveryDialog extends javax.swing.JDialog { setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setMinimumSize(new java.awt.Dimension(600, 300)); - setPreferredSize(new java.awt.Dimension(1000, 650)); imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.imagesButton.text")); // NOI18N diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form index d82dd550a8..4a1f471190 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form @@ -41,7 +41,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java index 69c23e0927..4bf574e094 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java @@ -19,17 +19,19 @@ package org.sleuthkit.autopsy.discovery; import com.google.common.eventbus.Subscribe; +import java.awt.BorderLayout; import java.awt.Color; -import java.awt.Dimension; +import java.awt.Cursor; import java.awt.FlowLayout; import java.awt.Graphics; import java.util.List; import java.util.stream.Collectors; -import javax.swing.Box.Filler; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JLabel; +import javax.swing.JPanel; import javax.swing.JSplitPane; +import javax.swing.SwingConstants; import javax.swing.plaf.basic.BasicSplitPaneDivider; import javax.swing.plaf.basic.BasicSplitPaneUI; import org.openide.util.NbBundle; @@ -79,48 +81,21 @@ public final class DiscoveryTopComponent extends TopComponent { rightSplitPane.setUI(new BasicSplitPaneUI() { @Override public BasicSplitPaneDivider createDefaultDivider() { - return new LabeledSplitPaneDivider(this); + return new BasicSplitPaneDividerImpl(this); + } }); } - private final class LabeledSplitPaneDivider extends BasicSplitPaneDivider { + final class BasicSplitPaneDividerImpl extends BasicSplitPaneDivider { + + BasicSplitPaneDividerImpl(BasicSplitPaneUI ui) { + super(ui); + this.setLayout(new BorderLayout()); + this.add(new LabeledSplitPaneDivider()); + } private static final long serialVersionUID = 1L; - - LabeledSplitPaneDivider(BasicSplitPaneUI ui) { - super(ui); - this.add(new JLabel("Details Area")); - this.add(new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32000, 0))); - JButton upButton = new JButton(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-up.png"))); - upButton.setBorder(null); - upButton.addActionListener(new java.awt.event.ActionListener() { - @Override - public void actionPerformed(java.awt.event.ActionEvent evt) { - handleDetailsVisibleEvent(new DiscoveryEventUtils.DetailsVisibleEvent(true)); - } - }); - this.add(upButton); - JButton downButton = new JButton(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-down.png"))); - downButton.setBorder(null); - downButton.addActionListener(new java.awt.event.ActionListener() { - @Override - public void actionPerformed(java.awt.event.ActionEvent evt) { - handleDetailsVisibleEvent(new DiscoveryEventUtils.DetailsVisibleEvent(false)); - } - }); - this.add(downButton); - this.setLayout(new FlowLayout(FlowLayout.LEFT)); - } - - @Override - public void paint(Graphics g) { - - this.setLayout(new FlowLayout(FlowLayout.LEFT)); - g.setColor(new Color(170, 170, 170)); - g.fillRect(0, 0, getSize().width, getSize().height); - super.paint(g); - } } /** @@ -183,7 +158,7 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane.setDividerLocation(250); mainSplitPane.setPreferredSize(new java.awt.Dimension(1100, 700)); - rightSplitPane.setDividerSize(25); + rightSplitPane.setDividerSize(35); rightSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); rightSplitPane.setResizeWeight(1.0); rightSplitPane.setPreferredSize(new java.awt.Dimension(800, 700)); diff --git a/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.form b/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.form new file mode 100644 index 0000000000..e3831b25ac --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.form @@ -0,0 +1,93 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.java b/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.java new file mode 100644 index 0000000000..a2bb654c9d --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/discovery/LabeledSplitPaneDivider.java @@ -0,0 +1,94 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.sleuthkit.autopsy.discovery; + +/** + * + * @author wschaefer + */ +public class LabeledSplitPaneDivider extends javax.swing.JPanel { + + /** + * Creates new form LabeledSplitPaneDivider + */ + public LabeledSplitPaneDivider() { + initComponents(); + } + + /** + * 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 + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + + setBackground(new java.awt.Color(170, 170, 170)); + + org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(LabeledSplitPaneDivider.class, "LabeledSplitPaneDivider.jLabel1.text")); // NOI18N + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-down.png"))); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(LabeledSplitPaneDivider.class, "LabeledSplitPaneDivider.jButton1.text")); // NOI18N + jButton1.setBorder(null); + jButton1.setMargin(new java.awt.Insets(0, 0, 0, 0)); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-up.png"))); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(LabeledSplitPaneDivider.class, "LabeledSplitPaneDivider.jButton2.text")); // NOI18N + jButton2.setBorder(null); + jButton2.setMargin(new java.awt.Insets(0, 0, 0, 0)); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 270, Short.MAX_VALUE) + .addComponent(jButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, 0)) + ); + }// //GEN-END:initComponents + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true)); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false)); + }//GEN-LAST:event_jButton1ActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel1; + // End of variables declaration//GEN-END:variables +}