19 package org.sleuthkit.autopsy.corecomponentinterfaces;
21 import java.util.Collection;
22 import java.util.logging.Level;
23 import org.openide.util.Lookup;
24 import org.openide.util.NbBundle;
25 import org.openide.windows.Mode;
26 import org.openide.windows.TopComponent;
27 import org.openide.windows.WindowManager;
40 @NbBundle.Messages(
"CoreComponentControl.CTL_DirectoryTreeTopComponent=Directory Tree")
41 private static final String
DIRECTORY_TREE = Bundle.CoreComponentControl_CTL_DirectoryTreeTopComponent();
42 @NbBundle.Messages(
"CoreComponentControl.CTL_FavoritesTopComponent=Favorites")
43 private static final String
FAVORITES = Bundle.CoreComponentControl_CTL_FavoritesTopComponent();
60 Mode explorerMode = WindowManager.getDefault().findMode(
"explorer");
61 if (explorerMode == null) {
62 logger.log(Level.WARNING,
"Could not find explorer mode and dock explorer window");
64 explorerMode.dockInto(explorerWin);
71 Mode outputMode = WindowManager.
getDefault().findMode(
"output");
72 if (outputMode == null) {
73 logger.log(Level.WARNING,
"Could not find output mode and dock content window");
75 outputMode.dockInto(contentWin);
90 TopComponent directoryTree = null;
91 TopComponent favorites = null;
92 final WindowManager windowManager = WindowManager.getDefault();
96 for (Mode mode : windowManager.getModes()) {
97 for (TopComponent tc : windowManager.getOpenedTopComponents(mode)) {
99 ((DataContent) tc).setNode(null);
101 ((DataResult) tc).setNode(null);
106 for (Mode mode : windowManager.getModes()) {
108 for (TopComponent tc : windowManager.getOpenedTopComponents(mode)) {
109 String tcName = tc.getName();
111 if (tcName == null) {
112 logger.log(Level.INFO,
"tcName was null");
115 if (DIRECTORY_TREE.equals(tcName)) {
117 }
else if (FAVORITES.equals(tcName)) {
125 if (directoryTree != null) {
126 directoryTree.close();
128 if (favorites != null) {
static final String DIRECTORY_TREE
TopComponent getTopComponent()
static synchronized DataContentTopComponent getDefault()
static void openCoreWindows()
static synchronized DataContentTopComponent findInstance()
static void closeCoreWindows()
static synchronized DirectoryTreeTopComponent getDefault()
static final Logger logger
synchronized static Logger getLogger(String name)
static final String FAVORITES
static synchronized DirectoryTreeTopComponent findInstance()