View Javadoc

1   package org.xmlhammer.gui.output.actions;
2   
3   import javax.swing.JDialog;
4   
5   import org.bounce.RunnableAction;
6   
7   public class PropertiesAction extends RunnableAction {
8       private static final long serialVersionUID = -6546100768134624390L;
9   
10      private JDialog dialog = null;
11  
12      public PropertiesAction() {
13          super("Properties");
14  
15          putValue(SHORT_DESCRIPTION, "Properties");
16      }
17      
18      public void setDialog(JDialog dialog) {
19          setEnabled(dialog != null);
20          this.dialog = dialog;
21      }
22      
23      @Override
24      public void run() {
25          if ( dialog != null) {
26              dialog.setVisible(true);
27          }
28      }
29  }