19 package org.sleuthkit.autopsy.discovery.ui;
22 import java.awt.event.ActionListener;
23 import javax.swing.JCheckBox;
24 import javax.swing.JLabel;
25 import javax.swing.JList;
26 import javax.swing.event.ListSelectionListener;
32 abstract class AbstractDiscoveryFilterPanel
extends javax.swing.JPanel {
34 private static final long serialVersionUID = 1L;
45 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
46 abstract
void configurePanel(
boolean selected,
int[] indicesSelected);
53 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
54 abstract JCheckBox getCheckbox();
63 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
64 abstract JList<?> getList();
72 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
73 abstract JLabel getAdditionalLabel();
81 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
82 abstract String checkForError();
91 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
92 void addListeners(ActionListener actionListener, ListSelectionListener listListener) {
93 if (getCheckbox() != null) {
94 getCheckbox().addActionListener(actionListener);
96 if (getList() != null) {
97 getList().addListSelectionListener(listListener);
107 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
108 abstract AbstractFilter getFilter();
113 @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
114 void removeListeners() {
115 if (getCheckbox() != null) {
116 for (ActionListener listener : getCheckbox().getActionListeners()) {
117 getCheckbox().removeActionListener(listener);
120 if (getList() != null) {
121 for (ListSelectionListener listener : getList().getListSelectionListeners()) {
122 getList().removeListSelectionListener(listener);