public class PluginContainer
extends org.zkoss.zul.Idspace
| Constructor and Description |
|---|
PluginContainer()
Create the plugin container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activate the plugin.
|
void |
addToolbarComponent(org.zkoss.zk.ui.Component component)
Adds the specified component to the toolbar container.
|
void |
bringToFront()
Calls the hosting UI element to bring the plugin to the front of the UI.
|
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.
|
String |
getColor()
Returns the color (as an HTML-formatted RGB string) for this element.
|
static PluginContainer |
getContainer(org.zkoss.zk.ui.Component comp)
Returns the plugin container for the given component.
|
PluginDefinition |
getPluginDefinition()
Return the definition associated 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()
Returns the disable status of the container.
|
void |
load()
Initializes a plugin, if not already done.
|
void |
onAction(PluginEvent event)
Notify listeners of plugin events.
|
void |
onCommand(CommandEvent event)
Forward onCommand events to first level children of the container.
|
void |
registerAction(org.zkoss.zk.ui.ext.Disable actionElement)
Registers an action element.
|
void |
registerComponent(org.zkoss.zk.ui.Component component)
Register a component with 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 |
setColor(String value)
Sets the container's background color.
|
void |
setDesignMode(boolean designMode)
Sets design mode for the container.
|
void |
setDisabled(boolean disabled)
Enables/disables the container and all registered action elements.
|
void |
setPluginDefinition(PluginDefinition definition)
Sets the plugin definition the container will use to instantiate the plugin.
|
void |
setPropertyValue(PropertyInfo propInfo,
Object value)
Sets a value for a registered property.
|
boolean |
setVisible(boolean visible)
Sets the visibility of the contained resource and any registered components.
|
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.
|
clone, getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltipfocus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerializefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static PluginContainer getContainer(org.zkoss.zk.ui.Component comp)
comp - The component whose hosting container is sought.public void activate()
public void inactivate()
public void destroy()
public void bringToFront()
public boolean setVisible(boolean visible)
setVisible in interface org.zkoss.zk.ui.ComponentsetVisible in class org.zkoss.zk.ui.AbstractComponentvisible - Visibility state to setpublic void onAction(PluginEvent event)
event - The plugin event containing the action.protected void doAfterLoad()
public void onCommand(CommandEvent event)
event - The command event.public void load()
public void addToolbarComponent(org.zkoss.zk.ui.Component component)
component - Component to add.public void registerComponent(org.zkoss.zk.ui.Component component)
component - Component to register.public void registerAction(org.zkoss.zk.ui.ext.Disable actionElement)
actionElement - A component implementing the Disable interface.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 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 Object getAssociatedBean(String beanId)
beanId - The id of the bean.public Object getPropertyValue(PropertyInfo propInfo) throws Exception
propInfo - Property info.Exception - Unspecified exception.public void setPropertyValue(PropertyInfo propInfo, Object value) throws Exception
propInfo - Property info.value - The value to set.Exception - Unspecified exception.public PluginDefinition getPluginDefinition()
public void setPluginDefinition(PluginDefinition definition)
definition - The plugin definition.public void setDisabled(boolean disabled)
disabled - Disable status.public void disableActions(boolean disable)
disable - The disable status.public boolean isDisabled()
public void setBusy(String message)
message - The message to display, or null to clear previous message.public void setDesignMode(boolean designMode)
designMode - If true, associated actions and busy mask are disabled.public CareWebShell getShell()
public String getColor()
public void setColor(String value)
value - A correctly formatted HTML color specification.Copyright © 2016 Regenstrief Center for Biomedical Informatics. All rights reserved.