Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
RefreshPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 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.geolocation;
20 
21 import java.awt.event.ActionListener;
22 import javax.swing.JPanel;
23 
29 final class RefreshPanel extends JPanel {
30 
31  private static final long serialVersionUID = 1L;
32 
36  RefreshPanel() {
37  initComponents();
38  }
39 
40  void addCloseActionListener(ActionListener listener) {
41  closeButton.addActionListener(listener);
42  }
43 
44  void addRefreshActionListner(ActionListener listener) {
45  refreshButton.addActionListener(listener);
46  }
47 
48  void removeCloseActionListner(ActionListener listener) {
49  closeButton.removeActionListener(listener);
50  }
51 
52  void removeRefreshActionListner(ActionListener listener) {
53  refreshButton.removeActionListener(listener);
54  }
55 
61  @SuppressWarnings("unchecked")
62  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
63  private void initComponents() {
64  java.awt.GridBagConstraints gridBagConstraints;
65 
66  refreshLabel = new javax.swing.JLabel();
67  refreshButton = new javax.swing.JButton();
68  closeButton = new javax.swing.JButton();
69 
70  setBackground(new java.awt.Color(0, 51, 51));
71  setLayout(new java.awt.GridBagLayout());
72 
73  refreshLabel.setForeground(new java.awt.Color(255, 255, 255));
74  refreshLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png"))); // NOI18N
75  org.openide.awt.Mnemonics.setLocalizedText(refreshLabel, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.refreshLabel.text")); // NOI18N
76  gridBagConstraints = new java.awt.GridBagConstraints();
77  gridBagConstraints.gridx = 0;
78  gridBagConstraints.gridy = 0;
79  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
80  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
81  gridBagConstraints.weightx = 1.0;
82  gridBagConstraints.insets = new java.awt.Insets(15, 10, 15, 10);
83  add(refreshLabel, gridBagConstraints);
84 
85  refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/arrow-circle-double-135.png"))); // NOI18N
86  org.openide.awt.Mnemonics.setLocalizedText(refreshButton, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.refreshButton.text")); // NOI18N
87  refreshButton.setMargin(new java.awt.Insets(2, 5, 2, 5));
88  add(refreshButton, new java.awt.GridBagConstraints());
89 
90  closeButton.setBackground(new java.awt.Color(0, 0, 0));
91  closeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/close-icon.png"))); // NOI18N
92  org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(RefreshPanel.class, "RefreshPanel.closeButton.text")); // NOI18N
93  closeButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
94  closeButton.setOpaque(false);
95  closeButton.addActionListener(new java.awt.event.ActionListener() {
96  public void actionPerformed(java.awt.event.ActionEvent evt) {
97  closeButtonActionPerformed(evt);
98  }
99  });
100  gridBagConstraints = new java.awt.GridBagConstraints();
101  gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
102  add(closeButton, gridBagConstraints);
103  }// </editor-fold>//GEN-END:initComponents
104 
105  private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
106 
107  }//GEN-LAST:event_closeButtonActionPerformed
108 
109 
110  // Variables declaration - do not modify//GEN-BEGIN:variables
111  private javax.swing.JButton closeButton;
112  private javax.swing.JButton refreshButton;
113  private javax.swing.JLabel refreshLabel;
114  // End of variables declaration//GEN-END:variables
115 }

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