Autopsy  4.0
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  @NbBundle.Messages({"KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings"})
40  private void customizeComponents() {
41  setName(Bundle.KeywordSearchGlobalSettingsPanel_Title());
42  listsPanel = new GlobalListSettingsPanel();
43  languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel();
44  generalPanel = new KeywordSearchGlobalSearchSettingsPanel();
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);
51  }
52 
58  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
59  private void initComponents() {
60 
61  tabbedPane = new javax.swing.JTabbedPane();
62 
63  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
64  this.setLayout(layout);
65  layout.setHorizontalGroup(
66  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
67  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 670, Short.MAX_VALUE)
68  );
69  layout.setVerticalGroup(
70  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71  .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
72  );
73  }// </editor-fold>//GEN-END:initComponents
74 
75  @Override
76  public void load() {
77  // This calls actually clears the component.
78  listsPanel.load();
79 
80  languagesPanel.load();
81  generalPanel.load();
82 
83  // Reload the XML to avoid 'ghost' vars
84  XmlKeywordSearchList.getCurrent().reload();
85  }
86 
87  @Override
88  public void saveSettings() {
89  listsPanel.store();
90  languagesPanel.store();
91  generalPanel.store();
92  }
93 
94  @Override
95  public void store() {
96  saveSettings();
97  }
98 
99  public void cancel() {
100  XmlKeywordSearchList.getCurrent().reload();
101  }
102 
103  boolean valid() {
104  return true;
105  }
106  // Variables declaration - do not modify//GEN-BEGIN:variables
107  private javax.swing.JTabbedPane tabbedPane;
108  // End of variables declaration//GEN-END:variables
109 }

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