Autopsy  3.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-2014 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 org.openide.util.NbBundle;
24 
28 final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel {
29 
30  private GlobalListSettingsPanel listsPanel;
31  private KeywordSearchGlobalLanguageSettingsPanel languagesPanel;
32  private KeywordSearchGlobalSearchSettingsPanel generalPanel;
33 
34  public KeywordSearchGlobalSettingsPanel() {
35  initComponents();
36  customizeComponents();
37  }
38 
39  private void customizeComponents() {
40  setName(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.title"));
41  listsPanel = new GlobalListSettingsPanel();
42  languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel();
43  generalPanel = new KeywordSearchGlobalSearchSettingsPanel();
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);
50  }
51 
57  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
58  private void initComponents() {
59 
60  tabbedPane = new javax.swing.JTabbedPane();
61 
62  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
63  this.setLayout(layout);
64  layout.setHorizontalGroup(
65  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 670, Short.MAX_VALUE)
67  );
68  layout.setVerticalGroup(
69  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
70  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
71  );
72  }// </editor-fold>//GEN-END:initComponents
73 
74  @Override
75  public void load() {
76  // This calls actually clears the component.
77  listsPanel.load();
78 
79  languagesPanel.load();
80  generalPanel.load();
81 
82  // Reload the XML to avoid 'ghost' vars
83  XmlKeywordSearchList.getCurrent().reload();
84  }
85 
86  @Override
87  public void saveSettings() {
88  listsPanel.store();
89  languagesPanel.store();
90  generalPanel.store();
91  }
92 
93  @Override
94  public void store() {
95  saveSettings();
96  }
97 
98  public void cancel() {
99  XmlKeywordSearchList.getCurrent().reload();
100  }
101 
102  boolean valid() {
103  return true;
104  }
105  // Variables declaration - do not modify//GEN-BEGIN:variables
106  private javax.swing.JTabbedPane tabbedPane;
107  // End of variables declaration//GEN-END:variables
108 }

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.