19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.List;
22 import java.util.logging.Level;
24 import javax.swing.Action;
25 import org.openide.nodes.Children;
26 import org.openide.nodes.Sheet;
27 import org.openide.util.NbBundle;
28 import org.openide.util.lookup.Lookups;
42 private static final String
ICON_PATH =
"org/sleuthkit/autopsy/images/green-tag-icon-16.png";
43 private final BlackboardArtifactTag
tag;
46 super(Children.LEAF, Lookups.fixed(tag, tag.getArtifact(), tag.getContent()));
47 super.setName(tag.getContent().getName());
48 super.setDisplayName(tag.getContent().getName());
49 this.setIconBaseWithExtension(ICON_PATH);
55 Sheet propertySheet = super.createSheet();
56 Sheet.Set properties = propertySheet.get(Sheet.PROPERTIES);
57 if (properties == null) {
58 properties = Sheet.createPropertiesSet();
59 propertySheet.put(properties);
63 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.srcFile.text"),
64 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.srcFile.text"),
66 tag.getContent().getName()));
69 contentPath = tag.getContent().getUniquePath();
70 }
catch (TskCoreException ex) {
71 Logger.
getLogger(ContentTagNode.class.getName()).log(Level.SEVERE,
"Failed to get path for content (id = " + tag.getContent().getId() +
")", ex);
72 contentPath = NbBundle.getMessage(this.getClass(),
"BlackboardArtifactTagNode.createSheet.unavail.text");
75 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.srcFilePath.text"),
76 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.srcFilePath.text"),
80 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.resultType.text"),
81 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.resultType.text"),
83 tag.getArtifact().getDisplayName()));
85 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.comment.text"),
86 NbBundle.getMessage(
this.getClass(),
"BlackboardArtifactTagNode.createSheet.comment.text"),
98 return actions.toArray(
new Action[0]);
103 return v.
visit(
this);
BlackboardArtifactTagNode(BlackboardArtifactTag tag)
static List< Action > getActions(File file, boolean isArtifactSource)
static synchronized DeleteBlackboardArtifactTagAction getInstance()
T visit(DataSourcesNode in)
final BlackboardArtifactTag tag
synchronized static Logger getLogger(String name)
static final String ICON_PATH
Action[] getActions(boolean context)