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

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.