public class TextButton extends Button
Modifier and Type | Field and Description |
---|---|
protected Label |
label |
asyncAddQueue, asyncRemoveAll, asyncRemoveQueue, children, renderNode
Constructor and Description |
---|
TextButton()
Constructor.
|
TextButton(java.lang.String id)
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, isEnabled, notifyActionListenersOfBeginEvent, notifyActionListenersOfEndEvent, removeActionListener, setEnabled
add, add, addAsync, attach, detach, get, getElementById, getFlexDirection, getHorizontalLayout, getTotalChildren, getVerticalLayout, isOverflowClipped, remove, remove, removeAll, removeAllAsync, removeAsync, setFlexDirection, setHorizontalLayout, setOverflowClipped, setStyleId, setVerticalLayout, setVisibility, setZIndex, syncWithRenderNode
addEffectListener, addHoverListener, applyEffect, defer, defer, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, processDeferred, removeEffectListener, removeHoverListener, setDebugEnabled
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addHoverListener, getId, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeHoverListener
protected Label label
public TextButton()
TextButton
public TextButton(java.lang.String id)
id
- The unique ID for this TextButton
public 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()