19 package org.sleuthkit.autopsy.discovery.ui;
 
   21 import java.awt.Cursor;
 
   29 final class ResultsSplitPaneDivider 
extends javax.swing.JPanel {
 
   31     private static final long serialVersionUID = 1L;
 
   36     @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
 
   37     ResultsSplitPaneDivider() {
 
   46     @SuppressWarnings(
"unchecked")
 
   48     private 
void initComponents() {
 
   50         javax.swing.JLabel detailsLabel = 
new javax.swing.JLabel();
 
   51         javax.swing.JButton hideButton = 
new javax.swing.JButton();
 
   52         javax.swing.JButton showButton = 
new javax.swing.JButton();
 
   53         javax.swing.Box.Filler filler1 = 
new javax.swing.Box.Filler(
new java.awt.Dimension(0, 0), 
new java.awt.Dimension(0, 0), 
new java.awt.Dimension(0, 32767));
 
   54         javax.swing.Box.Filler filler2 = 
new javax.swing.Box.Filler(
new java.awt.Dimension(0, 0), 
new java.awt.Dimension(0, 0), 
new java.awt.Dimension(0, 32767));
 
   56         setBackground(
new java.awt.Color(170, 170, 170));
 
   58         org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, 
org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, 
"ResultsSplitPaneDivider.detailsLabel.text")); 
 
   59         detailsLabel.setFocusable(
false);
 
   61         hideButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/discovery/ui/arrow-down.png"))); 
 
   62         org.openide.awt.Mnemonics.setLocalizedText(hideButton, 
org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, 
"ResultsSplitPaneDivider.hideButton.text")); 
 
   63         hideButton.setBorder(null);
 
   64         hideButton.setFocusable(
false);
 
   65         hideButton.setMargin(
new java.awt.Insets(0, 0, 0, 0));
 
   66         hideButton.setCursor(Cursor.getDefaultCursor());
 
   67         hideButton.addActionListener(
new java.awt.event.ActionListener() {
 
   68             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
   69                 hideButtonActionPerformed(evt);
 
   73         showButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/discovery/ui/arrow-up.png"))); 
 
   74         org.openide.awt.Mnemonics.setLocalizedText(showButton, 
org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, 
"ResultsSplitPaneDivider.showButton.text")); 
 
   75         showButton.setBorder(null);
 
   76         showButton.setFocusable(
false);
 
   77         showButton.setMargin(
new java.awt.Insets(0, 0, 0, 0));
 
   78         showButton.setCursor(Cursor.getDefaultCursor());
 
   79         showButton.addActionListener(
new java.awt.event.ActionListener() {
 
   80             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
   81                 showButtonActionPerformed(evt);
 
   85         javax.swing.GroupLayout layout = 
new javax.swing.GroupLayout(
this);
 
   86         this.setLayout(layout);
 
   87         layout.setHorizontalGroup(
 
   88             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 
   89             .addGroup(layout.createSequentialGroup()
 
   91                 .addComponent(detailsLabel)
 
   92                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 199, Short.MAX_VALUE)
 
   93                 .addComponent(showButton)
 
   94                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 
   95                 .addComponent(hideButton)
 
   97             .addComponent(filler2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 
   98             .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 
  100         layout.setVerticalGroup(
 
  101             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 
  102             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
 
  103                 .addComponent(filler2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 
  105                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, 
false)
 
  106                     .addComponent(hideButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 
  107                     .addComponent(showButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 
  108                     .addComponent(detailsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
 
  110                 .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 
  114     private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {
 
  115         DiscoveryEventUtils.getDiscoveryEventBus().post(
new DiscoveryEventUtils.DetailsVisibleEvent(
true));
 
  118     private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {
 
  119         DiscoveryEventUtils.getDiscoveryEventBus().post(
new DiscoveryEventUtils.DetailsVisibleEvent(
false));