DefaultAction Class
- public abstract class DefaultAction
extends Object
implements IAction
This class provides a default implementation of the IAction
interface.
Implementors may extend this class to implement actions. It provides
default implementations of most of the action methods.
-
Hierarchy
-
Object
DefaultAction
-
All Implemented Interfaces
-
ActionListener
, EventListener
, IAction
, PropertyChangeListener
-
Direct Known Subclasses
-
AbstractFileGenAction
, ColorChooserPropertyEditor.ColorChooserDialogAction
, DefaultDataPaletteDriver.ControlMenuAction
, DefaultPaletteAction
, DefaultTextAction
, DefaultToggleAction
, MultiLineTextPropertyEditor.TextEditorDialogAction
, SCMAction
, StopAntAction
-
DefaultAction()
- Constructor that obtains the proxy object for this action and stores it internally.
|
-
DefaultAction(
String name, Icon icon)
- Constructor that sets the name of the action and an icon in the proxy.
|
-
DefaultAction(
String name)
- Constructor that sets the name of the action in the proxy.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_proxy
protected IActionProxy
_proxy
- Proxy object that represents the action in the IDE.
DefaultAction
public DefaultAction()
- Constructor that obtains the proxy object for this action and stores it internally. Use the getProxy()
method to retrieve the proxy. If the proxy is not found via ActionSvc.I.getAction(), a proxy is created.
DefaultAction
public DefaultAction(String
name,
Icon
icon)
- Constructor that sets the name of the action and an icon in the proxy.
This constructor first obtains the proxy object for this action and stores it internally. Use the
getProxy() method to retrieve the proxy. If the proxy is not found via the
ActionSvc.I.getAction
method, a proxy is created.
DefaultAction
public DefaultAction(String
name)
- Constructor that sets the name of the action in the proxy.
This constructor first obtains the proxy object for this action and stores it internally. Use the
getProxy() method to retrieve the proxy. If the proxy is not found via ActionSvc.I.getAction(),
a proxy is created.
getProxy() Method
public IActionProxy
getProxy()
Gets the proxy object for this action. The proxy object contains all of the UI information for
the action. The proxy object may be null
if this action is not registered with
the action service (via an extension.xml) when the proxy has been created through
the ActionSvc.I.createProxy
method.
propertyChange(PropertyChangeEvent) Method
public void propertyChange(PropertyChangeEvent
e)
Updates the state of this action using the given property change event. The action service
automatically propagates the following change events to all actions: Application.PROP_ActiveWorkspace
,
Application.PROP_ActiveProject
, and Application.PROP_ActiveDocumentView
.
This implementation performs no work. Subclasses should
override this method if the enabled state of the action can change
as the various application properties change.
Parameters
-
e
- Property change event to respond to. This may be
null
if a refresh is forced. Actions may choose to simply
ignore this case. They are guaranteed to receive notification for each of the events listed above. If their state
depends solely on those, null
may be ignored (as long as the initial state is properly set).