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;
54 public String toString() {
55 return NbBundle.getMessage(this.getClass(),
"LayoutFileNode.propertyType.parts");
69 if (lf.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED)) {
70 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/carved-file-icon-16.png");
72 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/file-icon-deleted.png");
78 Sheet s = super.createSheet();
79 Sheet.Set ss = s.get(Sheet.PROPERTIES);
81 ss = Sheet.createPropertiesSet();
85 Map<String, Object> map =
new LinkedHashMap<>();
88 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.createSheet.name.name"),
89 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.createSheet.name.displayName"),
90 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.createSheet.name.desc"),
93 final String NO_DESCR = NbBundle.getMessage(this.getClass(),
"LayoutFileNode.createSheet.noDescr.text");
94 for (Map.Entry<String, Object> entry : map.entrySet()) {
95 ss.put(
new NodeProperty<>(entry.getKey(), entry.getKey(), NO_DESCR, entry.getValue()));
102 public <T> T accept(ContentNodeVisitor<T> v) {
103 return v.visit(
this);
113 return v.
visit(
this);
118 List<Action> actionsList =
new ArrayList<>();
119 for (Action a : super.getActions(
true)) {
123 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.viewInNewWin.text"),
this));
125 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.openInExtViewer.text"),
this));
126 actionsList.add(null);
128 actionsList.add(null);
131 return actionsList.toArray(
new Action[0]);
LayoutFileNode(LayoutFile lf)
static void fillPropertyMap(Map< String, Object > map, AbstractFile content)
T visit(DataSourcesNode in)
static String nameForLayoutFile(LayoutFile lf)
static void fillPropertyMap(Map< String, Object > map, LayoutFile content)
Action[] getActions(boolean context)
static synchronized AddContentTagAction getInstance()