19 package org.sleuthkit.autopsy.geolocation;
21 import java.awt.event.ActionListener;
22 import javax.swing.JPanel;
29 final class RefreshPanel
extends JPanel {
31 private static final long serialVersionUID = 1L;
40 void addCloseActionListener(ActionListener listener) {
41 closeButton.addActionListener(listener);
44 void addRefreshActionListner(ActionListener listener) {
45 refreshButton.addActionListener(listener);
48 void removeCloseActionListner(ActionListener listener) {
49 closeButton.removeActionListener(listener);
52 void removeRefreshActionListner(ActionListener listener) {
53 refreshButton.removeActionListener(listener);
61 @SuppressWarnings(
"unchecked")
63 private
void initComponents() {
64 java.awt.GridBagConstraints gridBagConstraints;
66 refreshLabel =
new javax.swing.JLabel();
67 refreshButton =
new javax.swing.JButton();
68 closeButton =
new javax.swing.JButton();
70 setBackground(
new java.awt.Color(0, 51, 51));
71 setLayout(
new java.awt.GridBagLayout());
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")));
75 org.openide.awt.Mnemonics.setLocalizedText(refreshLabel,
org.openide.util.NbBundle.getMessage(RefreshPanel.class,
"RefreshPanel.refreshLabel.text"));
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);
85 refreshButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/images/arrow-circle-double-135.png")));
86 org.openide.awt.Mnemonics.setLocalizedText(refreshButton,
org.openide.util.NbBundle.getMessage(RefreshPanel.class,
"RefreshPanel.refreshButton.text"));
87 refreshButton.setMargin(
new java.awt.Insets(2, 5, 2, 5));
88 add(refreshButton,
new java.awt.GridBagConstraints());
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")));
92 org.openide.awt.Mnemonics.setLocalizedText(closeButton,
org.openide.util.NbBundle.getMessage(RefreshPanel.class,
"RefreshPanel.closeButton.text"));
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);
100 gridBagConstraints =
new java.awt.GridBagConstraints();
101 gridBagConstraints.insets =
new java.awt.Insets(0, 5, 0, 5);
102 add(closeButton, gridBagConstraints);
105 private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {
111 private javax.swing.JButton closeButton;
112 private javax.swing.JButton refreshButton;
113 private javax.swing.JLabel refreshLabel;