Autopsy  4.17.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.ui;
20 
24 
28 final class ImageFilterPanel extends AbstractFiltersPanel {
29 
30  private static final long serialVersionUID = 1L;
31  private static final SearchData.Type TYPE = SearchData.Type.IMAGE;
32 
36  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
37  ImageFilterPanel() {
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 UserCreatedFilterPanel(), false, null, 1);
52  addFilter(new HashSetFilterPanel(), false, null, 1);
53  addFilter(new InterestingItemsFilterPanel(), false, null, 1);
54  addFilter(new ObjectDetectedFilterPanel(), false, null, 1);
55  addFilter(new ParentFolderFilterPanel(), false, null, 1);
56  addPanelsToScrollPane(imageFiltersSplitPane);
57 
58  }
59 
65  @SuppressWarnings("unchecked")
66  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
67  private void initComponents() {
68 
69  javax.swing.JScrollPane imageFiltersScrollPane = new javax.swing.JScrollPane();
70  javax.swing.JPanel imageFiltersPanel = new javax.swing.JPanel();
71  imageFiltersSplitPane = new javax.swing.JSplitPane();
72 
73  setLayout(new java.awt.BorderLayout());
74 
75  imageFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ImageFilterPanel.class, "ImageFilterPanel.imageFiltersSplitPane.border.title"))); // NOI18N
76  imageFiltersSplitPane.setResizeWeight(0.5);
77  imageFiltersSplitPane.setToolTipText(org.openide.util.NbBundle.getMessage(ImageFilterPanel.class, "ImageFilterPanel.imageFiltersSplitPane.toolTipText")); // NOI18N
78 
79  javax.swing.GroupLayout imageFiltersPanelLayout = new javax.swing.GroupLayout(imageFiltersPanel);
80  imageFiltersPanel.setLayout(imageFiltersPanelLayout);
81  imageFiltersPanelLayout.setHorizontalGroup(
82  imageFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
83  .addGroup(imageFiltersPanelLayout.createSequentialGroup()
84  .addGap(8, 8, 8)
85  .addComponent(imageFiltersSplitPane)
86  .addGap(8, 8, 8))
87  );
88  imageFiltersPanelLayout.setVerticalGroup(
89  imageFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
90  .addGroup(imageFiltersPanelLayout.createSequentialGroup()
91  .addGap(8, 8, 8)
92  .addComponent(imageFiltersSplitPane)
93  .addGap(8, 8, 8))
94  );
95 
96  imageFiltersScrollPane.setViewportView(imageFiltersPanel);
97 
98  add(imageFiltersScrollPane, java.awt.BorderLayout.CENTER);
99  }// </editor-fold>//GEN-END:initComponents
100 
101  @Override
102  SearchData.Type getType() {
103  return TYPE;
104  }
105 
106  // Variables declaration - do not modify//GEN-BEGIN:variables
107  private javax.swing.JSplitPane imageFiltersSplitPane;
108  // End of variables declaration//GEN-END:variables
109 
110 }
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.