public class TextButton extends Button
Button that only contains text| Modifier and Type | Field and Description |
|---|---|
protected TextButtonRenderNode |
renderNode |
effects, styleId, visibility, zIndex| Constructor and Description |
|---|
TextButton()
Constructor.
|
TextButton(java.lang.String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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 |
java.lang.String |
getText()
Returns the text of this
TextButton |
HorizontalAlignment |
getTextAlignment()
Returns the
HorizontalAlignment of the button's text |
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 |
setText(java.lang.String text)
Sets the text of this
TextButton |
void |
setTextAlignment(HorizontalAlignment textAlignment)
Sets the
HorizontalAlignment of the button's text |
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, getElementById, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabledclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListenerprotected TextButtonRenderNode renderNode
public TextButton()
TextButtonpublic TextButton(java.lang.String id)
id - The unique ID for this TextButtonpublic java.lang.String getText()
TextButtonString by defaultpublic void setText(java.lang.String text)
TextButtontext - A non-null Stringpublic 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 setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public void syncWithRenderNode()
UiElementUiElement and RenderNodesyncWithRenderNode in class UiElementpublic HorizontalAlignment getTextAlignment()
HorizontalAlignment of the button's textHorizontalAlignment.CENTER by defaultpublic void setTextAlignment(HorizontalAlignment textAlignment)
HorizontalAlignment of the button's texttextAlignment - The text alignment