public class TextButton extends Button
Modifier and Type | Field and Description |
---|---|
protected Label |
label |
asyncRemoveAll, children, renderNode
deferredLayout, 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, setEnabled
add, 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, syncWithUpdate
addEffectListener, 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, syncWithRender
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addHoverListener, getId, invokeBeginHover, invokeEndHover, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListener
protected Label label
public TextButton()
TextButton
public TextButton(java.lang.String id)
id
- The unique ID for this TextButton
public 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()
TextButton
String
by defaultpublic void setText(java.lang.String text)
TextButton
text
- A non-null String
public 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()