Autopsy  4.16.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
DomainSummaryViewer.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 javax.swing.DefaultListModel;
22 
26 public class DomainSummaryViewer extends javax.swing.JPanel {
27 
28  private static final long serialVersionUID = 1L;
29 
30  private final DefaultListModel<DomainWrapper> domainListModel = new DefaultListModel<>();
31 
35  void clearViewer() {
36  synchronized (this) {
37  domainListModel.removeAllElements();
38  domainScrollPane.getVerticalScrollBar().setValue(0);
39  }
40  }
41 
47  }
48 
54  @SuppressWarnings("unchecked")
55  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
56  private void initComponents() {
57 
58  domainScrollPane = new javax.swing.JScrollPane();
59  javax.swing.JList<DomainWrapper> domainList = new javax.swing.JList<>();
60 
61  setLayout(new java.awt.BorderLayout());
62 
63  domainList.setModel(domainListModel);
64  domainList.setCellRenderer(new DomainSummaryPanel());
65  domainScrollPane.setViewportView(domainList);
66 
67  add(domainScrollPane, java.awt.BorderLayout.CENTER);
68  }// </editor-fold>//GEN-END:initComponents
69 
70 
71  // Variables declaration - do not modify//GEN-BEGIN:variables
72  private javax.swing.JScrollPane domainScrollPane;
73  // End of variables declaration//GEN-END:variables
74 
81  void addDomain(DomainWrapper domainWrapper) {
82  synchronized (this) {
83  domainListModel.addElement(domainWrapper);
84  }
85  }
86 }
final DefaultListModel< DomainWrapper > domainListModel

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.