19 package org.sleuthkit.autopsy.datamodel;
 
   21 import java.beans.PropertyChangeEvent;
 
   22 import java.beans.PropertyChangeListener;
 
   23 import java.util.ArrayList;
 
   24 import java.util.List;
 
   25 import javax.swing.Action;
 
   26 import org.openide.nodes.Children;
 
   27 import org.openide.nodes.Sheet;
 
   28 import org.openide.util.NbBundle;
 
   53     static String nameForVolume(Volume vol) {
 
   54         return "vol" + Long.toString(vol.getAddr()); 
 
   65         String volName = nameForVolume(vol);
 
   67         long end = vol.getStart() + (vol.getLength() - 1);
 
   68         String tempVolName = volName + 
" (" + vol.getDescription() + 
": " + vol.getStart() + 
"-" + end + 
")";
 
   69         this.setDisplayName(tempVolName);
 
   71         this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/vol-icon.png"); 
 
   87     private final PropertyChangeListener 
pcl = (PropertyChangeEvent evt) -> {
 
   88         String eventType = evt.getPropertyName();
 
   96             if ((moduleContentEvent.getSource() instanceof Content) == 
false) {
 
   99             Content newContent = (Content) moduleContentEvent.getSource();
 
  102                 Content parent = newContent.getParent();
 
  103                 if (parent != null) {
 
  105                     if (parent.getName().equals(VirtualDirectory.NAME_CARVED)) {
 
  107                         if (parent.getParent().getId() == 
getContent().getId()) {
 
  108                             Children children = getChildren();
 
  109                             if (children != null) {
 
  110                                 ((ContentChildren) children).refreshChildren();
 
  111                                 children.getNodesCount();
 
  116             } 
catch (TskCoreException ex) {
 
  120             if (evt.getNewValue() == null) {
 
  136         List<Action> actionsList = 
new ArrayList<>();
 
  138         for (Action a : super.getActions(
true)) {
 
  143                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.getActions.viewInNewWin.text"), 
this));
 
  146         return actionsList.toArray(
new Action[0]);
 
  151         Sheet s = super.createSheet();
 
  152         Sheet.Set ss = s.get(Sheet.PROPERTIES);
 
  154             ss = Sheet.createPropertiesSet();
 
  158         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.name.name"),
 
  159                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.name.displayName"),
 
  160                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.name.desc"),
 
  161                 this.getDisplayName()));
 
  162         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.id.name"),
 
  163                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.id.displayName"),
 
  164                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.id.desc"),
 
  166         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.startSector.name"),
 
  167                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.startSector.displayName"),
 
  168                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.startSector.desc"),
 
  169                 content.getStart()));
 
  170         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.lenSectors.name"),
 
  171                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.lenSectors.displayName"),
 
  172                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.lenSectors.desc"),
 
  173                 content.getLength()));
 
  174         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.description.name"),
 
  175                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.description.displayName"),
 
  176                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.description.desc"),
 
  177                 content.getDescription()));
 
  178         ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.flags.name"),
 
  179                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.flags.displayName"),
 
  180                 NbBundle.getMessage(
this.getClass(), 
"VolumeNode.createSheet.flags.desc"),
 
  181                 content.getFlagsAsString()));
 
  187     public <T> T accept(ContentNodeVisitor<T> v) {
 
  188         return v.visit(
this);
 
  198         return v.
visit(
this);
 
void removeIngestModuleEventListener(final PropertyChangeListener listener)
static synchronized IngestManager getInstance()
Action[] getActions(boolean popup)
static void removePropertyChangeListener(PropertyChangeListener listener)
static List< Action > getActions(Content c)
T visit(DataSourcesNode in)
static void addPropertyChangeListener(PropertyChangeListener listener)
final PropertyChangeListener pcl
void addIngestModuleEventListener(final PropertyChangeListener listener)