19 package org.sleuthkit.autopsy.discovery;
21 import java.awt.event.ActionListener;
22 import javax.swing.JCheckBox;
23 import javax.swing.JLabel;
24 import javax.swing.JList;
25 import javax.swing.event.ListSelectionListener;
30 abstract class AbstractDiscoveryFilterPanel
extends javax.swing.JPanel {
32 private static final long serialVersionUID = 1L;
43 abstract void configurePanel(
boolean selected,
int[] indicesSelected);
50 abstract JCheckBox getCheckbox();
59 abstract JList<?> getList();
67 abstract JLabel getAdditionalLabel();
74 abstract String checkForError();
83 void addListeners(ActionListener actionListener, ListSelectionListener listListener) {
84 if (getCheckbox() != null) {
85 getCheckbox().addActionListener(actionListener);
87 if (getList() != null) {
88 getList().addListSelectionListener(listListener);
98 abstract FileSearchFiltering.FileFilter getFilter();
103 void removeListeners() {
104 if (getCheckbox() != null) {
105 for (ActionListener listener : getCheckbox().getActionListeners()) {
106 getCheckbox().removeActionListener(listener);
109 if (getList() != null) {
110 for (ListSelectionListener listener : getList().getListSelectionListeners()) {
111 getList().removeListSelectionListener(listener);