Autopsy  4.15.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;
20 
21 import javax.swing.JCheckBox;
22 import javax.swing.JLabel;
23 import javax.swing.JList;
24 
28 final class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel {
29 
30  private static final long serialVersionUID = 1L;
31 
35  UserCreatedFilterPanel() {
36  initComponents();
37  }
38 
44  @SuppressWarnings("unchecked")
45  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
46  private void initComponents() {
47 
48  userCreatedCheckbox = new javax.swing.JCheckBox();
49 
50  org.openide.awt.Mnemonics.setLocalizedText(userCreatedCheckbox, org.openide.util.NbBundle.getMessage(UserCreatedFilterPanel.class, "UserCreatedFilterPanel.userCreatedCheckbox.text_1")); // NOI18N
51  userCreatedCheckbox.setMaximumSize(new java.awt.Dimension(150, 25));
52  userCreatedCheckbox.setMinimumSize(new java.awt.Dimension(150, 25));
53  userCreatedCheckbox.setPreferredSize(new java.awt.Dimension(150, 25));
54 
55  setMinimumSize(new java.awt.Dimension(250, 30));
56  setPreferredSize(new java.awt.Dimension(250, 30));
57 
58  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
59  this.setLayout(layout);
60  layout.setHorizontalGroup(
61  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
62  .addGap(0, 300, Short.MAX_VALUE)
63  );
64  layout.setVerticalGroup(
65  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
66  .addGap(0, 42, Short.MAX_VALUE)
67  );
68  }// </editor-fold>//GEN-END:initComponents
69 
70  @Override
71  void configurePanel(boolean selected, int[] indicesSelected) {
72  userCreatedCheckbox.setSelected(selected);
73  }
74 
75  @Override
76  JCheckBox getCheckbox() {
77  return userCreatedCheckbox;
78  }
79 
80  @Override
81  JLabel getAdditionalLabel() {
82  return null;
83  }
84 
85  @Override
86  String checkForError() {
87  //this filter currently has no errors it generates
88  return "";
89  }
90 
91  // Variables declaration - do not modify//GEN-BEGIN:variables
92  private javax.swing.JCheckBox userCreatedCheckbox;
93  // End of variables declaration//GEN-END:variables
94 
95  @Override
96  JList<?> getList() {
97  return null;
98  }
99 
100  @Override
101  FileSearchFiltering.FileFilter getFilter() {
102  if (userCreatedCheckbox.isSelected()) {
103  return new FileSearchFiltering.UserCreatedFilter();
104  }
105  return null;
106  }
107 
108  @Override
109  boolean hasPanel() {
110  return false;
111  }
112 }

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