19 package org.sleuthkit.autopsy.centralrepository.persona;
21 import javax.swing.JMenuItem;
22 import org.openide.awt.ActionID;
23 import org.openide.awt.ActionReference;
24 import org.openide.awt.ActionReferences;
25 import org.openide.awt.ActionRegistration;
26 import org.openide.util.HelpCtx;
27 import org.openide.util.NbBundle;
28 import org.openide.util.actions.CallableSystemAction;
29 import org.openide.windows.TopComponent;
30 import org.openide.windows.WindowManager;
38 @ActionID(category =
"Tools",
id =
"org.sleuthkit.autopsy.centralrepository.persona.OpenPersonasAction")
39 @ActionRegistration(displayName =
"#CTL_OpenPersonas", lazy =
false)
40 @ActionReferences(value = {
41 @ActionReference(path =
"Menu/Tools", position = 1825, separatorBefore = 1824)
45 private static final long serialVersionUID = 1L;
50 menuItem = super.getMenuPresenter();
56 public
void performAction() {
57 final TopComponent topComponent = WindowManager.getDefault().findTopComponent(
"PersonasTopComponent");
58 if (topComponent != null) {
59 if (topComponent.isOpened() ==
false) {
62 topComponent.toFront();
63 topComponent.requestActive();
68 @NbBundle.Messages(
"OpenPersonasAction.displayName=Personas")
70 return Bundle.OpenPersonasAction_displayName();
75 return HelpCtx.DEFAULT_HELP;
85 super.setEnabled(enable);
86 menuItem.setEnabled(enable);
JMenuItem getMenuPresenter()
void setEnabled(boolean enable)
static boolean isEnabled()