public class ContentButton extends Button
Button
that allows custom inner contentModifier 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, setEnabled
addEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabled
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListener
protected final java.util.List<UiElement> children
protected ContentButtonRenderNode renderNode
public ContentButton()
ContentButton
public ContentButton(java.lang.String id)
id
- The unique ID of the ContentButton
public void add(UiElement element)
UiElement
to this ContentButton
element
- The UiElement
to be addedpublic boolean remove(UiElement element)
UiElement
from this ContentButton
element
- The UiElement
to be removedContentButton
contained the UiElement
public void attach(ParentRenderNode<?,?> parentRenderNode)
UiElement
RenderNode
for this element to a parent
RenderNode
attach
in class UiElement
parentRenderNode
- The parent RenderNode
to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElement
RenderNode
from a parent
RenderNode
detach
in class UiElement
parentRenderNode
- The parent RenderNode
to detach frompublic void setVisibility(Visibility visibility)
UiElement
Visibility
of this UiElement
setVisibility
in class UiElement
visibility
- The Visibility
to setpublic void setStyleId(java.lang.String styleId)
UiElement
UiElement
setStyleId
in class UiElement
styleId
- The style id to setpublic void syncWithRenderNode()
UiElement
UiElement
and RenderNode
syncWithRenderNode
in class UiElement
public void setZIndex(int zIndex)
UiElement
UiElement
. 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)
Button
Button
public UiElement getElementById(java.lang.String id)
UiElement
UiElement
with a given id. Warning: This
can be an expensive operation for complex UIs. It is recommended you
cache results.getElementById
in class UiElement
id
- The UiElement
identifier to search forUiElement
with the given idpublic int getTotalChildren()