public class ContentButton extends Button
Button that allows custom inner content| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<UiElement> |
children |
protected ContentButtonRenderNode |
renderNode |
effects, styleId, visibility, zIndex| Constructor and Description |
|---|
ContentButton()
Constructor.
|
ContentButton(java.lang.String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(UiElement element)
Adds a
UiElement to this ContentButton |
void |
attach(ParentRenderNode<?,?> parentRenderNode)
Attaches a
RenderNode for this element to a parent
RenderNode |
void |
detach(ParentRenderNode<?,?> parentRenderNode)
Detaches this element's
RenderNode from a parent
RenderNode |
UiElement |
getElementById(java.lang.String id)
Searches the UI for a
UiElement with a given id. |
int |
getTotalChildren()
Returns the total number of child elements for this element
|
boolean |
remove(UiElement element)
Removes a
UiElement from this ContentButton |
void |
setLayout(java.lang.String layout)
Sets the current layout for this
Button |
void |
setStyleId(java.lang.String styleId)
Sets the style if for this
UiElement |
void |
setVisibility(Visibility visibility)
Sets the current
Visibility of this UiElement |
void |
setZIndex(int zIndex)
Sets the Z index of this
UiElement. |
void |
syncWithRenderNode()
Syncs data between the
UiElement and RenderNode |
addActionListener, getLayout, isEnabled, notifyActionListenersOfBeginEvent, notifyActionListenersOfEndEvent, removeActionListener, setEnabledaddEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabledclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListenerprotected final java.util.List<UiElement> children
protected ContentButtonRenderNode renderNode
public ContentButton()
ContentButtonpublic ContentButton(java.lang.String id)
id - The unique ID of the ContentButtonpublic void add(UiElement element)
UiElement to this ContentButtonelement - The UiElement to be addedpublic boolean remove(UiElement element)
UiElement from this ContentButtonelement - The UiElement to be removedContentButton contained the UiElementpublic void attach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode for this element to a parent
RenderNodeattach in class UiElementparentRenderNode - The parent RenderNode to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElementRenderNode from a parent
RenderNodedetach in class UiElementparentRenderNode - The parent RenderNode to detach frompublic void setVisibility(Visibility visibility)
UiElementVisibility of this UiElementsetVisibility in class UiElementvisibility - The Visibility to setpublic void setStyleId(java.lang.String styleId)
UiElementUiElementsetStyleId in class UiElementstyleId - The style id to setpublic void syncWithRenderNode()
UiElementUiElement and RenderNodesyncWithRenderNode in class UiElementpublic void setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public void setLayout(java.lang.String layout)
ButtonButtonpublic UiElement getElementById(java.lang.String id)
UiElementUiElement with a given id. Warning: This
can be an expensive operation for complex UIs. It is recommended you
cache results.getElementById in class UiElementid - The UiElement identifier to search forUiElement with the given idpublic int getTotalChildren()