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

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.