Autopsy  4.16.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.ui;
20 
21 import java.awt.Cursor;
22 
24 
28 final class ResultsSplitPaneDivider extends javax.swing.JPanel {
29 
30  private static final long serialVersionUID = 1L;
31 
35  ResultsSplitPaneDivider() {
36  initComponents();
37  }
38 
44  @SuppressWarnings("unchecked")
45  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
46  private void initComponents() {
47 
48  javax.swing.JLabel detailsLabel = new javax.swing.JLabel();
49  javax.swing.JButton hideButton = new javax.swing.JButton();
50  javax.swing.JButton showButton = new javax.swing.JButton();
51  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));
52  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));
53 
54  setBackground(new java.awt.Color(170, 170, 170));
55 
56  org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.detailsLabel.text")); // NOI18N
57  detailsLabel.setFocusable(false);
58 
59  hideButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/ui/arrow-down.png"))); // NOI18N
60  org.openide.awt.Mnemonics.setLocalizedText(hideButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.hideButton.text")); // NOI18N
61  hideButton.setBorder(null);
62  hideButton.setFocusable(false);
63  hideButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
64  hideButton.setCursor(Cursor.getDefaultCursor());
65  hideButton.addActionListener(new java.awt.event.ActionListener() {
66  public void actionPerformed(java.awt.event.ActionEvent evt) {
67  hideButtonActionPerformed(evt);
68  }
69  });
70 
71  showButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/ui/arrow-up.png"))); // NOI18N
72  org.openide.awt.Mnemonics.setLocalizedText(showButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.showButton.text")); // NOI18N
73  showButton.setBorder(null);
74  showButton.setFocusable(false);
75  showButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
76  showButton.setCursor(Cursor.getDefaultCursor());
77  showButton.addActionListener(new java.awt.event.ActionListener() {
78  public void actionPerformed(java.awt.event.ActionEvent evt) {
79  showButtonActionPerformed(evt);
80  }
81  });
82 
83  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
84  this.setLayout(layout);
85  layout.setHorizontalGroup(
86  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87  .addGroup(layout.createSequentialGroup()
88  .addContainerGap()
89  .addComponent(detailsLabel)
90  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 199, Short.MAX_VALUE)
91  .addComponent(showButton)
92  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
93  .addComponent(hideButton)
94  .addContainerGap())
95  .addComponent(filler2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
96  .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
97  );
98  layout.setVerticalGroup(
99  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
100  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
101  .addComponent(filler2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
102  .addGap(0, 0, 0)
103  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
104  .addComponent(hideButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
105  .addComponent(showButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
106  .addComponent(detailsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
107  .addGap(0, 0, 0)
108  .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
109  );
110  }// </editor-fold>//GEN-END:initComponents
111 
112  private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showButtonActionPerformed
113  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true));
114  }//GEN-LAST:event_showButtonActionPerformed
115 
116  private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideButtonActionPerformed
117  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false));
118  }//GEN-LAST:event_hideButtonActionPerformed
119 
120 
121  // Variables declaration - do not modify//GEN-BEGIN:variables
122  // End of variables declaration//GEN-END:variables
123 }

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