public class TextButton extends Button
| Modifier and Type | Field and Description |
|---|---|
protected Label |
label |
asyncRemoveAll, children, renderNodedeferredLayout, deferredRender, deferredUpdate, effects, height, styleId, visibility, width, x, y, zIndex| Constructor and Description |
|---|
TextButton()
Constructor.
|
TextButton(float x,
float y,
float width,
float height)
Constructor
|
TextButton(java.lang.String id)
Constructor
|
TextButton(java.lang.String id,
float x,
float y,
float width,
float height)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Label |
getLabel()
Returns the backing label for the button
|
java.lang.String |
getText()
Returns the text of this
TextButton |
HorizontalAlignment |
getTextAlignment()
Returns the
HorizontalAlignment of the button's text |
void |
setText(java.lang.String text)
Sets the text of this
TextButton |
void |
setTextAlignment(HorizontalAlignment textAlignment)
Sets the
HorizontalAlignment of the button's text |
addActionListener, createRenderNode, getStyleRule, isEnabled, notifyActionListenersOfBeginEvent, notifyActionListenersOfEndEvent, removeActionListener, setEnabledadd, add, attach, detach, get, getChild, getElementById, getFlexLayout, getRenderHeight, getRenderWidth, getRenderX, getRenderY, getTotalChildren, invokeBeginHover, invokeEndHover, isFlexLayout, isInitialLayoutOccurred, isInitialUpdateOccurred, isOverflowClipped, isRenderNodeDirty, remove, remove, removeAll, removeAllAsync, setFlex, setFlexLayout, setHeightFlex, setOverflowClipped, setRenderNodeDirty, setStyleId, setVisibility, setWidthFlex, setXFlex, setXYFlex, setYFlex, setZIndex, shrinkToContents, shrinkToContents, syncWithUpdateaddEffectListener, addHoverListener, addNodeStateListener, alignAbove, alignBelow, alignEdgeToEdge, alignLeftOf, alignRightOf, applyEffect, deferUntilLayout, deferUntilLayout, deferUntilRender, deferUntilRender, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, deferUntilUpdate, equals, getContentHeight, getContentWidth, getHeight, getId, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleId, getVisibility, getWidth, getX, getY, getZIndex, hashCode, isDebugEnabled, isInitialised, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, notifyNodeStateListeners, removeEffectListener, removeHoverListener, removeNodeStateListener, set, setContentHeight, setContentWidth, setDebugEnabled, setHeight, setHeightToContentHeightOf, setHeightToHeightOf, setWidth, setWidthToContentWidthOf, setWidthToWidthOf, setX, setXY, setY, snapTo, snapTo, syncWithLayout, syncWithRenderclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddHoverListener, getId, invokeBeginHover, invokeEndHover, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListenerprotected Label label
public TextButton()
TextButtonpublic TextButton(java.lang.String id)
id - The unique ID for this TextButtonpublic TextButton(float x,
float y,
float width,
float height)
x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic TextButton(java.lang.String id,
float x,
float y,
float width,
float height)
id - The unique ID for this element (if null an ID will be generated)x - The x coordinate of this element relative to its parenty - The y coordinate of this element relative to its parentwidth - The width of this elementheight - The height of this elementpublic java.lang.String getText()
TextButtonString by defaultpublic void setText(java.lang.String text)
TextButtontext - A non-null Stringpublic HorizontalAlignment getTextAlignment()
HorizontalAlignment of the button's textHorizontalAlignment.CENTER by defaultpublic void setTextAlignment(HorizontalAlignment textAlignment)
HorizontalAlignment of the button's texttextAlignment - The text alignmentpublic Label getLabel()