Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
VideoFilterPanel.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 
21 import java.util.ArrayList;
22 import java.util.List;
26 
30 final class VideoFilterPanel extends AbstractFiltersPanel {
31 
32  private static final long serialVersionUID = 1L;
33  private static final SearchData.Type TYPE = SearchData.Type.VIDEO;
34 
38  @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
39  VideoFilterPanel() {
40  super();
41  initComponents();
42  SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(TYPE);
43  List<SearchData.FileSize> defaultSizes = new ArrayList<>();
44  defaultSizes.add(SearchData.FileSize.LARGE_VIDEO);
45  defaultSizes.add(SearchData.FileSize.XLARGE_VIDEO);
46  defaultSizes.add(SearchData.FileSize.XXLARGE_VIDEO);
47  addFilter(sizeFilterPanel, true, defaultSizes, 0);
48  addFilter(new DataSourceFilterPanel(), false, null, 0);
49  List<SearchData.Frequency> defaultFrequencies = new ArrayList<>();
50  if (!CentralRepository.isEnabled()) {
51  defaultFrequencies.add(SearchData.Frequency.UNKNOWN);
52  } else {
53  defaultFrequencies.add(SearchData.Frequency.RARE);
54  defaultFrequencies.add(SearchData.Frequency.UNIQUE);
55  defaultFrequencies.add(SearchData.Frequency.COMMON);
56  }
57  addFilter(new PastOccurrencesFilterPanel(TYPE), true, defaultFrequencies, 0);
58  addFilter(new UserCreatedFilterPanel(), false, null, 0);
59  addFilter(new HashSetFilterPanel(), false, null, 1);
60  addFilter(new InterestingItemsFilterPanel(), false, null, 1);
61  addFilter(new ObjectDetectedFilterPanel(), false, null, 1);
62  addFilter(new ParentFolderFilterPanel(), false, null, 1);
63  addPanelsToScrollPane(videoFiltersSplitPane);
64  }
65 
71  @SuppressWarnings("unchecked")
72  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
73  private void initComponents() {
74 
75  javax.swing.JScrollPane videoFiltersScrollPane = new javax.swing.JScrollPane();
76  javax.swing.JPanel videoFiltersPanel = new javax.swing.JPanel();
77  videoFiltersSplitPane = new javax.swing.JSplitPane();
78 
79  setLayout(new java.awt.BorderLayout());
80 
81  videoFiltersScrollPane.setPreferredSize(new java.awt.Dimension(312, 102));
82 
83  videoFiltersPanel.setPreferredSize(new java.awt.Dimension(310, 100));
84 
85  videoFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(VideoFilterPanel.class, "VideoFilterPanel.videoFiltersSplitPane.border.title"))); // NOI18N
86  videoFiltersSplitPane.setResizeWeight(0.5);
87 
88  javax.swing.GroupLayout videoFiltersPanelLayout = new javax.swing.GroupLayout(videoFiltersPanel);
89  videoFiltersPanel.setLayout(videoFiltersPanelLayout);
90  videoFiltersPanelLayout.setHorizontalGroup(
91  videoFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
92  .addGroup(videoFiltersPanelLayout.createSequentialGroup()
93  .addGap(8, 8, 8)
94  .addComponent(videoFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
95  .addGap(8, 8, 8))
96  );
97  videoFiltersPanelLayout.setVerticalGroup(
98  videoFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
99  .addGroup(videoFiltersPanelLayout.createSequentialGroup()
100  .addGap(8, 8, 8)
101  .addComponent(videoFiltersSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
102  .addGap(8, 8, 8))
103  );
104 
105  videoFiltersScrollPane.setViewportView(videoFiltersPanel);
106 
107  add(videoFiltersScrollPane, java.awt.BorderLayout.CENTER);
108  }// </editor-fold>//GEN-END:initComponents
109  @Override
110  SearchData.Type getType() {
111  return TYPE;
112  }
113 
114  // Variables declaration - do not modify//GEN-BEGIN:variables
115  private javax.swing.JSplitPane videoFiltersSplitPane;
116  // End of variables declaration//GEN-END:variables
117 
118 }
Type(int value, String displayName, Collection< String > mediaTypes, Collection< BlackboardArtifact.ARTIFACT_TYPE > artifactTypes)

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