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;
25 import javax.swing.JTabbedPane;
26 import org.openide.nodes.Node;
27 import org.openide.util.NbBundle;
28 import org.openide.windows.TopComponent;
29 import org.openide.windows.WindowManager;
56 private static final ArrayList<DataContentTopComponent>
newWindowList =
new ArrayList<>();
57 private static final String
PREFERRED_ID =
"DataContentTopComponent";
64 setToolTipText(TOOLTIP_TEXT);
69 add(dataContentPanel);
71 putClientProperty(TopComponent.PROP_CLOSING_DISABLED, isDefault);
72 logger.log(Level.INFO,
"Created DataContentTopComponent instance: {0}",
this);
90 newWindowList.add(dctc);
104 if (defaultInstance == null) {
117 TopComponent win = WindowManager.
getDefault().findTopComponent(PREFERRED_ID);
119 logger.warning(
"Cannot find " + PREFERRED_ID +
" component. It will not be located properly in the window system.");
123 return (DataContentTopComponent) win;
126 "There seem to be multiple components with the '" + PREFERRED_ID
127 +
"' ID. That is a potential source of errors and unexpected behavior.");
133 return TopComponent.PERSISTENCE_NEVER;
143 dataContentPanel.
setNode(null);
145 if (!this.isDefault) {
146 newWindowList.remove(
this);
152 if (this.isDefault) {
155 return this.getName();
161 dataContentPanel.
setNode(selectedNode);
204 setLayout(
new javax.swing.BoxLayout(
this, javax.swing.BoxLayout.Y_AXIS));
static synchronized DataContentTopComponent getDefault()
static final long serialVersionUID
void setNode(Node selectedNode)
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()
synchronized static Logger getLogger(String name)
static final Logger logger
void propertyChange(PropertyChangeEvent evt)
static final ArrayList< DataContentTopComponent > newWindowList
static boolean isCaseOpen()