Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
DocumentFilterPanel.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 
24 
28 final class DocumentFilterPanel extends AbstractFiltersPanel {
29 
30  private static final long serialVersionUID = 1L;
31  private static final SearchData.Type TYPE = SearchData.Type.DOCUMENT;
32 
36  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
37  DocumentFilterPanel() {
38  super();
39  initComponents();
40  SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(TYPE);
41  int[] sizeIndicesSelected = {3, 4, 5};
42  addFilter(sizeFilterPanel, true, sizeIndicesSelected, 0);
43  addFilter(new DataSourceFilterPanel(), false, null, 0);
44  int[] pastOccurrencesIndices;
45  if (!CentralRepository.isEnabled()) {
46  pastOccurrencesIndices = new int[]{0};
47  } else {
48  pastOccurrencesIndices = new int[]{2, 3, 4};
49  }
50  addFilter(new PastOccurrencesFilterPanel(TYPE), true, pastOccurrencesIndices, 0);
51  addFilter(new HashSetFilterPanel(), false, null, 1);
52  addFilter(new InterestingItemsFilterPanel(), false, null, 1);
53  addFilter(new ParentFolderFilterPanel(), false, null, 1);
54  addPanelsToScrollPane(documentsFiltersSplitPane);
55  }
56 
62  @SuppressWarnings("unchecked")
63  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
64  private void initComponents() {
65 
66  javax.swing.JScrollPane documentFiltersScrollPane = new javax.swing.JScrollPane();
67  javax.swing.JPanel documentFiltersPanel = new javax.swing.JPanel();
68  documentsFiltersSplitPane = new javax.swing.JSplitPane();
69 
70  setLayout(new java.awt.BorderLayout());
71 
72  documentsFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(DocumentFilterPanel.class, "DocumentFilterPanel.documentsFiltersSplitPane.border.title"))); // NOI18N
73  documentsFiltersSplitPane.setResizeWeight(0.5);
74 
75  javax.swing.GroupLayout documentFiltersPanelLayout = new javax.swing.GroupLayout(documentFiltersPanel);
76  documentFiltersPanel.setLayout(documentFiltersPanelLayout);
77  documentFiltersPanelLayout.setHorizontalGroup(
78  documentFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
79  .addGroup(documentFiltersPanelLayout.createSequentialGroup()
80  .addGap(8, 8, 8)
81  .addComponent(documentsFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
82  .addGap(8, 8, 8))
83  );
84  documentFiltersPanelLayout.setVerticalGroup(
85  documentFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
86  .addGroup(documentFiltersPanelLayout.createSequentialGroup()
87  .addGap(8, 8, 8)
88  .addComponent(documentsFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
89  .addGap(8, 8, 8))
90  );
91 
92  documentFiltersScrollPane.setViewportView(documentFiltersPanel);
93 
94  add(documentFiltersScrollPane, java.awt.BorderLayout.CENTER);
95  }// </editor-fold>//GEN-END:initComponents
96  @Override
97  SearchData.Type getType() {
98  return TYPE;
99  }
100  // Variables declaration - do not modify//GEN-BEGIN:variables
101  private javax.swing.JSplitPane documentsFiltersSplitPane;
102  // End of variables declaration//GEN-END:variables
103 
104 }
Type(int value, String displayName, Collection< String > mediaTypes, Collection< BlackboardArtifact.ARTIFACT_TYPE > artifactTypes)

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.