Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
KeywordSearchGlobalSettingsPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.keywordsearch;
20 
21 import java.beans.PropertyChangeListener;
22 import org.openide.util.NbBundle;
25 
29 final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel {
30 
31  private GlobalListSettingsPanel listsPanel;
32  private KeywordSearchGlobalLanguageSettingsPanel languagesPanel;
33  private KeywordSearchGlobalSearchSettingsPanel generalPanel;
34 
35  public KeywordSearchGlobalSettingsPanel() {
36  initComponents();
37  customizeComponents();
38  }
39 
40  @NbBundle.Messages({"KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings"})
41  private void customizeComponents() {
42  setName(Bundle.KeywordSearchGlobalSettingsPanel_Title());
43  listsPanel = new GlobalListSettingsPanel();
44  languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel();
45  generalPanel = new KeywordSearchGlobalSearchSettingsPanel();
46  tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), null,
47  listsPanel, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), 0);
48  tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), null,
49  languagesPanel, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.stringExtToolTip"), 1);
50  tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.genTabTitle"), null,
51  generalPanel, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.genTabToolTip"), 2);
52  }
53 
54  @Override
55  public void addPropertyChangeListener(PropertyChangeListener l) {
56  listsPanel.addPropertyChangeListener(l);
57  languagesPanel.addPropertyChangeListener(l);
58  generalPanel.addPropertyChangeListener(l);
59  }
60 
61  @Override
62  public void removePropertyChangeListener(PropertyChangeListener l) {
63  listsPanel.removePropertyChangeListener(l);
64  languagesPanel.removePropertyChangeListener(l);
65  generalPanel.removePropertyChangeListener(l);
66  }
67 
73  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
74  private void initComponents() {
75 
76  tabbedPane = new javax.swing.JTabbedPane();
77 
78  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
79  this.setLayout(layout);
80  layout.setHorizontalGroup(
81  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
82  .addGroup(layout.createSequentialGroup()
83  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
84  .addGap(0, 0, 0))
85  );
86  layout.setVerticalGroup(
87  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
88  .addGroup(layout.createSequentialGroup()
89  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)
90  .addGap(0, 0, 0))
91  );
92  }// </editor-fold>//GEN-END:initComponents
93 
94  @Override
95  public void load() {
96  // This calls actually clears the component.
97  listsPanel.load();
98 
99  languagesPanel.load();
100  generalPanel.load();
101 
102  // Reload the XML to avoid 'ghost' vars
103  XmlKeywordSearchList.getCurrent().reload();
104  }
105 
106  @Override
107  public void saveSettings() {
108  listsPanel.store();
109  languagesPanel.store();
110  generalPanel.store();
111  }
112 
113  @Override
114  public void store() {
115  saveSettings();
116  }
117 
118  public void cancel() {
119  XmlKeywordSearchList.getCurrent().reload();
120  }
121 
122  boolean valid() {
123  return true;
124  }
125  // Variables declaration - do not modify//GEN-BEGIN:variables
126  private javax.swing.JTabbedPane tabbedPane;
127  // End of variables declaration//GEN-END:variables
128 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon Apr 24 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.