public class TextBox extends UiElement implements Actionable
UiElement. Can optionally function as a password field.| Modifier and Type | Field and Description |
|---|---|
protected TextBoxRenderNode |
renderNode |
effects, styleId, visibility, zIndex| Constructor and Description |
|---|
TextBox()
Constructor.
|
TextBox(java.lang.String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener listener) |
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 |
getLayout() |
java.lang.String |
getValue()
Returns the text value entered into this
TextBox |
boolean |
isEnabled() |
boolean |
isPasswordField()
Returns if this
TextBox is a password field |
void |
notifyActionListenersOfBeginEvent() |
void |
notifyActionListenersOfEndEvent() |
void |
removeActionListener(ActionListener listener) |
void |
setEnabled(boolean enabled) |
void |
setLayout(java.lang.String layout) |
void |
setPasswordField(boolean passwordField)
Sets if this
TextBox is a password field |
void |
setStyleId(java.lang.String styleId)
Sets the style if for this
UiElement |
void |
setValue(java.lang.String value)
Sets the text value entered into this
TextBox |
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 |
addEffectListener, 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 TextBoxRenderNode renderNode
public TextBox()
TextBoxpublic TextBox(java.lang.String id)
id - The unique ID for this TextBoxpublic 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 syncWithRenderNode()
UiElementUiElement and RenderNodesyncWithRenderNode in class UiElementpublic java.lang.String getValue()
TextBoxString by defaultpublic void setValue(java.lang.String value)
TextBoxvalue - A non-null Stringpublic boolean isPasswordField()
TextBox is a password fieldpublic void setPasswordField(boolean passwordField)
TextBox is a password fieldpasswordField - True if characters should be hidden by * characterspublic void notifyActionListenersOfBeginEvent()
notifyActionListenersOfBeginEvent in interface Actionablepublic void notifyActionListenersOfEndEvent()
notifyActionListenersOfEndEvent in interface Actionablepublic void addActionListener(ActionListener listener)
addActionListener in interface Actionablepublic void removeActionListener(ActionListener listener)
removeActionListener in interface Actionablepublic boolean isEnabled()
isEnabled in interface Actionablepublic void setEnabled(boolean enabled)
setEnabled in interface Actionablepublic void setZIndex(int zIndex)
UiElementUiElement. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public java.lang.String getLayout()
public void setLayout(java.lang.String layout)