19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.LinkedHashMap;
23 import java.util.List;
25 import javax.swing.Action;
26 import org.openide.nodes.Sheet;
27 import org.openide.util.NbBundle;
45 this.setDisplayName(af.
getName());
49 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
51 this.setIconBaseWithExtension(
FileNode.getIconForFileType(af));
58 Sheet s = super.createSheet();
59 Sheet.Set ss = s.get(Sheet.PROPERTIES);
61 ss = Sheet.createPropertiesSet();
65 Map<String, Object> map =
new LinkedHashMap<>();
68 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"LocalFileNode.createSheet.name.name"),
69 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.createSheet.name.displayName"),
70 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.createSheet.name.desc"),
73 final String NO_DESCR = NbBundle.getMessage(this.getClass(),
"LocalFileNode.createSheet.noDescr.text");
74 for (Map.Entry<String, Object> entry : map.entrySet()) {
75 ss.put(
new NodeProperty<>(entry.getKey(), entry.getKey(), NO_DESCR, entry.getValue()));
84 List<Action> actionsList =
new ArrayList<>();
85 actionsList.add(
new ViewContextAction(NbBundle.getMessage(
this.getClass(),
"LocalFileNode.viewFileInDir.text"), this.content));
86 actionsList.add(null);
88 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.viewInNewWin.text"),
this));
90 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.openInExtViewer.text"),
this));
91 actionsList.add(null);
94 NbBundle.getMessage(
this.getClass(),
"LocalFileNode.getActions.searchFilesSameMd5.text"),
this));
95 actionsList.add(null);
98 return actionsList.toArray(
new Action[0]);
102 public <T> T accept(ContentNodeVisitor<T> v) {
103 return v.visit(
this);
107 public <T> T accept(DisplayableItemNodeVisitor<T> v) {
108 return v.visit(
this);
LocalFileNode(AbstractFile af)
static void fillPropertyMap(Map< String, Object > map, AbstractFile content)
Action[] getActions(boolean context)
static synchronized AddContentTagAction getInstance()