19 package org.sleuthkit.autopsy.corecomponents;
21 import java.beans.PropertyChangeEvent;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.logging.Level;
26 import javax.swing.JTabbedPane;
27 import org.openide.nodes.Node;
28 import org.openide.util.NbBundle;
29 import org.openide.windows.TopComponent;
30 import org.openide.windows.WindowManager;
54 private static ArrayList<DataContentTopComponent>
newWindowList =
new ArrayList<DataContentTopComponent>();
55 private static final String
PREFERRED_ID =
"DataContentTopComponent";
62 setToolTipText(TOOLTIP_TEXT);
67 add(dataContentPanel);
69 putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isDefault));
70 logger.log(Level.INFO,
"Created DataContentTopComponent instance: " +
this);
86 newWindowList.add(dctc);
99 setLayout(
new javax.swing.BoxLayout(
this, javax.swing.BoxLayout.Y_AXIS));
110 if (defaultInstance == null) {
120 TopComponent win = WindowManager.
getDefault().findTopComponent(PREFERRED_ID);
122 logger.warning(
"Cannot find " + PREFERRED_ID +
" component. It will not be located properly in the window system.");
126 return (DataContentTopComponent) win;
129 "There seem to be multiple components with the '" + PREFERRED_ID
130 +
"' ID. That is a potential source of errors and unexpected behavior.");
136 return TopComponent.PERSISTENCE_NEVER;
146 dataContentPanel.
setNode(null);
148 if (!this.isDefault) {
149 newWindowList.remove(
this);
155 if (this.isDefault) {
158 return this.getName();
164 dataContentPanel.
setNode(selectedNode);
static synchronized DataContentTopComponent getDefault()
void setNode(Node selectedNode)
static boolean existsCurrentCase()
JTabbedPane getTabPanels()
void setNode(Node selectedNode)
static final String DEFAULT_NAME
final DataContentPanel dataContentPanel
static DataContentTopComponent createUndocked(String filePath, Node givenNode)
DataContentTopComponent(boolean isDefault, String name)
static synchronized DataContentTopComponent findInstance()
JTabbedPane getTabPanels()
static final String PREFERRED_ID
static final String TOOLTIP_TEXT
static DataContentTopComponent defaultInstance
static List< DataContentTopComponent > getNewWindowList()
static Case getCurrentCase()
static ArrayList< DataContentTopComponent > newWindowList
void propertyChange(PropertyChangeEvent evt)
static Logger getLogger(String name)