public abstract class AbstractHandler extends AbstractHandler implements IHandler
IHandler. This
abstract implementation provides support for handler listeners. You should
subclass from this method unless you want to implement your own listener
support. Subclasses should call
fireHandlerChanged(HandlerEvent)when the handler
changes. Subclasses should also override
getAttributeValuesByName()if they have any
attributes.AbstractHandler| Constructor and Description |
|---|
AbstractHandler()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlerListener(IHandlerListener handlerListener)
Deprecated.
Registers an instance of
IHandlerListener to listen for
changes to properties of this instance. |
void |
dispose()
Deprecated.
The default implementation does nothing.
|
Object |
execute(ExecutionEvent event)
Deprecated.
Executes with the map of parameter values by name.
|
protected void |
fireHandlerChanged(HandlerEvent handlerEvent)
Deprecated.
Fires an event to all registered listeners describing changes to this
instance.
|
protected void |
fireHandlerChanged(HandlerEvent handlerEvent)
Deprecated.
|
Map |
getAttributeValuesByName()
Deprecated.
This simply return an empty map.
|
protected boolean |
hasListeners()
Deprecated.
Returns true iff there is one or more IHandlerListeners attached to this
AbstractHandler.
|
boolean |
isEnabled()
Deprecated.
Whether this handler is capable of executing at this time.
|
boolean |
isHandled()
Deprecated.
Whether this handler is capable of handling delegated responsibilities at
this time.
|
void |
removeHandlerListener(IHandlerListener handlerListener)
Deprecated.
Unregisters an instance of
IPropertyListener listening for
changes to properties of this instance. |
addHandlerListener, removeHandlerListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic void addHandlerListener(IHandlerListener handlerListener)
IHandlerIHandlerListener to listen for
changes to properties of this instance.handlerListener - the instance to register. Must not be null. If
an attempt is made to register an instance which is already
registered with this instance, no operation is performed.IHandler.addHandlerListener(IHandlerListener)public void dispose()
dispose in interface IHandlerdispose in class AbstractHandlerIHandler.dispose()public Object execute(ExecutionEvent event) throws ExecutionException
IHandlerexecute in interface IHandlerevent - An event containing all the information about the current
state of the application; must not be null.null.ExecutionException - if an exception occurred during execution.protected void fireHandlerChanged(HandlerEvent handlerEvent)
fireHandlerChanged in class AbstractHandlerhandlerEvent - the event describing changes to this instance. Must not be
null.protected void fireHandlerChanged(HandlerEvent handlerEvent)
public Map getAttributeValuesByName()
null. If this map is not
empty, its collection of keys is guaranteed to only contain
instances of String.IHandler.getAttributeValuesByName()protected final boolean hasListeners()
hasListeners in class AbstractHandlerpublic boolean isEnabled()
AbstractHandlerisEnabled in interface IHandlerisEnabled in class AbstractHandlertruepublic boolean isHandled()
AbstractHandlerisHandled in interface IHandlerisHandled in class AbstractHandlertruepublic void removeHandlerListener(IHandlerListener handlerListener)
IHandlerIPropertyListener listening for
changes to properties of this instance.handlerListener - the instance to unregister. Must not be null.
If an attempt is made to unregister an instance which is not
already registered with this instance, no operation is
performed.IHandler.removeHandlerListener(IHandlerListener)Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.