Autopsy  4.20.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;
23 
25 
29 final class ResultsSplitPaneDivider extends javax.swing.JPanel {
30 
31  private static final long serialVersionUID = 1L;
32 
36  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
37  ResultsSplitPaneDivider() {
38  initComponents();
39  }
40 
46  @SuppressWarnings("unchecked")
47  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
48  private void initComponents() {
49 
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));
55 
56  setBackground(new java.awt.Color(170, 170, 170));
57 
58  org.openide.awt.Mnemonics.setLocalizedText(detailsLabel, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.detailsLabel.text")); // NOI18N
59  detailsLabel.setFocusable(false);
60 
61  hideButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/ui/arrow-down.png"))); // NOI18N
62  org.openide.awt.Mnemonics.setLocalizedText(hideButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.hideButton.text")); // NOI18N
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);
70  }
71  });
72 
73  showButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/discovery/ui/arrow-up.png"))); // NOI18N
74  org.openide.awt.Mnemonics.setLocalizedText(showButton, org.openide.util.NbBundle.getMessage(ResultsSplitPaneDivider.class, "ResultsSplitPaneDivider.showButton.text")); // NOI18N
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);
82  }
83  });
84 
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()
90  .addContainerGap()
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)
96  .addContainerGap())
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)
99  );
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)
104  .addGap(0, 0, 0)
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))
109  .addGap(0, 0, 0)
110  .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
111  );
112  }// </editor-fold>//GEN-END:initComponents
113 
114  private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showButtonActionPerformed
115  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true));
116  }//GEN-LAST:event_showButtonActionPerformed
117 
118  private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideButtonActionPerformed
119  DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false));
120  }//GEN-LAST:event_hideButtonActionPerformed
121 
122 
123  // Variables declaration - do not modify//GEN-BEGIN:variables
124  // End of variables declaration//GEN-END:variables
125 }

Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.