Autopsy  4.14.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PerformancePanelAction.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2017 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.diagnostics;
20 
21 import javax.swing.JDialog;
22 import org.openide.awt.ActionID;
23 import org.openide.awt.ActionReference;
24 import org.openide.awt.ActionRegistration;
25 import org.openide.util.HelpCtx;
26 import org.openide.util.NbBundle;
27 import org.openide.util.actions.CallableSystemAction;
28 import org.openide.windows.WindowManager;
30 
31 @ActionID(category = "Help", id = "org.sleuthkit.autopsy.diagnostics.PerformancePanelAction")
32 @ActionRegistration(displayName = "#CTL_PerformancePanelAction", lazy = true)
33 @ActionReference(path = "Menu/Help", position = 1437)
34 public final class PerformancePanelAction extends CallableSystemAction {
35 
36  private static final long serialVersionUID = 1L;
37 
38  @Override
39  public void performAction() {
40  JDialog dialog = new PerformancePanel();
41  dialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
42  dialog.setVisible(true);
43  }
44 
45  @Override
46  public boolean isEnabled() {
47  return Case.isCaseOpen();
48  }
49 
50  @Override
51  public HelpCtx getHelpCtx() {
52  return HelpCtx.DEFAULT_HELP;
53  }
54 
55  @Override
56  public boolean asynchronous() {
57  return false;
58  }
59 
60  @Override
61  public String getName() {
62  return NbBundle.getMessage(PerformancePanelAction.class, "CTL_PerformancePanelAction");
63  }
64 }

Copyright © 2012-2020 Basis Technology. Generated on: Wed Apr 8 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.