19package org.sleuthkit.autopsy.corecomponents;
21import java.util.ArrayList;
22import java.util.Collection;
23import java.util.Collections;
25import java.util.logging.Level;
26import javax.swing.JComponent;
27import org.openide.explorer.ExplorerManager;
28import org.openide.explorer.ExplorerUtils;
29import org.openide.nodes.Node;
30import org.openide.util.NbBundle;
31import org.openide.windows.Mode;
32import org.openide.windows.RetainLocation;
33import org.openide.windows.TopComponent;
34import org.openide.windows.WindowManager;
35import org.sleuthkit.autopsy.actions.AddBookmarkTagAction;
36import org.sleuthkit.autopsy.casemodule.Case;
37import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
38import org.sleuthkit.autopsy.corecomponentinterfaces.DataResult;
39import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
40import org.sleuthkit.autopsy.coreutils.Logger;
41import org.sleuthkit.autopsy.directorytree.ExternalViewerShortcutAction;
71@RetainLocation(
"editor")
72@SuppressWarnings(
"PMD.SingularField")
76 private static final List<String>
activeComponentIds = Collections.synchronizedList(
new ArrayList<String>());
102 initInstance(description, node, childNodeCount, resultViewTopComponent);
103 return resultViewTopComponent;
127 initInstance(description, node, childNodeCount, resultViewTopComponent);
128 return resultViewTopComponent;
149 return resultViewTopComponent;
164 resultViewTopComponent.
open();
165 resultViewTopComponent.
setNode(node);
166 resultViewTopComponent.
setPath(description);
167 resultViewTopComponent.requestActive();
192 initInstance(description, node, childNodeCount, newDataResult);
193 return newDataResult;
238 this.explorerManager =
new ExplorerManager();
239 associateLookup(ExplorerUtils.createLookup(
explorerManager, getActionMap()));
240 this.customModeName = mode;
254 putClientProperty(TopComponent.PROP_CLOSING_DISABLED,
isMain);
255 putClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED,
true);
256 putClientProperty(TopComponent.PROP_DRAGGING_DISABLED,
true);
278 return TopComponent.PERSISTENCE_NEVER;
280 return TopComponent.PERSISTENCE_ALWAYS;
292 logger.log(Level.WARNING,
"Could not find mode: {0}, will dock into the default one",
customModeName);
305 super.componentOpened();
306 this.dataResultPanel.
open();
311 super.componentActivated();
322 if (nodeList.length == 1) {
323 selectedNode = nodeList[0];
336 if (selectedNode != dataContentTopComponent.getNode()) {
337 dataContentTopComponent.
setNode(selectedNode);
343 super.componentClosed();
386 return (!this.isMain) || openCase.
hasData() ==
false;
416 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
417 this.setLayout(layout);
418 layout.setHorizontalGroup(
419 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
420 .addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 967, Short.MAX_VALUE)
422 layout.setVerticalGroup(
423 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
424 .addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
static final KeyStroke BOOKMARK_SHORTCUT
static Case getCurrentCaseThrows()
void setNode(Node selectedNode)
static synchronized DataContentTopComponent findInstance()
void setNumberOfChildNodes(Integer numberOfChildNodes)
void setSelectedNodes(Node[] selected)
static DataResultTopComponent createInstance(String title)
void componentActivated()
void setTitle(String title)
ExplorerManager getExplorerManager()
static final List< String > activeComponentIds
DataResultTopComponent(boolean isMain, String title)
void setNode(Node selectedNode)
List< DataResultViewer > getViewers()
static DataResultTopComponent createInstance(String title, String mode, String description, Node node, int childNodeCount, DataContentTopComponent contentViewTopComponent)
static void initInstance(String description, Node node, int childNodeCount, DataResultTopComponent resultViewTopComponent)
void setPath(String pathText)
void setNumberOfChildNodes(int childNodeCount)
final ExplorerManager explorerManager
static final Logger logger
static DataResultTopComponent createInstance(String title, String description, Node node, int childNodeCount)
DataResultTopComponent(String title)
final DataResultPanel dataResultPanel
static List< String > getActiveComponentIds()
void resetTabs(Node node)
final String customModeName
DataResultTopComponent(boolean isMain, String title, String mode, Collection< DataResultViewer > viewers, DataContentTopComponent contentViewTopComponent)
static DataResultTopComponent createInstance(String title, String description, Node node, int childNodeCount, Collection< DataResultViewer > viewers)
void customizeComponent(String title)
synchronized static Logger getLogger(String name)
static final KeyStroke EXTERNAL_VIEWER_SHORTCUT
static synchronized ExternalViewerShortcutAction getInstance()