19 package org.sleuthkit.autopsy.contentviewers.analysisresults;
21 import java.awt.Component;
22 import java.util.Objects;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import javax.swing.SwingWorker;
26 import org.openide.nodes.Node;
27 import org.openide.util.NbBundle;
28 import org.openide.util.lookup.ServiceProvider;
43 @ServiceProvider(service = DataContentViewer.class, position = 7)
53 private SwingWorker<?, ?> worker = null;
56 "AnalysisResultsContentViewer_title=Analysis Results"
60 return Bundle.AnalysisResultsContentViewer_title();
64 "AnalysisResultsContentViewer_tooltip=Viewer for Analysis Results related to the selected node."
68 return Bundle.AnalysisResultsContentViewer_tooltip();
88 "AnalysisResultsContentViewer_setNode_loadingMessage=Loading...",
89 "AnalysisResultsContentViewer_setNode_errorMessage=There was an error loading results.",})
90 public synchronized void setNode(Node node) {
106 panel.showMessage(Bundle.AnalysisResultsContentViewer_setNode_loadingMessage());
111 (selectedNode) -> viewModel.getAnalysisResults(selectedNode),
112 (nodeAnalysisResults) -> {
115 panel.displayResults(nodeAnalysisResults.getData());
118 panel.showMessage(Bundle.AnalysisResultsContentViewer_setNode_errorMessage());
129 if (Objects.isNull(node)) {
134 if (Objects.nonNull(analysisResultItem)) {
139 if (!Objects.isNull(contentItem)) {
146 logger.log(Level.SEVERE, String.format(
"Error getting analysis results for Content (object ID = %d)", content.getId()), ex);
155 return PREFERRED_VALUE;
int isPreferred(Node node)
boolean isSupported(Node node)
synchronized void setNode(Node node)
DataContentViewer createInstance()
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()