Go to the documentation of this file.
19package org.sleuthkit.autopsy.datamodel;
21import java.util.ArrayList;
22import java.util.Arrays;
25import javax.swing.Action;
26import org.openide.nodes.AbstractNode;
27import org.openide.nodes.Children;
28import org.openide.nodes.Sheet;
29import org.openide.util.Lookup;
30import org.openide.util.NbBundle;
31import org.openide.util.NbBundle.Messages;
32import org.openide.util.lookup.Lookups;
33import org.sleuthkit.autopsy.directorytree.ViewContextAction;
34import org.sleuthkit.autopsy.timeline.actions.ViewFileInTimelineAction;
35import org.sleuthkit.datamodel.AbstractFile;
47 super(children, Lookups.singleton(thing));
55 super(children, lookup);
64 AbstractFile af = Lookup.getDefault().lookup(AbstractFile.class);
68 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
70 this.setIconBaseWithExtension(
FileNode.getIconForFileType(af));
78 Sheet sheet = super.createSheet();
79 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
80 if (sheetSet ==
null) {
81 sheetSet = Sheet.createPropertiesSet();
87 sheetSet.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"KeyValueNode.createSheet.name.name"),
88 NbBundle.getMessage(
this.getClass(),
"KeyValueNode.createSheet.name.displayName"),
89 NbBundle.getMessage(
this.getClass(),
"KeyValueNode.createSheet.name.desc"),
92 for (Map.Entry<String, Object> entry :
data.getMap().entrySet()) {
93 String key = entry.getKey();
94 Object value = entry.getValue();
97 NbBundle.getMessage(
this.getClass(),
"KeyValueNode.createSheet.map.desc"),
113 "KeyValueNode.menuItemText.viewFileInDir=View Source File in Directory"
117 List<Action> actionsList =
new ArrayList<>();
119 AbstractFile file = getLookup().lookup(AbstractFile.class);
122 actionsList.add(
new ViewContextAction(Bundle.KeyValueNode_menuItemText_viewFileInDir(), file));
124 actionsList.add(
null);
125 actionsList.addAll(Arrays.asList(super.getActions(popup)));
127 return actionsList.toArray(
new Action[actionsList.size()]);
KeyValueNode(KeyValue thing, Children children, Lookup lookup)
Action[] getActions(boolean popup)
KeyValueNode(KeyValue thing, Children children)
static ViewFileInTimelineAction createViewSourceFileAction(AbstractFile file)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.