|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.ui.core.Widget
qx.ui.basic.Terminator
qx.ui.form.TextField
public class TextField
An advanced wrapper for the HTML <input type=“text”>
tag.
It is used for textual user input.
Field Summary |
---|
Fields inherited from class qx.ui.core.Widget |
---|
AUTO |
Constructor Summary | |
---|---|
TextField()
|
|
TextField(java.lang.String value)
|
Method Summary | |
---|---|
void |
_afterAppear()
Apply _ieFirstInputFix() in the appear event of the widget. |
void |
_applyCursor(java.lang.String value,
java.lang.String old)
Applies changes of the property value of the property cursor . |
void |
_applyElement(java.lang.Object value,
java.lang.Object old)
Applies changes of the property value of the property element . |
void |
_applyEnabled(java.lang.Object value,
java.lang.Object old)
Apply the enabled property. |
void |
_applyFont(java.lang.Object value,
java.lang.Object old)
|
void |
_applyMaxLength(java.lang.Object value,
java.lang.Object old)
Apply the maxLength property. |
void |
_applyReadOnly(java.lang.Object value,
java.lang.Object old)
Apply the readOnly property. |
void |
_applySpellCheck(boolean value,
boolean old)
Applies changes of the property value of the property spellCheck . |
void |
_applyTextAlign(java.lang.Object value,
java.lang.Object old)
Applies changes of the property value of the property textAlign . |
void |
_applyTextColor(java.lang.Object value,
java.lang.Object old)
|
void |
_applyValue(java.lang.Object value,
java.lang.Object old)
Apply the value property |
void |
_changeInnerHeight(int value,
int old)
Changes the inner height of the text field. |
void |
_changeInnerWidth(int value,
int old)
Changes the inner width of the text field. |
java.lang.Integer |
_computePreferredInnerHeight()
Returns the preferred inner height of the widget. |
java.lang.Integer |
_computePreferredInnerWidth()
Returns the preferred inner width of the widget. |
void |
_ieFirstInputFix()
Fix IE’s input event for filled text fields |
void |
_onblur()
Blur event handler. |
void |
_onfocus()
Focus event handler. |
void |
_oninput()
Input event handler. |
void |
_ontabfocus()
Tab focus event handler |
void |
_postApply()
We could not use width/height = 100% because the outer elements could have paddings and borders which will break. |
void |
_renderCursor()
Renders the cursor using the styleProperty cursor directly. |
void |
_renderFont()
Renders the new font |
void |
_renderSpellCheck()
Applies the spell check to the DOM element. |
void |
_renderTextAlign()
Renders the text align using the styleProperty textAlign directly. |
void |
_renderTextColor()
Renders the color using the styleProperty color directly. |
void |
_styleFont(Font value)
Utility method to render the given font. |
void |
_styleTextColor(java.lang.String value)
Sync color to embedded input element |
void |
_syncFieldHeight()
Synchronizes the styleProperty width with
the current innerWidth |
void |
_syncFieldWidth()
Synchronizes the styleProperty width with
the current innerWidth |
void |
_visualizeBlur()
Overridden from Widget._visualizeFocus() : set the focus to the inputElement
and not to the parent div. |
void |
_visualizeFocus()
Overridden from Widget._visualizeFocus() : set the focus to the inputElement
and not to the parent div. |
java.lang.String |
getComputedValue()
Return the current value of the text field. |
java.lang.Object |
getInputElement()
Returns the inner input element. |
boolean |
getLiveUpdate()
Returns the (computed) value of the property liveUpdate . |
java.lang.Integer |
getMaxLength()
Returns the (computed) value of the property maxLength . |
boolean |
getReadOnly()
Returns the (computed) value of the property readOnly . |
int |
getSelectionLength()
Get the number of charaters in the current selection. |
int |
getSelectionStart()
Get the start index of the text selection in the field. |
java.lang.String |
getSelectionText()
Get the text value of the current selection. |
boolean |
getSpellCheck()
Returns the (computed) value of the property spellCheck . |
java.lang.Object |
getTextAlign()
Returns the (computed) value of the property textAlign . |
java.lang.Object |
getValidator()
Returns the (computed) value of the property validator . |
java.lang.Object |
getValue()
Returns the (computed) value of the property value . |
void |
initLiveUpdate(boolean arg)
Calls the apply method and dispatches the change event of the property liveUpdate
with the default value defined by the class developer. |
void |
initMaxLength(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property maxLength
with the default value defined by the class developer. |
void |
initReadOnly(boolean arg)
Calls the apply method and dispatches the change event of the property readOnly
with the default value defined by the class developer. |
void |
initSpellCheck(boolean arg)
Calls the apply method and dispatches the change event of the property spellCheck
with the default value defined by the class developer. |
void |
initTextAlign(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property textAlign
with the default value defined by the class developer. |
void |
initValidator(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property validator
with the default value defined by the class developer. |
void |
initValue(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property value
with the default value defined by the class developer. |
boolean |
isComputedValid()
Whether the current text of the text field returned by getComputedValue() is valid. |
boolean |
isLiveUpdate()
Check whether the (computed) value of the boolean property liveUpdate equals true . |
boolean |
isReadOnly()
Check whether the (computed) value of the boolean property readOnly equals true . |
boolean |
isSpellCheck()
Check whether the (computed) value of the boolean property spellCheck equals true . |
boolean |
isValid()
Whether the value of the value property is valid. |
void |
resetLiveUpdate()
Resets the user value of the property liveUpdate . |
void |
resetMaxLength()
Resets the user value of the property maxLength . |
void |
resetReadOnly()
Resets the user value of the property readOnly . |
void |
resetSpellCheck()
Resets the user value of the property spellCheck . |
void |
resetTextAlign()
Resets the user value of the property textAlign . |
void |
resetValidator()
Resets the user value of the property validator . |
void |
resetValue()
Resets the user value of the property value . |
void |
selectAll()
Select all text in the input field. |
void |
selectFromTo(int vStart,
int vEnd)
Select text within a given index range in the input field. |
void |
setLiveUpdate(boolean arg)
Sets the user value of the property liveUpdate . |
void |
setMaxLength(java.lang.Integer arg)
Sets the user value of the property maxLength . |
void |
setReadOnly(boolean arg)
Sets the user value of the property readOnly . |
void |
setSelectionLength(int vLength)
Set the length of the selection. |
void |
setSelectionStart(int vStart)
Set the start index of the text selection in the field. |
void |
setSelectionText(java.lang.String vText)
Set the text of the current selection. |
void |
setSpellCheck(boolean arg)
Sets the user value of the property spellCheck . |
void |
setTextAlign(java.lang.Object arg)
Sets the user value of the property textAlign . |
void |
setValidator(java.lang.Object arg)
Sets the user value of the property validator . |
void |
setValue(java.lang.Object arg)
Sets the user value of the property value . |
boolean |
toggleLiveUpdate()
Toggles the (computed) value of the boolean property liveUpdate . |
boolean |
toggleReadOnly()
Toggles the (computed) value of the boolean property readOnly . |
boolean |
toggleSpellCheck()
Toggles the (computed) value of the boolean property spellCheck . |
Methods inherited from class qx.ui.basic.Terminator |
---|
_computeBoxHeightFallback, _computeBoxWidthFallback, _isHeightEssential, _isWidthEssential, _layoutPost, _renderContent, renderPadding |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextField()
public TextField(java.lang.String value)
Method Detail |
---|
public void _afterAppear()
Apply _ieFirstInputFix()
in the appear event of the widget.
_afterAppear
in class Widget
public void _applyCursor(java.lang.String value, java.lang.String old)
Applies changes of the property value of the property cursor
.
For further details take a look at the property definition: _applyCursor(java.lang.String, java.lang.String)
.
_applyCursor
in class Widget
public void _applyElement(java.lang.Object value, java.lang.Object old)
Applies changes of the property value of the property element
.
For further details take a look at the property definition: _applyElement(java.lang.Object, java.lang.Object)
.
_applyElement
in class Widget
public void _applyEnabled(java.lang.Object value, java.lang.Object old)
Apply the enabled property.
_applyEnabled
in class Widget
public void _applyFont(java.lang.Object value, java.lang.Object old)
public void _applyMaxLength(java.lang.Object value, java.lang.Object old)
Apply the maxLength property.
public void _applyReadOnly(java.lang.Object value, java.lang.Object old)
Apply the readOnly property.
public void _applySpellCheck(boolean value, boolean old)
Applies changes of the property value of the property spellCheck
.
For further details take a look at the property definition: _applySpellCheck(boolean, boolean)
.
public void _applyTextAlign(java.lang.Object value, java.lang.Object old)
Applies changes of the property value of the property textAlign
.
For further details take a look at the property definition: _applyTextAlign(java.lang.Object, java.lang.Object)
.
public void _applyTextColor(java.lang.Object value, java.lang.Object old)
public void _applyValue(java.lang.Object value, java.lang.Object old)
Apply the value property
public void _changeInnerHeight(int value, int old)
Changes the inner height of the text field.
Calls the protected method _syncFieldHeight()
to
sync the inner height.
public void _changeInnerWidth(int value, int old)
Changes the inner width of the text field.
Calls the protected method _syncFieldWidth()
to
sync the inner width.
public java.lang.Integer _computePreferredInnerHeight()
Terminator
Returns the preferred inner height of the widget. This value is used by the layout managers to calculate the actual size of the widget.
_computePreferredInnerHeight
in class Terminator
public java.lang.Integer _computePreferredInnerWidth()
Terminator
Returns the preferred inner width of the widget. This value is used by the layout managers to calculate the actual size of the widget.
_computePreferredInnerWidth
in class Terminator
public void _ieFirstInputFix()
Fix IE’s input event for filled text fields
public void _onblur()
Blur event handler.
public void _onfocus()
Focus event handler.
public void _oninput()
Input event handler.
public void _ontabfocus()
Tab focus event handler
public void _postApply()
We could not use width/height = 100% because the outer elements could have paddings and borders which will break. We use the computed inner width/height instead
_postApply
in class Terminator
public void _renderCursor()
Renders the cursor using the styleProperty cursor
directly.
public void _renderFont()
Renders the new font
public void _renderSpellCheck()
Applies the spell check to the DOM element.
public void _renderTextAlign()
Renders the text align using the styleProperty textAlign
directly.
public void _renderTextColor()
Renders the color using the styleProperty color
directly.
public void _styleFont(Font value)
Utility method to render the given font. Calls the
_renderFont()
method.
public void _styleTextColor(java.lang.String value)
Sync color to embedded input element
public void _syncFieldHeight()
Synchronizes the styleProperty width
with
the current innerWidth
public void _syncFieldWidth()
Synchronizes the styleProperty width
with
the current innerWidth
public void _visualizeBlur()
Overridden from Widget._visualizeFocus()
: set the focus to the inputElement
and not to the parent div.
_visualizeBlur
in class Widget
public void _visualizeFocus()
Overridden from Widget._visualizeFocus()
: set the focus to the inputElement
and not to the parent div.
_visualizeFocus
in class Widget
public java.lang.String getComputedValue()
Return the current value of the text field. The computed values is
independent of the value of the liveUpdate
property.
public java.lang.Object getInputElement()
Returns the inner input element.
public boolean getLiveUpdate()
Returns the (computed) value of the property liveUpdate
.
For further details take a look at the property definition: liveUpdate
.
public java.lang.Integer getMaxLength()
Returns the (computed) value of the property maxLength
.
For further details take a look at the property definition: maxLength
.
public boolean getReadOnly()
Returns the (computed) value of the property readOnly
.
For further details take a look at the property definition: readOnly
.
public int getSelectionLength()
Get the number of charaters in the current selection.
public int getSelectionStart()
Get the start index of the text selection in the field.
public java.lang.String getSelectionText()
Get the text value of the current selection.
public boolean getSpellCheck()
Returns the (computed) value of the property spellCheck
.
For further details take a look at the property definition: spellCheck
.
public java.lang.Object getTextAlign()
Returns the (computed) value of the property textAlign
.
For further details take a look at the property definition: textAlign
.
public java.lang.Object getValidator()
Returns the (computed) value of the property validator
.
For further details take a look at the property definition: validator
.
public java.lang.Object getValue()
Returns the (computed) value of the property value
.
For further details take a look at the property definition: value
.
public void initLiveUpdate(boolean arg)
Calls the apply method and dispatches the change event of the property liveUpdate
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: liveUpdate
.
public void initMaxLength(java.lang.Integer arg)
Calls the apply method and dispatches the change event of the property maxLength
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: maxLength
.
public void initReadOnly(boolean arg)
Calls the apply method and dispatches the change event of the property readOnly
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: readOnly
.
public void initSpellCheck(boolean arg)
Calls the apply method and dispatches the change event of the property spellCheck
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: spellCheck
.
public void initTextAlign(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property textAlign
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: textAlign
.
public void initValidator(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property validator
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: validator
.
public void initValue(java.lang.Object arg)
Calls the apply method and dispatches the change event of the property value
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: value
.
public boolean isComputedValid()
Whether the current text of the text field returned by
getComputedValue()
is valid.
The validatore function (validator
) is used to
validate the text.
public boolean isLiveUpdate()
Check whether the (computed) value of the boolean property liveUpdate
equals true
.
For further details take a look at the property definition: liveUpdate
.
public boolean isReadOnly()
Check whether the (computed) value of the boolean property readOnly
equals true
.
For further details take a look at the property definition: readOnly
.
public boolean isSpellCheck()
Check whether the (computed) value of the boolean property spellCheck
equals true
.
For further details take a look at the property definition: spellCheck
.
public boolean isValid()
Whether the value of the value
property is valid.
The validatore function (validator
) is used to
validate the text.
public void resetLiveUpdate()
Resets the user value of the property liveUpdate
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: liveUpdate
.
public void resetMaxLength()
Resets the user value of the property maxLength
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: maxLength
.
public void resetReadOnly()
Resets the user value of the property readOnly
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: readOnly
.
public void resetSpellCheck()
Resets the user value of the property spellCheck
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: spellCheck
.
public void resetTextAlign()
Resets the user value of the property textAlign
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: textAlign
.
public void resetValidator()
Resets the user value of the property validator
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: validator
.
public void resetValue()
Resets the user value of the property value
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: value
.
public void selectAll()
Select all text in the input field.
public void selectFromTo(int vStart, int vEnd)
Select text within a given index range in the input field.
public void setLiveUpdate(boolean arg)
Sets the user value of the property liveUpdate
.
For further details take a look at the property definition: liveUpdate
.
public void setMaxLength(java.lang.Integer arg)
Sets the user value of the property maxLength
.
For further details take a look at the property definition: maxLength
.
public void setReadOnly(boolean arg)
Sets the user value of the property readOnly
.
For further details take a look at the property definition: readOnly
.
public void setSelectionLength(int vLength)
Set the length of the selection. The selection starts at the index specified by the
method setSelectionStart(int)
.
public void setSelectionStart(int vStart)
Set the start index of the text selection in the field.
public void setSelectionText(java.lang.String vText)
Set the text of the current selection.
public void setSpellCheck(boolean arg)
Sets the user value of the property spellCheck
.
For further details take a look at the property definition: spellCheck
.
public void setTextAlign(java.lang.Object arg)
Sets the user value of the property textAlign
.
For further details take a look at the property definition: textAlign
.
public void setValidator(java.lang.Object arg)
Sets the user value of the property validator
.
For further details take a look at the property definition: validator
.
public void setValue(java.lang.Object arg)
Sets the user value of the property value
.
For further details take a look at the property definition: value
.
public boolean toggleLiveUpdate()
Toggles the (computed) value of the boolean property liveUpdate
.
For further details take a look at the property definition: liveUpdate
.
public boolean toggleReadOnly()
Toggles the (computed) value of the boolean property readOnly
.
For further details take a look at the property definition: readOnly
.
public boolean toggleSpellCheck()
Toggles the (computed) value of the boolean property spellCheck
.
For further details take a look at the property definition: spellCheck
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |