Autopsy  4.16.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
DomainFilterPanel.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 
25 
29 public class DomainFilterPanel extends AbstractFiltersPanel {
30 
31  private static final long serialVersionUID = 1L;
32  private static final SearchData.Type TYPE = SearchData.Type.DOMAIN;
33 
37  public DomainFilterPanel() {
38  super();
40  addFilter(new DataSourceFilterPanel(), false, null, 0);
41  addFilter(new ArtifactTypeFilterPanel(), false, null, 1);
42  addFilter(new DateFilterPanel(), false, null, 1);
43  int[] pastOccurrencesIndices = null;
45  pastOccurrencesIndices = new int[]{2, 3, 4};
46  }
47  addFilter(new PastOccurrencesFilterPanel(TYPE), true, pastOccurrencesIndices, 0);
48  addPanelsToScrollPane(domainFiltersSplitPane);
49  setLastGroupingAttributeType(DiscoveryAttributes.GroupingAttributeType.MOST_RECENT_DATE);
50  setLastSortingMethod(ResultsSorter.SortingMethod.BY_DOMAIN_NAME);
51  }
52 
58  @SuppressWarnings("unchecked")
59  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
60  private void initComponents() {
61 
62  javax.swing.JScrollPane domainFiltersScrollPane = new javax.swing.JScrollPane();
63  javax.swing.JPanel domainFiltersPanel = new javax.swing.JPanel();
64  domainFiltersSplitPane = new javax.swing.JSplitPane();
65 
66  setPreferredSize(new java.awt.Dimension(225, 70));
67  setLayout(new java.awt.BorderLayout());
68 
69  domainFiltersSplitPane.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(DomainFilterPanel.class, "DomainFilterPanel.domainFiltersSplitPane.border.title"))); // NOI18N
70  domainFiltersSplitPane.setResizeWeight(0.5);
71  domainFiltersSplitPane.setToolTipText(org.openide.util.NbBundle.getMessage(DomainFilterPanel.class, "DomainFilterPanel.domainFiltersSplitPane.toolTipText")); // NOI18N
72 
73  javax.swing.GroupLayout domainFiltersPanelLayout = new javax.swing.GroupLayout(domainFiltersPanel);
74  domainFiltersPanel.setLayout(domainFiltersPanelLayout);
75  domainFiltersPanelLayout.setHorizontalGroup(
76  domainFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77  .addGroup(domainFiltersPanelLayout.createSequentialGroup()
78  .addGap(8, 8, 8)
79  .addComponent(domainFiltersSplitPane)
80  .addGap(8, 8, 8))
81  );
82  domainFiltersPanelLayout.setVerticalGroup(
83  domainFiltersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
84  .addGroup(domainFiltersPanelLayout.createSequentialGroup()
85  .addGap(8, 8, 8)
86  .addComponent(domainFiltersSplitPane)
87  .addGap(8, 8, 8))
88  );
89 
90  domainFiltersScrollPane.setViewportView(domainFiltersPanel);
91 
92  add(domainFiltersScrollPane, java.awt.BorderLayout.CENTER);
93  }// </editor-fold>//GEN-END:initComponents
94 
95  @Override
96  SearchData.Type getType() {
97  return TYPE;
98  }
99 
100 
101  // Variables declaration - do not modify//GEN-BEGIN:variables
102  private javax.swing.JSplitPane domainFiltersSplitPane;
103  // End of variables declaration//GEN-END:variables
104 }

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.