19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.List;
23 import javax.swing.Action;
24 import org.openide.nodes.Sheet;
25 import org.openide.util.NbBundle;
43 static String nameForVolume(
Volume vol) {
44 return "vol" + Long.toString(vol.
getAddr());
55 String volName = nameForVolume(vol);
59 this.setDisplayName(tempVolName);
61 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/vol-icon.png");
72 List<Action> actionsList =
new ArrayList<>();
75 NbBundle.getMessage(
this.getClass(),
"VolumeNode.getActions.viewInNewWin.text"),
this));
78 return actionsList.toArray(
new Action[0]);
83 Sheet s = super.createSheet();
84 Sheet.Set ss = s.get(Sheet.PROPERTIES);
86 ss = Sheet.createPropertiesSet();
90 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.name.name"),
91 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.name.displayName"),
92 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.name.desc"),
93 this.getDisplayName()));
94 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.id.name"),
95 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.id.displayName"),
96 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.id.desc"),
98 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.startSector.name"),
99 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.startSector.displayName"),
100 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.startSector.desc"),
101 content.getStart()));
102 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.lenSectors.name"),
103 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.lenSectors.displayName"),
104 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.lenSectors.desc"),
105 content.getLength()));
106 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.description.name"),
107 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.description.displayName"),
108 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.description.desc"),
109 content.getDescription()));
110 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.flags.name"),
111 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.flags.displayName"),
112 NbBundle.getMessage(
this.getClass(),
"VolumeNode.createSheet.flags.desc"),
113 content.getFlagsAsString()));
119 public <T> T accept(ContentNodeVisitor<T> v) {
120 return v.visit(
this);
130 return v.
visit(
this);
Action[] getActions(boolean popup)
static List< Action > getActions(Content c)
T visit(DataSourcesNode in)