19 package org.sleuthkit.autopsy.corecomponents;
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
25 import java.util.logging.Level;
26 import org.openide.explorer.ExplorerManager;
27 import org.openide.explorer.ExplorerUtils;
28 import org.openide.util.NbBundle;
29 import org.openide.windows.TopComponent;
30 import org.openide.nodes.Node;
31 import org.openide.windows.Mode;
32 import org.openide.windows.WindowManager;
63 private static final List<String>
activeComponentIds = Collections.synchronizedList(
new ArrayList<String>());
73 associateLookup(ExplorerUtils.createLookup(explorerManager, getActionMap()));
89 associateLookup(ExplorerUtils.createLookup(explorerManager, getActionMap()));
90 this.customModeName = mode;
98 this.customModeName = null;
105 putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isMain));
106 putClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED,
true);
107 putClientProperty(TopComponent.PROP_DRAGGING_DISABLED,
true);
109 activeComponentIds.add(title);
120 newDataResult.setNumMatches(totalMatches);
122 newDataResult.
open();
125 newDataResult.
setNode(givenNode);
126 newDataResult.
setPath(pathText);
128 newDataResult.requestActive();
143 initInstance(pathText, givenNode, totalMatches, newDataResult);
145 return newDataResult;
163 initInstance(pathText, givenNode, totalMatches, newDataResult);
164 return newDataResult;
177 return newDataResult;
203 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
204 this.setLayout(layout);
205 layout.setHorizontalGroup(
206 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
207 .addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 967, Short.MAX_VALUE)
209 layout.setVerticalGroup(
210 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
211 .addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
219 if (customModeName == null) {
220 return TopComponent.PERSISTENCE_NEVER;
222 return TopComponent.PERSISTENCE_ALWAYS;
238 if (customModeName != null) {
240 Mode mode = WindowManager.getDefault().findMode(customModeName);
242 StringBuilder message =
new StringBuilder(
"Found custom mode, setting: ");
243 message.append(customModeName);
244 logger.log(Level.INFO, message.toString());
248 StringBuilder message =
new StringBuilder(
"Could not find mode: ");
249 message.append(customModeName);
250 message.append(
", will dock into the default one");
251 logger.log(Level.WARNING, message.toString());
258 super.componentOpened();
259 this.dataResultPanel.
open();
264 super.componentClosed();
265 activeComponentIds.remove(this.getName());
266 dataResultPanel.close();
281 dataResultPanel.
setNode(selectedNode);
291 dataResultPanel.
setPath(pathText);
323 void setNumMatches(
int matches) {
void customizeComponent(boolean isMain, String title)
ExplorerManager explorerManager
List< DataResultViewer > getViewers()
static boolean existsCurrentCase()
static DataResultTopComponent createInstance(String title, String pathText, Node givenNode, int totalMatches)
void setSelectedNodes(Node[] selected)
static final Logger logger
void setTitle(String title)
void setNode(Node selectedNode)
static List< String > getActiveComponentIds()
List< DataResultViewer > getViewers()
void resetTabs(Node selectedNode)
DataResultTopComponent(boolean isMain, String title)
DataResultPanel dataResultPanel
static DataResultTopComponent createInstance(String title, final String mode, String pathText, Node givenNode, int totalMatches, DataContentTopComponent dataContentWindow)
void resetTabs(Node selectedNode)
void setNumMatches(Integer numMatches)
void setPath(String pathText)
static Case getCurrentCase()
static final List< String > activeComponentIds
ExplorerManager getExplorerManager()
void setSelectedNodes(Node[] selected)
void setPath(String pathText)
static Logger getLogger(String name)
static DataResultTopComponent createInstance(String title)
static void initInstance(String pathText, Node givenNode, int totalMatches, DataResultTopComponent newDataResult)
void setNode(Node selectedNode)