19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.beans.PropertyChangeListener;
22 import org.openide.util.NbBundle;
29 @SuppressWarnings(
"PMD.SingularField")
30 final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel {
32 private static final long serialVersionUID = 1L;
33 private final GlobalListSettingsPanel listsPanel =
new GlobalListSettingsPanel();
34 private final KeywordSearchGlobalLanguageSettingsPanel languagesPanel =
new KeywordSearchGlobalLanguageSettingsPanel();
35 private final KeywordSearchGlobalSearchSettingsPanel generalPanel =
new KeywordSearchGlobalSearchSettingsPanel();
37 KeywordSearchGlobalSettingsPanel() {
39 customizeComponents();
42 @NbBundle.Messages({
"KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings"})
43 private void customizeComponents() {
44 setName(Bundle.KeywordSearchGlobalSettingsPanel_Title());
45 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), null,
46 listsPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), 0);
47 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), null,
48 languagesPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.stringExtToolTip"), 1);
49 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.genTabTitle"), null,
50 generalPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.genTabToolTip"), 2);
54 public void addPropertyChangeListener(PropertyChangeListener l) {
55 super.addPropertyChangeListener(l);
75 if (null != listsPanel) {
76 listsPanel.addPropertyChangeListener(l);
78 if (null != languagesPanel) {
79 languagesPanel.addPropertyChangeListener(l);
81 if (null != generalPanel) {
82 generalPanel.addPropertyChangeListener(l);
87 public void removePropertyChangeListener(PropertyChangeListener l) {
88 super.removePropertyChangeListener(l);
89 listsPanel.removePropertyChangeListener(l);
90 languagesPanel.removePropertyChangeListener(l);
91 generalPanel.removePropertyChangeListener(l);
100 private void initComponents() {
102 tabbedPane =
new javax.swing.JTabbedPane();
104 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
105 this.setLayout(layout);
106 layout.setHorizontalGroup(
107 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
108 .addGroup(layout.createSequentialGroup()
109 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 926, Short.MAX_VALUE)
112 layout.setVerticalGroup(
113 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
114 .addGroup(layout.createSequentialGroup()
115 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)
125 languagesPanel.load();
129 XmlKeywordSearchList.getCurrent().reload();
133 public void saveSettings() {
135 languagesPanel.store();
136 generalPanel.store();
140 public void store() {
144 public void cancel() {
145 XmlKeywordSearchList.getCurrent().reload();
152 private javax.swing.JTabbedPane tabbedPane;