public class EditingExtension extends Extension implements Observer
Constructor and Description |
---|
EditingExtension() |
Modifier and Type | Method and Description |
---|---|
boolean |
canQueryByAction() |
void |
execute(java.lang.String actionCommand)
This method is executed when the user clicks on any of the
controls associated with this extension (menus, tools, etc).
|
IExtensionStatus |
getStatus()
Gets the status of the extension, which may be queried to check
if the extension has some unsaved data or some associated background
tasks.
|
void |
initialize()
Extension's initialization code should be here.
|
boolean |
isEnabled()
This method is invoked by Andami to check whether the extension
(and its associated controls) is enabled or disabled.
|
boolean |
isEnabled(java.lang.String action) |
boolean |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
boolean |
isVisible(java.lang.String action) |
void |
postInitialize()
Extension's post-initialization code should be here.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
public void execute(java.lang.String actionCommand)
IExtension
execute
in interface IExtension
actionCommand
- An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.public void initialize()
IExtension
initialize
in interface IExtension
public void postInitialize()
IExtension
initialize()
has been called for ALL the extensions.postInitialize
in interface IExtension
postInitialize
in class Extension
public boolean isEnabled()
IExtension
isEnabled
in interface IExtension
public boolean isVisible()
IExtension
isVisible
in interface IExtension
public boolean isVisible(java.lang.String action)
isVisible
in interface IExtensionQueryByAction
isVisible
in class Extension
public boolean isEnabled(java.lang.String action)
isEnabled
in interface IExtensionQueryByAction
isEnabled
in class Extension
public boolean canQueryByAction()
canQueryByAction
in interface IExtensionQueryByAction
canQueryByAction
in class Extension
public void update(Observable observable, java.lang.Object notification)
Observer
Observable
object is changed and this
Observer
has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer
and other Observer
s listening to the same
Observable
.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver
and prepare this method
implementation to handle receiving DefaultComplexNotification
instances
as well as direct notification objects.
public IExtensionStatus getStatus()
IExtension
getStatus
in interface IExtension
getStatus
in class Extension
IExtensionStatus