19 package org.sleuthkit.autopsy.filesearch;
21 import java.awt.event.ActionEvent;
22 import java.beans.PropertyChangeEvent;
23 import java.beans.PropertyChangeListener;
24 import org.openide.util.HelpCtx;
25 import org.openide.util.NbBundle;
26 import org.openide.util.actions.CallableSystemAction;
30 final class FileSearchAction
extends CallableSystemAction implements FileSearchProvider{
32 private static FileSearchAction instance = null;
36 setEnabled(Case.isCaseOpen());
38 Case.addPropertyChangeListener(
new PropertyChangeListener() {
41 public void propertyChange(PropertyChangeEvent evt) {
42 if(evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())){
43 setEnabled(evt.getNewValue() != null);
50 public static FileSearchAction getDefault() {
52 instance =
new FileSearchAction();
59 public void actionPerformed(ActionEvent e) {
60 new FileSearchDialog().setVisible(
true);
64 public void performAction() {
65 new FileSearchDialog().setVisible(
true);
69 public String getName() {
70 return NbBundle.getMessage(this.getClass(),
"FileSearchAction.getName.text");
74 public HelpCtx getHelpCtx() {
75 return HelpCtx.DEFAULT_HELP;
79 protected boolean asynchronous() {
84 public void showDialog() {