org.netbeans.modules.openide.util
Class ActionsBridge.ActionRunnable

java.lang.Object
  extended by org.netbeans.modules.openide.util.ActionsBridge.ActionRunnable
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, javax.swing.Action
Enclosing class:
ActionsBridge

public abstract static class ActionsBridge.ActionRunnable
extends java.lang.Object
implements javax.swing.Action

Special class that can be passed to invokeAction and delegates to correct values


Field Summary
(package private)  SystemAction action
           
(package private)  boolean async
           
(package private)  java.awt.event.ActionEvent ev
           
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionsBridge.ActionRunnable(java.awt.event.ActionEvent ev, SystemAction action, boolean async)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void doRun()
           
 java.lang.Object getValue(java.lang.String key)
           
 boolean isEnabled()
           
 boolean needsToBeSynchronous()
           
 void putValue(java.lang.String key, java.lang.Object value)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
protected abstract  void run()
           
 void setEnabled(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ev

final java.awt.event.ActionEvent ev

action

final SystemAction action

async

final boolean async
Constructor Detail

ActionsBridge.ActionRunnable

public ActionsBridge.ActionRunnable(java.awt.event.ActionEvent ev,
                                    SystemAction action,
                                    boolean async)
Method Detail

needsToBeSynchronous

public final boolean needsToBeSynchronous()

doRun

public final void doRun()

run

protected abstract void run()

actionPerformed

public final void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

addPropertyChangeListener

public final void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface javax.swing.Action

getValue

public final java.lang.Object getValue(java.lang.String key)
Specified by:
getValue in interface javax.swing.Action

isEnabled

public final boolean isEnabled()
Specified by:
isEnabled in interface javax.swing.Action

putValue

public final void putValue(java.lang.String key,
                           java.lang.Object value)
Specified by:
putValue in interface javax.swing.Action

removePropertyChangeListener

public final void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface javax.swing.Action

setEnabled

public final void setEnabled(boolean b)
Specified by:
setEnabled in interface javax.swing.Action