19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import java.util.HashSet;
25 import java.util.List;
27 import javax.swing.Action;
28 import org.openide.util.NbBundle;
29 import org.openide.util.Utilities;
50 public String toString() {
51 return NbBundle.getMessage(this.getClass(),
"LayoutFileNode.propertyType.parts");
65 if (lf.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.CARVED)) {
66 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/carved-file-icon-16.png");
68 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/file-icon-deleted.png");
72 public <T> T accept(ContentNodeVisitor<T> visitor) {
73 return visitor.visit(
this);
83 return visitor.
visit(
this);
88 List<Action> actionsList =
new ArrayList<>();
89 actionsList.addAll(Arrays.asList(super.getActions(
true)));
91 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.viewInNewWin.text"),
this));
93 NbBundle.getMessage(
this.getClass(),
"LayoutFileNode.getActions.openInExtViewer.text"),
this));
94 actionsList.add(null);
96 actionsList.add(null);
99 final Collection<AbstractFile> selectedFilesList
100 =
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
101 if (selectedFilesList.size() == 1) {
106 return actionsList.toArray(
new Action[actionsList.size()]);
111 return getClass().getName();
LayoutFileNode(LayoutFile lf)
T visit(DataSourcesNode in)
static synchronized DeleteFileContentTagAction getInstance()
static String nameForLayoutFile(LayoutFile lf)
Action[] getActions(boolean context)
static synchronized AddContentTagAction getInstance()