Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
UserCreatedFilterPanel.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;
27 
31 final class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel {
32 
33  private static final long serialVersionUID = 1L;
34 
38  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
39  UserCreatedFilterPanel() {
40  initComponents();
41  }
42 
48  @SuppressWarnings("unchecked")
49  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
50  private void initComponents() {
51 
52  userCreatedCheckbox = new javax.swing.JCheckBox();
53 
54  org.openide.awt.Mnemonics.setLocalizedText(userCreatedCheckbox, org.openide.util.NbBundle.getMessage(UserCreatedFilterPanel.class, "UserCreatedFilterPanel.userCreatedCheckbox.text_1")); // NOI18N
55  userCreatedCheckbox.setMaximumSize(new java.awt.Dimension(150, 25));
56  userCreatedCheckbox.setMinimumSize(new java.awt.Dimension(150, 25));
57  userCreatedCheckbox.setPreferredSize(new java.awt.Dimension(150, 25));
58 
59  setMinimumSize(new java.awt.Dimension(250, 30));
60  setPreferredSize(new java.awt.Dimension(250, 30));
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  .addGap(0, 300, Short.MAX_VALUE)
67  );
68  layout.setVerticalGroup(
69  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
70  .addGap(0, 42, Short.MAX_VALUE)
71  );
72  }// </editor-fold>//GEN-END:initComponents
73 
74  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
75  @Override
76  void configurePanel(boolean selected, int[] indicesSelected) {
77  userCreatedCheckbox.setSelected(selected);
78  }
79 
80  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
81  @Override
82  JCheckBox getCheckbox() {
83  return userCreatedCheckbox;
84  }
85 
86  @Override
87  JLabel getAdditionalLabel() {
88  return null;
89  }
90 
91  @Override
92  String checkForError() {
93  //this filter currently has no errors it generates
94  return "";
95  }
96 
97  // Variables declaration - do not modify//GEN-BEGIN:variables
98  private javax.swing.JCheckBox userCreatedCheckbox;
99  // End of variables declaration//GEN-END:variables
100 
101  @Override
102  JList<?> getList() {
103  return null;
104  }
105 
106  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
107  @Override
108  AbstractFilter getFilter() {
109  if (userCreatedCheckbox.isSelected()) {
110  return new SearchFiltering.UserCreatedFilter();
111  }
112  return null;
113  }
114 
115  @Override
116  boolean hasPanel() {
117  return false;
118  }
119 }

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.