19 package org.sleuthkit.autopsy.contentviewers;
21 import java.awt.Component;
22 import java.util.concurrent.ExecutionException;
23 import java.util.logging.Level;
24 import javax.swing.SwingWorker;
26 import static org.openide.util.NbBundle.Messages;
27 import org.openide.nodes.Node;
28 import org.openide.util.lookup.ServiceProvider;
35 import org.jsoup.nodes.Document;
41 @SuppressWarnings(
"PMD.SingularField")
42 @ServiceProvider(service = DataContentViewer.class, position = 9)
44 "AnnotationsContentViewer.title=Annotations",
45 "AnnotationsContentViewer.toolTip=Displays tags and comments associated with the selected content.",
46 "AnnotationsContentViewer.onEmpty=No annotations were found for this particular item."
50 private static final long serialVersionUID = 1L;
86 @SuppressWarnings(
"unchecked")
88 private
void initComponents() {
90 javax.swing.JScrollPane scrollPane =
new javax.swing.JScrollPane();
91 textPanel =
new javax.swing.JTextPane();
93 setPreferredSize(
new java.awt.Dimension(100, 58));
95 textPanel.setEditable(
false);
96 textPanel.setName(
"");
97 textPanel.setPreferredSize(
new java.awt.Dimension(600, 52));
98 scrollPane.setViewportView(textPanel);
100 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
101 this.setLayout(layout);
102 layout.setHorizontalGroup(
103 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
104 .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 907, Short.MAX_VALUE)
106 layout.setVerticalGroup(
107 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
108 .addComponent(scrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
118 return Bundle.AnnotationsContentViewer_title();
123 return Bundle.AnnotationsContentViewer_toolTip();
133 return node != null && node.getLookup().lookup(AbstractFile.class) != null;
148 textPanel.setText(
"");
186 textPanel.setText(text);
187 textPanel.setCaretPosition(0);
188 }
catch (InterruptedException | ExecutionException ex) {
189 logger.log(Level.SEVERE,
"Failed to get annotation information for node", ex);
static Document buildDocument(Node node)
static void setStyles(JTextPane textPane)
javax.swing.JTextPane textPanel
DataContentViewer createInstance()
AnnotationsContentViewer()
boolean isSupported(Node node)
static void setupHtmlJTextPane(JTextPane textPane)
static String getMessageClassName()
synchronized static Logger getLogger(String name)
int isPreferred(Node node)