19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.beans.PropertyChangeListener;
22 import org.openide.util.NbBundle;
29 final class KeywordSearchGlobalSettingsPanel
extends IngestModuleGlobalSettingsPanel implements OptionsPanel {
31 private static final long serialVersionUID = 1L;
32 private final GlobalListSettingsPanel listsPanel =
new GlobalListSettingsPanel();
33 private final KeywordSearchGlobalLanguageSettingsPanel languagesPanel =
new KeywordSearchGlobalLanguageSettingsPanel();
34 private final KeywordSearchGlobalSearchSettingsPanel generalPanel =
new KeywordSearchGlobalSearchSettingsPanel();
36 KeywordSearchGlobalSettingsPanel() {
38 customizeComponents();
41 @NbBundle.Messages({
"KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings"})
42 private void customizeComponents() {
43 setName(Bundle.KeywordSearchGlobalSettingsPanel_Title());
44 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), null,
45 listsPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), 0);
46 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), null,
47 languagesPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.stringExtToolTip"), 1);
48 tabbedPane.insertTab(NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.genTabTitle"), null,
49 generalPanel, NbBundle.getMessage(
this.getClass(),
"KeywordSearchConfigurationPanel.customizeComponents.genTabToolTip"), 2);
53 public void addPropertyChangeListener(PropertyChangeListener l) {
54 super.addPropertyChangeListener(l);
74 if (null != listsPanel) {
75 listsPanel.addPropertyChangeListener(l);
77 if (null != languagesPanel) {
78 languagesPanel.addPropertyChangeListener(l);
80 if (null != generalPanel) {
81 generalPanel.addPropertyChangeListener(l);
86 public void removePropertyChangeListener(PropertyChangeListener l) {
87 super.removePropertyChangeListener(l);
88 listsPanel.removePropertyChangeListener(l);
89 languagesPanel.removePropertyChangeListener(l);
90 generalPanel.removePropertyChangeListener(l);
99 private void initComponents() {
101 tabbedPane =
new javax.swing.JTabbedPane();
103 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
104 this.setLayout(layout);
105 layout.setHorizontalGroup(
106 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
107 .addGroup(layout.createSequentialGroup()
108 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
111 layout.setVerticalGroup(
112 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
113 .addGroup(layout.createSequentialGroup()
114 .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)
124 languagesPanel.load();
128 XmlKeywordSearchList.getCurrent().reload();
132 public void saveSettings() {
134 languagesPanel.store();
135 generalPanel.store();
139 public void store() {
143 public void cancel() {
144 XmlKeywordSearchList.getCurrent().reload();
151 private javax.swing.JTabbedPane tabbedPane;