19 package org.sleuthkit.autopsy.centralrepository.contentviewer;
21 import java.awt.Component;
22 import java.awt.Cursor;
23 import java.util.concurrent.ExecutionException;
24 import java.util.logging.Level;
26 import javax.swing.JPanel;
27 import org.openide.nodes.Node;
28 import org.openide.util.NbBundle.Messages;
29 import org.openide.util.lookup.ServiceProvider;
39 @SuppressWarnings(
"PMD.SingularField")
40 @ServiceProvider(service = DataContentViewer.class, position = 10)
41 @Messages({
"DataContentViewerOtherCases.title=Other Occurrences",
42 "DataContentViewerOtherCases.toolTip=Displays instances of the selected file/artifact from other occurrences."})
45 private static final long serialVersionUID = -1L;
49 private OtherOccurrencesNodeWorker worker = null;
56 add(otherOccurrencesPanel);
61 return Bundle.DataContentViewerOtherCases_title();
66 return Bundle.DataContentViewerOtherCases_toolTip();
81 otherOccurrencesPanel.
reset();
99 }
else if (node != null) {
102 && file.getSize() > 0
103 && ((file.getMd5Hash() != null) && (!file.getMd5Hash().isEmpty()));
110 otherOccurrencesPanel.
reset();
111 otherOccurrencesPanel.showPanelLoadingMessage();
117 if (worker != null) {
120 worker =
new OtherOccurrencesNodeWorker(node) {
124 if (!isCancelled()) {
125 OtherOccurrencesData data =
get();
126 otherOccurrencesPanel.populateTable(data);
127 otherOccurrencesPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
129 }
catch (InterruptedException | ExecutionException ex) {
134 otherOccurrencesPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
143 @SuppressWarnings(
"unchecked")
145 private
void initComponents() {
146 java.awt.GridBagConstraints gridBagConstraints;
148 setMinimumSize(
new java.awt.Dimension(1000, 10));
150 setPreferredSize(
new java.awt.Dimension(1000, 63));
151 setLayout(
new java.awt.BorderLayout());
int isPreferred(Node node)
static AbstractFile getAbstractFileFromNode(Node node)
static final Logger logger
boolean isSupported(Node node)
static BlackboardArtifact getBlackboardArtifactFromNode(Node node)
DataContentViewerOtherCases()
synchronized static Logger getLogger(String name)
DataContentViewer createInstance()
static boolean isEnabled()