public class ExtensionDecorator extends java.lang.Object implements HiddableExtension
| Modifier and Type | Field and Description |
|---|---|
static int |
ALWAYS_INVISIBLE |
static int |
ALWAYS_VISIBLE |
static int |
INACTIVE |
| Constructor and Description |
|---|
ExtensionDecorator(IExtension e,
int visibilityControl) |
| Modifier and Type | Method and Description |
|---|---|
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).
|
IExtension |
getExtension() |
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.
|
IExtensionStatus |
getStatus(IExtension extension) |
int |
getVisibility()
Determines whether the extension will be visible or not, overriding
the value defined by the extension itself.
|
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 |
isVisible()
This method is invoked by Andami to check whether the extension
(and its associated controls) is visible or hidden.
|
void |
postInitialize()
Extension's post-initialization code should be here.
|
void |
setExtension(IExtension e) |
void |
setVisibility(int state)
Sets the absolute visibility of this extension (overriding the value
set at the MDIManager)
|
void |
terminate()
Extension's termination code should be here.
|
public static final int INACTIVE
public static final int ALWAYS_VISIBLE
public static final int ALWAYS_INVISIBLE
public ExtensionDecorator(IExtension e, int visibilityControl)
public void setExtension(IExtension e)
public void setVisibility(int state)
HiddableExtensionsetVisibility in interface HiddableExtensionpublic int getVisibility()
HiddableExtensiongetVisibility in interface HiddableExtensionpublic IExtension getExtension()
public void initialize()
IExtensioninitialize in interface IExtensionpublic void terminate()
IExtensionterminate in interface IExtensionpublic void execute(java.lang.String actionCommand)
IExtensionexecute in interface IExtensionactionCommand - An String specifying the action to
execute. This is useful when there are different
controls associated with the same extension.public boolean isEnabled()
IExtensionisEnabled in interface IExtensionpublic boolean isVisible()
IExtensionisVisible in interface IExtensionpublic void postInitialize()
IExtensioninitialize()
has been called for ALL the extensions.postInitialize in interface IExtensionpublic IExtensionStatus getStatus()
IExtensiongetStatus in interface IExtensionIExtensionStatuspublic IExtensionStatus getStatus(IExtension extension)
getStatus in interface IExtension