Autopsy  4.15.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ResultsSplitPaneDivider.java
Go to the documentation of this file.
1 /*
2  * Autopsy
3  *
4  * Copyright 2020 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.discovery;
20 
21 import java.awt.Cursor;
22 
26 final class ResultsSplitPaneDivider extends javax.swing.JPanel {
27 
28  private static final long serialVersionUID = 1L;
29 
33  ResultsSplitPaneDivider() {
34  initComponents();
35  }
36 
42  @SuppressWarnings("unchecked")
43  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
44  private void initComponents() {
45 
46  javax.swing.JLabel detailsLabel = new javax.swing.JLabel();
47  javax.swing.JButton hideButton = new javax.swing.JButton();
48  javax.swing.JButton showButton = new javax.swing.JButton();
49  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));
50  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));
51 
52  setBackground(new java.awt.Color(170, 170, 170));
53 
54  org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.detailsLabel.text")); // NOI18N
55  detailsLabel.setFocusable(false);
56 
57  hideButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-down.png"))); // NOI18N
58  org.openide.awt.Mnemonics.setLocalizedText(hideButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.hideButton.text")); // NOI18N
59  hideButton.setBorder(null);
60  hideButton.setFocusable(false);
61  hideButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
62  hideButton.setCursor(Cursor.getDefaultCursor());
63  hideButton.addActionListener(new java.awt.event.ActionListener() {
64  public void actionPerformed(java.awt.event.ActionEvent evt) {
65  hideButtonActionPerformed(evt);
66  }
67  });
68 
69  showButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/arrow-up.png"))); // NOI18N
70  org.openide.awt.Mnemonics.setLocalizedText(showButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.showButton.text")); // NOI18N
71  showButton.setBorder(null);
72  showButton.setFocusable(false);
73  showButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
74  showButton.setCursor(Cursor.getDefaultCursor());
75  showButton.addActionListener(new java.awt.event.ActionListener() {
76  public void actionPerformed(java.awt.event.ActionEvent evt) {
77  showButtonActionPerformed(evt);
78  }
79  });
80 
81  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
82  this.setLayout(layout);
83  layout.setHorizontalGroup(
84  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85  .addGroup(layout.createSequentialGroup()
86  .addContainerGap()
87  .addComponent(detailsLabel)
88  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 251, Short.MAX_VALUE)
89  .addComponent(showButton)
90  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
91  .addComponent(hideButton)
92  .addContainerGap())
93  .addComponent(filler2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
94  .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
95  );
96  layout.setVerticalGroup(
97  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
98  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
99  .addComponent(filler2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
100  .addGap(0, 0, 0)
101  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
102  .addComponent(hideButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
103  .addComponent(showButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
104  .addComponent(detailsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
105  .addGap(0, 0, 0)
106  .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
107  );
108  }// </editor-fold>//GEN-END:initComponents
109 
110  private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showButtonActionPerformed
111  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true));
112  }//GEN-LAST:event_showButtonActionPerformed
113 
114  private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideButtonActionPerformed
115  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false));
116  }//GEN-LAST:event_hideButtonActionPerformed
117 
118 
119  // Variables declaration - do not modify//GEN-BEGIN:variables
120  // End of variables declaration//GEN-END:variables
121 }

Copyright © 2012-2020 Basis Technology. Generated on: Mon Jul 6 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.