public abstract class ElementUI extends ElementBase
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoEnable |
protected boolean |
autoHide |
static String |
EVENT_ELEMENT_ACTIVATE |
static String |
EVENT_ELEMENT_INACTIVATE |
protected static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
ElementUI() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(boolean activate)
Activates or inactivates a UI element.
|
protected void |
activateChildren(boolean activate)
Default behavior is to pass activation/inactivation event to children.
|
void |
addTrigger(ElementTrigger trigger) |
protected void |
afterAddChild(ElementBase child)
Called after a child is logically added to the parent.
|
protected void |
afterMoveChild(ElementBase child,
ElementBase before)
Element has been moved to a different position under this parent.
|
protected void |
afterParentChanged(ElementBase oldParent)
Called after the parent has been changed.
|
protected void |
afterRemoveChild(ElementBase child)
Called after a child is logically removed from the parent.
|
protected void |
applyColor()
Provides a default implementation for setting the color of a UI element.
|
protected void |
applyColor(org.fujion.component.BaseUIComponent comp)
Applies the current color setting to the target component.
|
protected void |
applyHint()
Provides a default implementation for setting the hint text of a UI element.
|
protected void |
applyHint(org.fujion.component.BaseUIComponent comp)
Applies the current hint text to the target component.
|
void |
associateComponent(org.fujion.component.BaseComponent component)
Associates the specified CWF component with this UI element.
|
protected void |
beforeParentChanged(ElementBase newParent)
Called before the parent has been changed.
|
protected void |
bind()
Override to bind wrapped components to the UI.
|
void |
bringToFront()
Brings this element to the front of the user interface.
|
protected org.fujion.component.BaseUIComponent |
createFromTemplate()
Create wrapped component(s) from a template (a cwf page).
|
protected org.fujion.component.BaseUIComponent |
createFromTemplate(String template)
Create wrapped component(s) from specified template (a cwf page).
|
protected org.fujion.component.BaseUIComponent |
createFromTemplate(String template,
org.fujion.component.BaseComponent parent,
Object controller)
Create wrapped component(s) from specified template (a cwf page).
|
void |
destroy()
Override to implement special cleanup when an object is destroyed.
|
protected void |
fullSize(org.fujion.component.BaseUIComponent component)
Set width and height of a component to 100%.
|
static ElementUI |
getAssociatedElement(org.fujion.component.BaseComponent component)
Returns the UI element that registered the CWF component.
|
String |
getColor()
Returns the color (as an HTML-formatted RGB string) for this element.
|
static org.fujion.component.Menupopup |
getDesignContextMenu(org.fujion.component.BaseComponent component)
Returns the design context menu currently bound to the component.
|
ElementUI |
getFirstVisibleChild()
Returns the first visible child.
|
String |
getHint()
Returns the tool tip text.
|
org.fujion.component.BaseUIComponent |
getInnerComponent()
Returns the innermost wrapped UI component.
|
ElementUI |
getLastVisibleChild()
Returns the last visible child.
|
protected DesignMask.MaskMode |
getMaskMode()
Returns true if the design mode mask is to be used.
|
org.fujion.component.BaseUIComponent |
getMaskTarget()
Returns the component that will receive the design mode mask.
|
ElementUI |
getNextSibling(boolean visibleOnly)
Returns this element's next sibling.
|
org.fujion.component.BaseUIComponent |
getOuterComponent()
Returns the outermost wrapped UI component.
|
ElementUI |
getParent()
Returns the parent of this element.
|
ElementUI |
getRoot()
Returns the UI element at the root of the component tree.
|
protected String |
getTemplateUrl()
Returns the URL of the default template to use in createFromTemplate.
|
Set<ElementTrigger> |
getTriggers() |
protected boolean |
hasVisibleElements(org.fujion.component.BaseUIComponent component)
Returns true if any associated UI elements in the component subtree are visible.
|
boolean |
isActivated()
Returns the activation status of the element.
|
boolean |
isVisible()
Returns the visible state of the UI element.
|
protected void |
rebindChildren()
Rebind any children.
|
void |
removeTrigger(ElementTrigger trigger) |
void |
setColor(String value)
Provides a default implementation for setting the color of a UI element.
|
protected void |
setDesignContextMenu(org.fujion.component.BaseUIComponent component,
org.fujion.component.Menupopup contextMenu)
Apply/remove the design context menu to/from the specified component.
|
protected void |
setDesignContextMenu(org.fujion.component.Menupopup contextMenu)
Apply/remove the design context menu to/from CWF components.
|
void |
setDesignMode(boolean designMode)
Sets design mode status for this component and all its children and triggers.
|
void |
setHint(String value)
Sets the tool tip text.
|
protected void |
setInnerComponent(org.fujion.component.BaseUIComponent value)
Sets the innermost wrapped UI component.
|
protected void |
setMaskMode(DesignMask.MaskMode mode)
Sets whether to use the design mode mask.
|
protected void |
setOuterComponent(org.fujion.component.BaseUIComponent value)
Sets the outermost wrapped UI component.
|
void |
setVisible(boolean visible)
Sets the visibility state of the component.
|
protected void |
unbind()
Override to unbind wrapped components from the UI.
|
protected void |
updateState()
Update a UI element based on the state of its children.
|
protected void |
updateVisibility()
Calls updateVisibility with current settings.
|
protected void |
updateVisibility(boolean visible,
boolean activated)
Override to set the visibility of wrapped components.
|
about, addChild, addChild, afterInitialize, 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, setDefinition, setEnabled, setIndex, setLocked, setParent, setRejectReason, updateParentStateprotected static final org.apache.commons.logging.Log log
public static final String EVENT_ELEMENT_ACTIVATE
public static final String EVENT_ELEMENT_INACTIVATE
protected boolean autoHide
protected boolean autoEnable
public static ElementUI getAssociatedElement(org.fujion.component.BaseComponent component)
component - The CWF component of interest.public static org.fujion.component.Menupopup getDesignContextMenu(org.fujion.component.BaseComponent component)
component - The CWF component of interest.protected String getTemplateUrl()
protected org.fujion.component.BaseUIComponent createFromTemplate()
protected org.fujion.component.BaseUIComponent createFromTemplate(String template)
template - URL of cwf page that will serve as a template. If a path is not specified, it
is derived from the package. If the URL is not specified, the template name is
obtained from getTemplateUrl.protected org.fujion.component.BaseUIComponent createFromTemplate(String template, org.fujion.component.BaseComponent parent, Object controller)
template - URL of cwf page that will serve as a template. If the URL is not specified,
the template name is obtained from getTemplateUrl.parent - The component that will become the parent.controller - If specified, events and variables are autowired to the controller.public void associateComponent(org.fujion.component.BaseComponent component)
component - CWF component to associate.public void setDesignMode(boolean designMode)
setDesignMode in class ElementBasedesignMode - The design mode flag.protected void setDesignContextMenu(org.fujion.component.Menupopup contextMenu)
contextMenu - The design menu if design mode is activated, or null if it is not.protected void setDesignContextMenu(org.fujion.component.BaseUIComponent component,
org.fujion.component.Menupopup contextMenu)
component - Component to which to apply/remove the design context menu.contextMenu - The design menu if design mode is activated, or null if it is not.public org.fujion.component.BaseUIComponent getMaskTarget()
protected void afterAddChild(ElementBase child)
afterAddChild in class ElementBasechild - The child element added.protected void afterRemoveChild(ElementBase child)
afterRemoveChild in class ElementBasechild - The child UI element.protected void afterParentChanged(ElementBase oldParent)
afterParentChanged in class ElementBaseoldParent - The value of the parent property prior to the change.protected void beforeParentChanged(ElementBase newParent)
beforeParentChanged in class ElementBasenewParent - The value of the parent property prior to the change.public void destroy()
destroy in class ElementBaseprotected void bind()
protected void unbind()
protected void rebindChildren()
public org.fujion.component.BaseUIComponent getInnerComponent()
protected void setInnerComponent(org.fujion.component.BaseUIComponent value)
value - The innermost wrapped UI component.public org.fujion.component.BaseUIComponent getOuterComponent()
protected void setOuterComponent(org.fujion.component.BaseUIComponent value)
value - The outermost wrapped UI component.protected void fullSize(org.fujion.component.BaseUIComponent component)
component - BaseComponentpublic void activate(boolean activate)
activate - The activate status.protected void activateChildren(boolean activate)
activate - The activate status.public final boolean isActivated()
public ElementUI getFirstVisibleChild()
public ElementUI getLastVisibleChild()
public ElementUI getNextSibling(boolean visibleOnly)
visibleOnly - If true, skip any non-visible siblings.protected void afterMoveChild(ElementBase child, ElementBase before)
afterMoveChild in class ElementBasechild - Child element that was moved.before - Child element was moved before this one.public void bringToFront()
public ElementUI getParent()
getParent in class ElementBasepublic ElementUI getRoot()
getRoot in class ElementBasepublic final void setVisible(boolean visible)
visible - The visibility state.protected final void updateVisibility()
protected void updateVisibility(boolean visible,
boolean activated)
visible - The current visibility state.activated - The current activation state.public final boolean isVisible()
public final String getColor()
public final void setColor(String value)
value - A correctly formatted HTML color specification.protected void applyColor()
protected void applyColor(org.fujion.component.BaseUIComponent comp)
comp - Component to receive the color setting.public final String getHint()
public final void setHint(String value)
value - The tool tip text.protected void applyHint()
protected void applyHint(org.fujion.component.BaseUIComponent comp)
comp - Component to receive the hint text.protected void updateState()
updateState in class ElementBaseprotected DesignMask.MaskMode getMaskMode()
protected void setMaskMode(DesignMask.MaskMode mode)
mode - True to enable the design mode mask.protected boolean hasVisibleElements(org.fujion.component.BaseUIComponent component)
component - Component subtree to examine.public void addTrigger(ElementTrigger trigger)
public void removeTrigger(ElementTrigger trigger)
public Set<ElementTrigger> getTriggers()
Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.