public class ExtensionDecorator extends 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(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)
HiddableExtension
setVisibility
in interface HiddableExtension
public int getVisibility()
HiddableExtension
getVisibility
in interface HiddableExtension
public IExtension getExtension()
public void initialize()
IExtension
initialize
in interface IExtension
public void terminate()
IExtension
terminate
in interface IExtension
public void execute(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 boolean isEnabled()
IExtension
isEnabled
in interface IExtension
public boolean isVisible()
IExtension
isVisible
in interface IExtension
public void postInitialize()
IExtension
initialize()
has been called for ALL the extensions.postInitialize
in interface IExtension
public IExtensionStatus getStatus()
IExtension
getStatus
in interface IExtension
IExtensionStatus
public IExtensionStatus getStatus(IExtension extension)
getStatus
in interface IExtension