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

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