public abstract class BaseUIComponent extends BaseComponent implements IDisable
BaseComponent.SubComponentlog| Constructor and Description |
|---|
BaseUIComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_syncClasses(String oldClasses)
Synchronize class settings with the client.
|
protected void |
_syncStyles(String oldStyles)
Synchronizes style properties with stored styles and with the client.
|
void |
addClass(String value)
Adds one or more classes to existing classes.
|
void |
addMask()
Creates a shaded mask over the component, effectively preventing direct user interaction.
|
void |
addMask(String label)
Creates a shaded mask over the component, effectively preventing direct user interaction.
|
void |
addMask(String label,
Popup popup)
Creates a shaded mask over the component, effectively preventing direct user interaction.
|
String |
addStyle(String name,
String value)
Adds a style to existing styles.
|
void |
addStyles(String styles)
Adds styles specified as a string.
|
protected void |
afterRemoveChild(BaseComponent child)
If the child being removed is the popup, set the popup to null.
|
void |
focus()
Sets the input focus to this component.
|
String |
getBalloon()
Returns the balloon text to be displayed adjacent to the component.
|
String |
getClasses()
Returns the CSS classes set for this component.
|
Popup |
getContext()
Returns the popup component that will appear when right-clicking on this component.
|
String |
getCss()
Returns the CSS specifier for this component.
|
String |
getDragid()
Returns a space-delimited list of drag id's associated with this component.
|
String |
getDropid()
Returns a space-delimited list of drop id's associated with this component.
|
BaseUIComponent |
getFirstVisibleChild(boolean recurse)
Returns the first visible child, if any.
|
<T extends BaseUIComponent> |
getFirstVisibleChild(Class<T> clazz,
boolean recurse)
Returns the first visible child of a given class, if any.
|
String |
getFlex()
Returns the flex setting.
|
String |
getHeight()
Returns the height.
|
String |
getHint()
Returns the popup text to be displayed when hovering over this component.
|
String |
getKeycapture()
Returns the list of key codes to be captured.
|
Popup |
getPopup()
Returns the popup component that will appear when hovering over this component.
|
String |
getStyle(String name)
Returns the value of the named style.
|
String |
getStyles()
Returns the styles set for this component.
|
int |
getTabindex()
Returns the tab index for the component.
|
String |
getWidth()
Returns the width.
|
void |
hide()
Hides the component - a shortcut for
setVisible(false). |
boolean |
isDisabled()
Returns true if disabled.
|
boolean |
isVisible()
Returns the visibility state of the component.
|
protected void |
onDestroyTracked(BaseComponent comp)
Remove popup reference when it is destroyed.
|
void |
print()
Print this element with default options.
|
void |
print(PrintOptions options)
Print this element with the specified options.
|
void |
removeClass(String value)
Removes one or more classes from existing classes.
|
void |
removeMask()
Removes the mask, if present.
|
String |
removeStyle(String name)
Removes a style.
|
void |
reportSize()
Causes the component to report its current dimensions and relative position via a
resize event. |
void |
scrollIntoView()
Ensures that this component is visible within the view port by scrolling if necessary.
|
void |
setBalloon(String balloon)
Sets the balloon text to be displayed adjacent to the component.
|
void |
setClasses(String classes)
Sets the CSS classes for this component, replacing any existing classes.
|
void |
setContext(Popup context)
Sets the popup component that will appear when right-clicking on this component.
|
void |
setCss(String css)
Sets the CSS specifier for this component.
|
void |
setDisabled(boolean disabled)
Sets the disabled state.
|
void |
setDragid(String dragid)
Sets the drag id(s) to be associated with this component.
|
void |
setDropid(String dropid)
Sets the drag id(s) to be associated with this component.
|
void |
setFlex(String flex)
Sets the flex setting.
|
void |
setFocus(boolean focus)
Sets/removes the input focus to/from this component.
|
void |
setHeight(String height)
Sets the height.
|
void |
setHint(String hint)
Sets the popup text to be displayed when hovering over this component.
|
void |
setKeycapture(String keycapture)
Sets the list of key codes to be captured.
|
void |
setPopup(Popup popup)
Sets the popup component that will appear when hovering over this component.
|
void |
setStyles(String styles)
Sets the styles for this component, replacing any existing styles.
|
void |
setTabindex(int tabindex)
Sets the tab index for the component.
|
void |
setVisible(boolean visible)
Sets the visibility state of the component.
|
void |
setWidth(String width)
Sets the width.
|
void |
show()
Shows the component - a shortcut for
setVisible(true). |
void |
toggleClass(String yesValue,
String noValue,
boolean condition)
Toggles the presence of two mutually exclusive classes based on a condition.
|
_attach, _initProps, addChild, addChild, addChild, addChildren, addComposite, addEventForward, addEventForward, addEventForward, addEventForward, addEventListener, addEventListener, addEventListener, addEventListener, afterAddChild, afterSetParent, areEqual, beforeAddChild, beforeRemoveChild, beforeSetParent, bind, bringToFront, defaultify, destroy, destroyChildren, detach, detachChildren, finalize, findAllNamed, findAttribute, findByName, findByName, findChildByData, findChildByLabel, fireEvent, fireEvent, fireEventToClient, fireEventToClient, getAncestor, getAncestor, getAttribute, getAttribute, getAttributes, getChild, getChildAt, getChildCount, getChildCount, getChildren, getChildren, getContent, getController, getControllers, getData, getData, getDefinition, getFirstChild, getId, getIndex, getLastChild, getLastController, getName, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, hasChildren, hasEventListener, hasEventListener, invoke, invoke, invoke, invoke, invoke, invokeIfAttached, isAncestor, isContainer, isContentSynced, isDead, isNamespace, isRendered, loadModule, loadModule, notifyAncestors, notifyDescendants, nullify, onAttach, onDestroy, propertyChange, removeChild, removeEventForward, removeEventForward, removeEventForward, removeEventForward, removeEventListener, removeEventListener, removeEventListener, removeEventListener, setContent, setContentSynced, setData, setIndex, setName, setNamespace, setParent, sub, swapChildren, swapTrackedComponents, sync, toString, trackComponent, trimify, untrackComponent, validate, validate, validateChild, validateIsChild, validateName, validatePage, validateParent, wireController, wireControllerclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waittransformForClientgetAttribute, hasAttribute, removeAttribute, setAttributepublic void addMask()
public void addMask(String label)
label - Text to display in the center of the mask.public void addMask(String label, Popup popup)
label - Text to display in the center of the mask.popup - Popup to display when right-clicking on the mask.public void removeMask()
@Component.PropertyGetter(value="style", description="The active CSS styles for this component.") public String getStyles()
@Component.PropertySetter(value="style", description="The active CSS styles for this component.") public void setStyles(String styles)
styles - Styles to set, represented as a string in the same format as the HTML style
attribute.protected void _syncStyles(String oldStyles)
oldStyles - Previous styles value.public String getStyle(String name)
name - The style name (e.g., "color").public String addStyle(String name, String value)
name - The style name (e.g., "color").value - The style value.public void addStyles(String styles)
styles - Styles to add, represented as a string in the same format as the HTML style
attribute.public String removeStyle(String name)
name - The style name (e.g., "color").@Component.PropertyGetter(value="class", description="Space-delimited list of CSS classes.") public String getClasses()
public void setClasses(String classes)
classes - Space-delimited list of CSS classes. Extended syntax is supported (see
CssClasses);protected void _syncClasses(String oldClasses)
oldClasses - Previous value for classes.@Component.PropertySetter(value="class", description="Space-delimited list of CSS classes.") public void addClass(String value)
value - Space-delimited list of CSS classes. Extended syntax is supported (see
CssClasses);public void removeClass(String value)
value - Space-delimited list of CSS classes. Extended syntax is supported (see
CssClasses);public void toggleClass(String yesValue, String noValue, boolean condition)
CssClasses)yesValue - Classes to be added if the condition is true, or removed if false.noValue - Classes to be added if the condition is false, or removed if true.condition - The condition value.public void hide()
setVisible(false).public void show()
setVisible(true).@Component.PropertyGetter(value="height", description="The component\'s height.") public String getHeight()
@Component.PropertySetter(value="height", description="The component\'s height.") public void setHeight(String height)
height - The height.@Component.PropertyGetter(value="width", description="The component\'s width.") public String getWidth()
@Component.PropertySetter(value="width", description="The component\'s width.") public void setWidth(String width)
width - The width.@Component.PropertyGetter(value="flex", description="The component\'s flex style setting.") public String getFlex()
@Component.PropertySetter(value="flex", description="The component\'s flex style setting.") public void setFlex(String flex)
flex - The flex setting.@Component.PropertySetter(value="focus", defaultValue="false", defer=true, description="Sets or removes focus for this component.") public void setFocus(boolean focus)
focus - If true, the component receives the input focus if possible. If false and the
component currently has the input focus, the focus is relinquished.public void focus()
setFocus(true).@Component.PropertyGetter(value="css", description="The CSS specifier for this component.") public String getCss()
##{id}>.inline{font-style:italic; background: white}
@Component.PropertySetter(value="css", description="The CSS specifier for this component.") public void setCss(String css)
##{id}>.inline{font-style:italic; background: white}
css - The CSS specifier.public void reportSize()
resize event.@Component.PropertyGetter(value="hint", description="The popup text to be displayed when hovering over this component.") public String getHint()
@Component.PropertySetter(value="hint", description="The popup text to be displayed when hovering over this component.") public void setHint(String hint)
hint - The hint text.@Component.PropertyGetter(value="balloon", description="The balloon text to be displayed adjacent to the component.") public String getBalloon()
@Component.PropertySetter(value="balloon", description="The balloon text to be displayed adjacent to the component.") public void setBalloon(String balloon)
balloon - The balloon text.@Component.PropertyGetter(value="disabled", description="True if the component is disabled.") public boolean isDisabled()
IDisableisDisabled in interface IDisable@Component.PropertySetter(value="disabled", defaultValue="false", description="True if the component is disabled.") public void setDisabled(boolean disabled)
IDisablesetDisabled in interface IDisabledisabled - The new disabled state.@Component.PropertyGetter(value="visible", description="The visibility state of the component.") public boolean isVisible()
@Component.PropertySetter(value="visible", defaultValue="true", description="The visibility state of the component.") public void setVisible(boolean visible)
visible - The visibility state of the component.@Component.PropertyGetter(value="tabindex", description="The tab index for the component.") public int getTabindex()
@Component.PropertySetter(value="tabindex", defaultValue="0", description="The tab index for the component.") public void setTabindex(int tabindex)
tabindex - The tab index.@Component.PropertyGetter(value="dragid", description="A space-delimited list of drag id\'s associated with this component.") public String getDragid()
@Component.PropertySetter(value="dragid", description="A space-delimited list of drag id\'s associated with this component.") public void setDragid(String dragid)
dragid - A space-delimited list of drag id's to be associated with this component. A
non-empty value enables dragging of the component. A dragged component may be
dropped upon a target component whose drop id(s) matches at least one of the drag
id's. A drag id value of "*" will match any drop id.@Component.PropertyGetter(value="dropid", description="A space-delimited list of drop id\'s associated with this component.") public String getDropid()
@Component.PropertySetter(value="dropid", description="A space-delimited list of drop id\'s associated with this component.") public void setDropid(String dropid)
dropid - A space-delimited list of drop id's to be associated with this component. A
non-empty value enables this component to act as a drop target. A dragged
component may be dropped upon a target component whose drop id(s) matches at least
one of the dragged component's drag id's. A drop id value of "*" will match any
drag id.@Component.PropertyGetter(value="context", description="The popup component that will appear when right-clicking on this component.") public Popup getContext()
@Component.PropertySetter(value="context", defer=true, description="The popup component that will appear when right-clicking on this component.") public void setContext(Popup context)
context - The popup component that will appear when right-clicking on this component.@Component.PropertyGetter(value="popup", description="The popup component that will appear when hovering over this component.") public Popup getPopup()
@Component.PropertySetter(value="popup", defer=true, description="The popup component that will appear when hovering over this component.") public void setPopup(Popup popup)
popup - The popup component that will appear when hovering over this component.protected void afterRemoveChild(BaseComponent child)
afterRemoveChild in class BaseComponentchild - The removed child.BaseComponent.afterRemoveChild(org.fujion.component.BaseComponent)@Component.PropertyGetter(value="keycapture", description="The list of key codes to be captured.") public String getKeycapture()
KeyCode.normalizeKeyCapture(java.lang.String) for formatting details).@Component.PropertySetter(value="keycapture", description="The list of key codes to be captured.") public void setKeycapture(String keycapture)
keycapture - List of key codes to be captured (see
KeyCode.normalizeKeyCapture(java.lang.String) for formatting details).public void scrollIntoView()
public BaseUIComponent getFirstVisibleChild(boolean recurse)
recurse - If true, all descendant levels are also searched using a breadth first
strategy.public <T extends BaseUIComponent> T getFirstVisibleChild(Class<T> clazz, boolean recurse)
T - The child class.clazz - The child class to consider.recurse - If true, all descendant levels are also searched using a breadth first
strategy.protected void onDestroyTracked(BaseComponent comp)
onDestroyTracked in class BaseComponentcomp - The tracked component.BaseComponent.onDestroyTracked(org.fujion.component.BaseComponent)public void print()
public void print(PrintOptions options)
options - Print options.Copyright © 2018 Fujion Framework. All rights reserved.