public class TextBox extends UiElement implements Actionable
UiElement
. Can optionally function as a password field.Modifier and Type | Field and Description |
---|---|
protected TextBoxRenderNode |
renderNode |
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 |
getHorizontalLayout()
Returns the current horizontal layout rules
|
java.lang.String |
getValue()
Returns the text value entered into this
TextBox |
java.lang.String |
getVerticalLayout()
Returns the current vertical layout rules
|
boolean |
isEnabled() |
boolean |
isPasswordField()
Returns if this
TextBox is a password field |
void |
notifyActionListenersOfBeginEvent(EventTrigger eventTrigger,
EventTriggerParams eventTriggerParams) |
void |
notifyActionListenersOfEndEvent(EventTrigger eventTrigger,
EventTriggerParams eventTriggerParams) |
void |
removeActionListener(ActionListener listener) |
void |
setEnabled(boolean enabled) |
void |
setHorizontalLayout(java.lang.String sizeRuleset)
Sets the current horizontal layout rules
|
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 |
setVerticalLayout(java.lang.String sizeRuleset)
Sets the current vertical layout rules
|
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, defer, defer, equals, getElementById, 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 TextBoxRenderNode renderNode
public TextBox()
TextBox
public TextBox(java.lang.String id)
id
- The unique ID for this TextBox
public void attach(ParentRenderNode<?,?> parentRenderNode)
UiElement
RenderNode
for this element to a parent
RenderNode
attach
in class UiElement
parentRenderNode
- The parent RenderNode
to attach topublic void detach(ParentRenderNode<?,?> parentRenderNode)
UiElement
RenderNode
from a parent
RenderNode
detach
in class UiElement
parentRenderNode
- The parent RenderNode
to detach frompublic void setVisibility(Visibility visibility)
UiElement
Visibility
of this UiElement
setVisibility
in class UiElement
visibility
- The Visibility
to setpublic void setStyleId(java.lang.String styleId)
UiElement
UiElement
setStyleId
in class UiElement
styleId
- The style id to setpublic void syncWithRenderNode()
UiElement
UiElement
and RenderNode
syncWithRenderNode
in class UiElement
public java.lang.String getValue()
TextBox
String
by defaultpublic void setValue(java.lang.String value)
TextBox
value
- A non-null String
public 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(EventTrigger eventTrigger, EventTriggerParams eventTriggerParams)
notifyActionListenersOfBeginEvent
in interface Actionable
public void notifyActionListenersOfEndEvent(EventTrigger eventTrigger, EventTriggerParams eventTriggerParams)
notifyActionListenersOfEndEvent
in interface Actionable
public void addActionListener(ActionListener listener)
addActionListener
in interface Actionable
public void removeActionListener(ActionListener listener)
removeActionListener
in interface Actionable
public boolean isEnabled()
isEnabled
in interface Actionable
public void setEnabled(boolean enabled)
setEnabled
in interface Actionable
public void setZIndex(int zIndex)
UiElement
UiElement
. Elements will be rendered on
different Z layers in ascending Z order (negatives values first, positive values last)public java.lang.String getHorizontalLayout()
public void setHorizontalLayout(java.lang.String sizeRuleset)
sizeRuleset
- public java.lang.String getVerticalLayout()
public void setVerticalLayout(java.lang.String sizeRuleset)
sizeRuleset
-