Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PreviouslyNotableFilterPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy
3  *
4  * Copyright 2020 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.discovery.ui;
20 
22 import javax.swing.JCheckBox;
23 import javax.swing.JLabel;
24 import javax.swing.JList;
28 
32 final class PreviouslyNotableFilterPanel extends AbstractDiscoveryFilterPanel {
33 
34  private static final long serialVersionUID = 1L;
35 
36  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
37  PreviouslyNotableFilterPanel() {
38  initComponents();
39  if (!CentralRepository.isEnabled()) {
40  previouslyNotableCheckbox.setEnabled(false);
41  }
42  }
43 
49  @SuppressWarnings("unchecked")
50  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
51  private void initComponents() {
52 
53  previouslyNotableCheckbox = new javax.swing.JCheckBox();
54 
55  org.openide.awt.Mnemonics.setLocalizedText(previouslyNotableCheckbox, org.openide.util.NbBundle.getMessage(PreviouslyNotableFilterPanel.class, "PreviouslyNotableFilterPanel.text_1")); // NOI18N
56  previouslyNotableCheckbox.setMaximumSize(new java.awt.Dimension(255, 25));
57  previouslyNotableCheckbox.setMinimumSize(new java.awt.Dimension(0, 25));
58  previouslyNotableCheckbox.setName(""); // NOI18N
59  previouslyNotableCheckbox.setOpaque(false);
60  previouslyNotableCheckbox.setPreferredSize(new java.awt.Dimension(255, 25));
61  previouslyNotableCheckbox.setRequestFocusEnabled(false);
62 
63  setMinimumSize(new java.awt.Dimension(0, 30));
64  setPreferredSize(new java.awt.Dimension(255, 30));
65  setVerifyInputWhenFocusTarget(false);
66 
67  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
68  this.setLayout(layout);
69  layout.setHorizontalGroup(
70  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71  .addGap(0, 300, Short.MAX_VALUE)
72  );
73  layout.setVerticalGroup(
74  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75  .addGap(0, 42, Short.MAX_VALUE)
76  );
77  }// </editor-fold>//GEN-END:initComponents
78 
79  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
80  @Override
81  void configurePanel(boolean selected, int[] indicesSelected) {
82  previouslyNotableCheckbox.setSelected(selected);
83  }
84 
85  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
86  @Override
87  JCheckBox getCheckbox() {
88  return previouslyNotableCheckbox;
89  }
90 
91  @Override
92  JLabel getAdditionalLabel() {
93  return null;
94  }
95 
96  @Override
97  String checkForError() {
98  //this filter currently has no errors it generates
99  return "";
100  }
101 
102  // Variables declaration - do not modify//GEN-BEGIN:variables
103  private javax.swing.JCheckBox previouslyNotableCheckbox;
104  // End of variables declaration//GEN-END:variables
105 
106  @Override
107  JList<?> getList() {
108  return null;
109  }
110 
111  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
112  @Override
113  AbstractFilter getFilter() {
114  if (previouslyNotableCheckbox.isSelected()) {
115  return new SearchFiltering.PreviouslyNotableFilter();
116  }
117  return null;
118  }
119 
120  @Override
121  boolean hasPanel() {
122  return false;
123  }
124 }

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