Autopsy  4.19.3
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 java.util.List;
23 import javax.swing.JCheckBox;
24 import javax.swing.JLabel;
25 import javax.swing.event.ListSelectionListener;
28 
33 final class KnownAccountTypeFilterPanel extends AbstractDiscoveryFilterPanel {
34 
35  private static final long serialVersionUID = 1L;
36 
37  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
38  KnownAccountTypeFilterPanel() {
39  initComponents();
40  }
41 
47  @SuppressWarnings("unchecked")
48  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
49  private void initComponents() {
50 
51  knownAccountType = new javax.swing.JCheckBox();
52 
53  org.openide.awt.Mnemonics.setLocalizedText(knownAccountType, org.openide.util.NbBundle.getMessage(KnownAccountTypeFilterPanel.class, "KnownAccountTypeFilterPanel.text_1"));
54  knownAccountType.setMinimumSize(new java.awt.Dimension(0, 25));
55  knownAccountType.setName(""); // NOI18N
56  knownAccountType.setOpaque(false);
57  knownAccountType.setRequestFocusEnabled(false);
58 
59  setMinimumSize(new java.awt.Dimension(0, 30));
60  setPreferredSize(new java.awt.Dimension(255, 30));
61  setVerifyInputWhenFocusTarget(false);
62 
63  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
64  this.setLayout(layout);
65  layout.setHorizontalGroup(
66  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
67  .addGap(0, 300, Short.MAX_VALUE)
68  );
69  layout.setVerticalGroup(
70  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71  .addGap(0, 42, Short.MAX_VALUE)
72  );
73  }// </editor-fold>//GEN-END:initComponents
74 
75  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
76  @Override
77  void configurePanel(boolean selected, List<?> selectedItems) {
78  knownAccountType.setSelected(selected);
79  }
80 
81  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
82  @Override
83  JCheckBox getCheckbox() {
84  return knownAccountType;
85  }
86 
87  @Override
88  JLabel getAdditionalLabel() {
89  return null;
90  }
91 
92  @Override
93  String checkForError() {
94  //this filter currently has no errors it generates
95  return "";
96  }
97 
98  // Variables declaration - do not modify//GEN-BEGIN:variables
99  private javax.swing.JCheckBox knownAccountType;
100  // End of variables declaration//GEN-END:variables
101 
102  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
103  @Override
104  AbstractFilter getFilter() {
105  if (knownAccountType.isSelected()) {
106  return new SearchFiltering.KnownAccountTypeFilter();
107  }
108  return null;
109  }
110 
111  @Override
112  boolean hasPanel() {
113  return false;
114  }
115 
116  @Override
117  void addListSelectionListener(ListSelectionListener listener) {
118  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
119  }
120 
121  @Override
122  boolean isFilterSupported() {
123  return true;
124  }
125 }

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