public class ElementPlugin extends ElementUI implements org.fujion.ancillary.IDisable, IPropertyAccessor
| Modifier and Type | Class and Description |
|---|---|
class |
ElementPlugin.PluginContainer |
autoEnable, autoHide, EVENT_ELEMENT_ACTIVATE, EVENT_ELEMENT_INACTIVATE, log| Constructor and Description |
|---|
ElementPlugin()
Sets the container as the wrapped component and registers itself to receive action
notifications from the container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
about()
Displays an about dialog for the UI element.
|
void |
activate()
Activate the plugin.
|
void |
activateChildren(boolean active)
Passes the activation request to the container.
|
void |
addToolbarComponent(org.fujion.component.BaseComponent component)
Adds the specified component to the toolbar container.
|
void |
afterInitialize(boolean deserializing)
Additional processing of the plugin after it is initialized.
|
protected void |
applyColor()
Set background color on container's first child.
|
void |
destroy()
Release contained resources.
|
void |
disableActions(boolean disable)
Enables/disables registered actions elements.
|
protected void |
doAfterLoad()
Actions to perform after the container is loaded.
|
Object |
getAssociatedBean(String beanId)
Returns a bean that has been associated (via registerBean) with this plugin.
|
Object |
getPropertyValue(PropertyInfo propInfo)
Returns the value for a registered property.
|
CareWebShell |
getShell()
Returns the shell instance that hosts this container.
|
void |
inactivate()
Inactivate the plugin.
|
boolean |
isDisabled() |
void |
load()
Initializes a plugin, if not already done.
|
void |
registerAction(org.fujion.ancillary.IDisable actionElement)
Registers an action element.
|
void |
registerBean(String beanId,
boolean isRequired)
Registers a helper bean with this container.
|
void |
registerComponent(org.fujion.component.BaseUIComponent component)
Register a component with the container.
|
void |
registerId(String id,
org.fujion.component.BaseComponent component)
Allows auto-wire to work even if component is not a child of the container.
|
void |
registerListener(IPluginEvent listener)
Registers a listener for the IPluginEvent callback event.
|
void |
registerListener(IPluginEventListener listener)
Registers a listener for the IPluginEventListener callback event.
|
void |
registerProperties(Object instance,
String... propertyNames)
Registers one or more named properties to the container.
|
void |
registerProperty(Object instance,
String propertyName,
boolean override)
Registers a named property to the container.
|
void |
setBusy(String message)
If message is not null, disables the plugin and displays the busy message.
|
void |
setDefinition(PluginDefinition definition)
Sets the plugin definition the container will use to instantiate the plugin.
|
void |
setDesignMode(boolean designMode)
Passes design mode setting to the container.
|
void |
setDisabled(boolean disabled) |
void |
setPropertyValue(PropertyInfo propInfo,
Object value)
Sets a value for a registered property.
|
void |
tryRegisterController(Object object)
Registers an object as a controller if it implements the IPluginController interface.
|
boolean |
tryRegisterListener(Object object,
boolean register)
Attempts to register or unregister an object as an event listener.
|
void |
unregisterListener(IPluginEvent listener)
Unregisters a listener for the IPluginEvent callback event.
|
void |
unregisterListener(IPluginEventListener listener)
Unregisters a listener for the IPluginEvent callback event.
|
protected void |
updateVisibility(boolean visible,
boolean activated)
Sets the visibility of the contained resource and any registered components.
|
activate, addTrigger, afterAddChild, afterMoveChild, afterParentChanged, afterRemoveChild, applyColor, applyHint, applyHint, associateComponent, beforeParentChanged, bind, bringToFront, createFromTemplate, createFromTemplate, createFromTemplate, fullSize, getAssociatedElement, getColor, getDesignContextMenu, getFirstVisibleChild, getHint, getInnerComponent, getLastVisibleChild, getMaskMode, getMaskTarget, getNextSibling, getOuterComponent, getParent, getRoot, getTemplateUrl, getTriggers, hasVisibleElements, isActivated, isVisible, rebindChildren, removeTrigger, setColor, setDesignContextMenu, setDesignContextMenu, setHint, setInnerComponent, setMaskMode, setOuterComponent, setVisible, unbind, updateState, updateVisibilityaddChild, addChild, beforeAddChild, beforeInitialize, beforeRemoveChild, canAcceptChild, canAcceptChild, canAcceptChild, canAcceptChild, canAcceptParent, canAcceptParent, canAcceptParent, canAcceptParent, editProperties, findChildElement, getAncestor, getChild, getChild, getChildCount, getChildCount, getChildren, getChildren, getDefinition, getDisplayName, getEventManager, getFirstChild, getIndex, getInstanceName, getLastChild, getPropEditClass, getRejectReason, getSerializableChildren, hasAncestor, hasChild, indexOfChild, isContainer, isDesignMode, isEnabled, isLocked, listenToChild, listenToParent, moveChild, moveChild, notifyChildren, notifyParent, registerAllowedChildClass, registerAllowedParentClass, remove, removeChild, removeChildren, setDefinition, setEnabled, setIndex, setLocked, setParent, setRejectReason, updateParentStatepublic ElementPlugin()
public void about()
ElementBaseabout in class ElementBaseElementBase.about()public void activateChildren(boolean active)
activateChildren in class ElementUIactive - The activate status.ElementUI.activateChildren(boolean)public void activate()
public void inactivate()
public void afterInitialize(boolean deserializing)
throws Exception
afterInitialize in class ElementBasedeserializing - If true, initialization is occurring as a result of deserialization.Exception - Unspecified exception.ElementBase.afterInitialize(boolean)public void setDesignMode(boolean designMode)
setDesignMode in class ElementUIdesignMode - If true, associated actions and busy mask are disabled.public Object getPropertyValue(PropertyInfo propInfo) throws Exception
getPropertyValue in interface IPropertyAccessorpropInfo - Property info.Exception - Unspecified exception.public void setPropertyValue(PropertyInfo propInfo, Object value) throws Exception
setPropertyValue in interface IPropertyAccessorpropInfo - Property info.value - The value to set.Exception - Unspecified exception.public boolean isDisabled()
isDisabled in interface org.fujion.ancillary.IDisablepublic void setDisabled(boolean disabled)
setDisabled in interface org.fujion.ancillary.IDisableprotected void updateVisibility(boolean visible,
boolean activated)
updateVisibility in class ElementUIvisible - Visibility state to setactivated - The current activation state.public void setDefinition(PluginDefinition definition)
setDefinition in class ElementBasedefinition - The plugin definition.public void registerAction(org.fujion.ancillary.IDisable actionElement)
actionElement - A component implementing the Disable interface.public void disableActions(boolean disable)
disable - The disable status.public void setBusy(String message)
message - The message to display, or null to clear previous message.protected void doAfterLoad()
public void load()
public void addToolbarComponent(org.fujion.component.BaseComponent component)
component - BaseComponent to add.public void registerComponent(org.fujion.component.BaseUIComponent component)
component - BaseComponent to register.public void registerId(String id, org.fujion.component.BaseComponent component)
id - BaseComponent id.component - BaseComponent to be registered.public void registerListener(IPluginEvent listener)
listener - Listener to be registered.public void registerListener(IPluginEventListener listener)
listener - Listener to be registered.public void unregisterListener(IPluginEvent listener)
listener - Listener to be unregistered.public void unregisterListener(IPluginEventListener listener)
listener - Listener to be unregistered.public boolean tryRegisterListener(Object object, boolean register)
object - Object to register/unregister.register - If true, we are attempting to register. If false, unregister.public void tryRegisterController(Object object)
object - Object to register.public void registerProperties(Object instance, String... propertyNames)
instance - The object instance holding the property accessors. If null, any existing
registration will be removed.propertyNames - One or more property names to register.public void registerProperty(Object instance, String propertyName, boolean override)
instance - The object instance holding the property accessors. If null, any existing
registration will be removed.propertyName - Name of property to register.override - If the property is already registered to a non-proxy, the previous
registration will be replaced if this is true; otherwise the request is ignored.public void registerBean(String beanId, boolean isRequired)
beanId - The bean's id.isRequired - If true and the bean is not found, an exception is raised.public Object getAssociatedBean(String beanId)
beanId - The id of the bean.protected void applyColor()
applyColor in class ElementUIpublic CareWebShell getShell()
Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.