Autopsy  4.15.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ImageFilterPanel.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 ImageFilterPanel extends AbstractFiltersPanel {
27 
28  private static final long serialVersionUID = 1L;
29  private static final FileSearchData.FileType FILE_TYPE = FileSearchData.FileType.IMAGE;
30 
34  ImageFilterPanel() {
35  super();
36  initComponents();
37  SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(FILE_TYPE);
38  int[] sizeIndicesSelected = {1, 2, 3, 4, 5};
39  addFilter(sizeFilterPanel, true, sizeIndicesSelected, 0);
40  addFilter(new DataSourceFilterPanel(), false, null, 0);
41  int[] pastOccurrencesIndices;
42  if (!CentralRepository.isEnabled()) {
43  pastOccurrencesIndices = new int[]{0};
44  } else {
45  pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7};
46  }
47  addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0);
48  addFilter(new UserCreatedFilterPanel(), false, null, 1);
49  addFilter(new HashSetFilterPanel(), false, null, 1);
50  addFilter(new InterestingItemsFilterPanel(), false, null, 1);
51  addFilter(new ObjectDetectedFilterPanel(), false, null, 1);
52  addFilter(new ParentFolderFilterPanel(), false, null, 1);
53  addPanelsToScrollPane(imageFiltersSplitPane);
54 
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 imageFiltersScrollPane = new javax.swing.JScrollPane();
67  javax.swing.JPanel imageFiltersPanel = new javax.swing.JPanel();
68  imageFiltersSplitPane = new javax.swing.JSplitPane();
69 
70  setLayout(new java.awt.BorderLayout());
71 
72  imageFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ImageFilterPanel.class, "ImageFilterPanel.imageFiltersSplitPane.border.title"))); // NOI18N
73  imageFiltersSplitPane.setResizeWeight(0.5);
74  imageFiltersSplitPane.setToolTipText(org.openide.util.NbBundle.getMessage(ImageFilterPanel.class, "ImageFilterPanel.imageFiltersSplitPane.toolTipText")); // NOI18N
75 
76  javax.swing.GroupLayout imageFiltersPanelLayout = new javax.swing.GroupLayout(imageFiltersPanel);
77  imageFiltersPanel.setLayout(imageFiltersPanelLayout);
78  imageFiltersPanelLayout.setHorizontalGroup(
79  imageFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80  .addGroup(imageFiltersPanelLayout.createSequentialGroup()
81  .addGap(8, 8, 8)
82  .addComponent(imageFiltersSplitPane)
83  .addGap(8, 8, 8))
84  );
85  imageFiltersPanelLayout.setVerticalGroup(
86  imageFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87  .addGroup(imageFiltersPanelLayout.createSequentialGroup()
88  .addGap(8, 8, 8)
89  .addComponent(imageFiltersSplitPane)
90  .addGap(8, 8, 8))
91  );
92 
93  imageFiltersScrollPane.setViewportView(imageFiltersPanel);
94 
95  add(imageFiltersScrollPane, java.awt.BorderLayout.CENTER);
96  }// </editor-fold>//GEN-END:initComponents
97 
98  @Override
99  FileSearchData.FileType getFileType() {
100  return FILE_TYPE;
101  }
102 
103  // Variables declaration - do not modify//GEN-BEGIN:variables
104  private javax.swing.JSplitPane imageFiltersSplitPane;
105  // End of variables declaration//GEN-END:variables
106 }

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.