Autopsy  4.15.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;
20 
22 
26 final class DocumentFilterPanel extends AbstractFiltersPanel {
27 
28  private static final long serialVersionUID = 1L;
29  private static final FileSearchData.FileType FILE_TYPE = FileSearchData.FileType.DOCUMENTS;
30 
34  DocumentFilterPanel() {
35  super();
36  initComponents();
37  addFilter(new SizeFilterPanel(FileSearchData.FileType.DOCUMENTS), false, null, 0);
38  addFilter(new DataSourceFilterPanel(), false, null, 0);
39  int[] pastOccurrencesIndices;
40  if (!CentralRepository.isEnabled()) {
41  pastOccurrencesIndices = new int[]{0};
42  } else {
43  pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7};
44  }
45  addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0);
46  addFilter(new HashSetFilterPanel(), false, null, 1);
47  addFilter(new InterestingItemsFilterPanel(), false, null, 1);
48  addFilter(new ParentFolderFilterPanel(), false, null, 1);
49  addPanelsToScrollPane(documentsFiltersSplitPane);
50  }
51 
57  @SuppressWarnings("unchecked")
58  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
59  private void initComponents() {
60 
61  javax.swing.JScrollPane documentFiltersScrollPane = new javax.swing.JScrollPane();
62  javax.swing.JPanel documentFiltersPanel = new javax.swing.JPanel();
63  documentsFiltersSplitPane = new javax.swing.JSplitPane();
64 
65  setLayout(new java.awt.BorderLayout());
66 
67  documentsFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(DocumentFilterPanel.class, "DocumentFilterPanel.documentsFiltersSplitPane.border.title"))); // NOI18N
68  documentsFiltersSplitPane.setResizeWeight(0.5);
69 
70  javax.swing.GroupLayout documentFiltersPanelLayout = new javax.swing.GroupLayout(documentFiltersPanel);
71  documentFiltersPanel.setLayout(documentFiltersPanelLayout);
72  documentFiltersPanelLayout.setHorizontalGroup(
73  documentFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
74  .addGroup(documentFiltersPanelLayout.createSequentialGroup()
75  .addGap(8, 8, 8)
76  .addComponent(documentsFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
77  .addGap(8, 8, 8))
78  );
79  documentFiltersPanelLayout.setVerticalGroup(
80  documentFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81  .addGroup(documentFiltersPanelLayout.createSequentialGroup()
82  .addGap(8, 8, 8)
83  .addComponent(documentsFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
84  .addGap(8, 8, 8))
85  );
86 
87  documentFiltersScrollPane.setViewportView(documentFiltersPanel);
88 
89  add(documentFiltersScrollPane, java.awt.BorderLayout.CENTER);
90  }// </editor-fold>//GEN-END:initComponents
91  @Override
92  FileSearchData.FileType getFileType() {
93  return FILE_TYPE;
94  }
95  // Variables declaration - do not modify//GEN-BEGIN:variables
96  private javax.swing.JSplitPane documentsFiltersSplitPane;
97  // End of variables declaration//GEN-END:variables
98 
99 }

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.