19 package org.sleuthkit.autopsy.communications;
21 import java.awt.Component;
22 import javax.swing.ImageIcon;
23 import javax.swing.JButton;
24 import org.openide.awt.ActionID;
25 import org.openide.awt.ActionReference;
26 import org.openide.awt.ActionReferences;
27 import org.openide.awt.ActionRegistration;
28 import org.openide.util.HelpCtx;
29 import org.openide.util.NbBundle;
30 import org.openide.util.NbBundle.Messages;
31 import org.openide.util.actions.CallableSystemAction;
32 import org.openide.util.actions.Presenter;
33 import org.openide.windows.TopComponent;
34 import org.openide.windows.WindowManager;
40 @ActionID(category =
"Tools",
41 id =
"org.sleuthkit.autopsy.communicationsVisualization.OpenCVTAction")
42 @ActionRegistration(displayName =
"#CTL_OpenCVTAction", lazy =
false)
43 @ActionReferences(value = {
44 @ActionReference(path =
"Menu/Tools", position = 102)})
45 @Messages(
"CTL_OpenCVTAction=Communications")
48 private static final long serialVersionUID = 1L;
50 private final JButton toolbarButton =
new JButton(getName(),
51 new ImageIcon(getClass().getResource(
"images/emblem-web24.png")));
54 toolbarButton.addActionListener(actionEvent -> performAction());
60 final TopComponent tc = WindowManager.getDefault().findTopComponent(
"CVTTopComponent");
62 if (tc.isOpened() ==
false) {
77 super.setEnabled(value);
78 toolbarButton.setEnabled(value);
82 @NbBundle.Messages(
"OpenCVTAction.displayName=Communications")
84 return Bundle.OpenCVTAction_displayName();
99 return HelpCtx.DEFAULT_HELP;