19 package org.sleuthkit.autopsy.filequery;
21 import java.util.ArrayList;
22 import java.util.List;
23 import javax.swing.DefaultListModel;
24 import javax.swing.event.ListSelectionListener;
33 private final DefaultListModel<DocumentWrapper>
documentListModel =
new DefaultListModel<>();
47 @SuppressWarnings(
"unchecked")
55 documentList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
59 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
60 this.setLayout(layout);
61 layout.setHorizontalGroup(
62 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
63 .addGap(0, 400, Short.MAX_VALUE)
64 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
65 .addComponent(
documentScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
67 layout.setVerticalGroup(
68 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
69 .addGap(0, 300, Short.MAX_VALUE)
70 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
71 .addComponent(
documentScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))
80 documentListModel.removeAllElements();
91 void addListSelectionListener(ListSelectionListener listener) {
92 documentList.getSelectionModel().addListSelectionListener(listener);
102 List<AbstractFile> getInstancesForSelected() {
103 synchronized (
this) {
105 return new ArrayList<>();
107 return documentListModel.getElementAt(
documentList.getSelectedIndex()).getResultFile().getAllInstances();
124 synchronized (
this) {
125 documentListModel.addElement(documentWrapper);
javax.swing.JList< DocumentWrapper > documentList
javax.swing.JScrollPane documentScrollPane
static final long serialVersionUID
final DefaultListModel< DocumentWrapper > documentListModel