Go to the documentation of this file.
19package org.sleuthkit.autopsy.datamodel;
21import java.util.ArrayList;
22import java.util.Arrays;
23import java.util.Collection;
24import java.util.HashSet;
26import javax.swing.Action;
27import org.openide.util.NbBundle;
28import org.openide.util.Utilities;
29import org.sleuthkit.autopsy.actions.AddContentTagAction;
30import org.sleuthkit.autopsy.actions.DeleteFileContentTagAction;
31import org.sleuthkit.autopsy.coreutils.ContextMenuExtensionPoint;
32import org.sleuthkit.autopsy.directorytree.ExportCSVAction;
33import org.sleuthkit.autopsy.directorytree.ExtractAction;
34import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
35import org.sleuthkit.autopsy.directorytree.ViewContextAction;
36import org.sleuthkit.datamodel.AbstractFile;
37import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
38import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
65 if (file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
66 if (file.getType().equals(TSK_DB_FILES_TYPE_ENUM.CARVED)) {
67 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/carved-file-x-icon-16.png");
69 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/file-icon-deleted.png");
72 this.setIconBaseWithExtension(getIconForFileType(file));
78 List<Action> actionsList =
new ArrayList<>();
80 actionsList.add(
new ViewContextAction(NbBundle.getMessage(
this.getClass(),
"SlackFileNode.getActions.viewFileInDir.text"),
this.content));
81 actionsList.add(
null);
84 NbBundle.getMessage(
this.getClass(),
"SlackFileNode.getActions.viewInNewWin.text"),
this));
85 actionsList.add(
null);
88 actionsList.add(
null);
91 final Collection<AbstractFile> selectedFilesList =
92 new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
93 if(selectedFilesList.size() == 1) {
98 actionsList.add(
null);
99 actionsList.addAll(Arrays.asList(super.getActions(
true)));
100 return actionsList.toArray(
new Action[actionsList.size()]);
105 return visitor.
visit(
this);
109 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
110 return visitor.visit(
this);
115 static String getIconForFileType(AbstractFile file) {
117 return "org/sleuthkit/autopsy/images/file-icon.png";
130 return getClass().getName();
static synchronized AddContentTagAction getInstance()
static synchronized DeleteFileContentTagAction getInstance()
boolean directoryBrowseMode
boolean getDirectoryBrowseMode()
SlackFileNode(AbstractFile file, boolean directoryBrowseMode)
void setIcon(AbstractFile file)
SlackFileNode(AbstractFile file)
Action[] getActions(boolean popup)
static synchronized ExportCSVAction getInstance()
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.