Package org.gvsig.andami.plugins
Class ExtensionDecorator
java.lang.Object
org.gvsig.andami.plugins.ExtensionDecorator
- All Implemented Interfaces:
HiddableExtension,IExtension
This class extends the functionality of Extension class to let the programmer
set an extension visible or not on-the-fly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is executed when the user clicks on any of the controls associated with this extension (menus, tools, etc).Gets the status of the extension, which may be queried to check if the extension has some unsaved data or some associated background tasks.getStatus(IExtension extension) intDetermines whether the extension will be visible or not, overriding the value defined by the extension itself.voidExtension's initialization code should be here.booleanThis method is invoked by Andami to check whether the extension (and its associated controls) is enabled or disabled.booleanThis method is invoked by Andami to check whether the extension (and its associated controls) is visible or hidden.voidExtension's post-initialization code should be here.voidvoidsetVisibility(int state) Sets the absolute visibility of this extension (overriding the value set at the MDIManager)voidExtension's termination code should be here.
-
Field Details
-
INACTIVE
public static final int INACTIVE- See Also:
-
ALWAYS_VISIBLE
public static final int ALWAYS_VISIBLE- See Also:
-
ALWAYS_INVISIBLE
public static final int ALWAYS_INVISIBLE- See Also:
-
-
Constructor Details
-
ExtensionDecorator
-
-
Method Details
-
setExtension
-
setVisibility
public void setVisibility(int state) Description copied from interface:HiddableExtensionSets the absolute visibility of this extension (overriding the value set at the MDIManager)- Specified by:
setVisibilityin interfaceHiddableExtension
-
getVisibility
public int getVisibility()Description copied from interface:HiddableExtensionDetermines whether the extension will be visible or not, overriding the value defined by the extension itself.- Specified by:
getVisibilityin interfaceHiddableExtension- Returns:
-
getExtension
-
initialize
public void initialize()Description copied from interface:IExtensionExtension's initialization code should be here. This method is called for all the extensions during Andami's initialization.- Specified by:
initializein interfaceIExtension
-
terminate
public void terminate()Description copied from interface:IExtensionExtension's termination code should be here. This method is called for all the extensions during Andami's termination.- Specified by:
terminatein interfaceIExtension
-
execute
Description copied from interface:IExtensionThis method is executed when the user clicks on any of the controls associated with this extension (menus, tools, etc).- Specified by:
executein interfaceIExtension- Parameters:
actionCommand- An String specifying the action to execute. This is useful when there are different controls associated with the same extension.
-
isEnabled
public boolean isEnabled()Description copied from interface:IExtensionThis method is invoked by Andami to check whether the extension (and its associated controls) is enabled or disabled. Disabled controls (menus and buttons) are shown in light grey colour, and it is not possible to click on them.- Specified by:
isEnabledin interfaceIExtension- Returns:
- true if the extension should be enabled, false otherwise
-
isVisible
public boolean isVisible()Description copied from interface:IExtensionThis method is invoked by Andami to check whether the extension (and its associated controls) is visible or hidden.- Specified by:
isVisiblein interfaceIExtension- Returns:
- true if the extension should be visible, false otherwise
-
postInitialize
public void postInitialize()Description copied from interface:IExtensionExtension's post-initialization code should be here. This method is called for all the extensions during Andami's initialization, afterinitialize()has been called for ALL the extensions.- Specified by:
postInitializein interfaceIExtension
-
getStatus
Description copied from interface:IExtensionGets the status of the extension, which may be queried to check if the extension has some unsaved data or some associated background tasks.- Specified by:
getStatusin interfaceIExtension- Returns:
- An IExtensionStatus object, containing the status of this extension.
- See Also:
-
getStatus
- Specified by:
getStatusin interfaceIExtension
-