|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.sencha.gxt.widget.core.client.Component
com.sencha.gxt.widget.core.client.cell.CellComponent<T>
com.sencha.gxt.widget.core.client.form.Field<T>
com.sencha.gxt.widget.core.client.form.ValueBaseField<T>
T - the field typepublic abstract class ValueBaseField<T>
Abstract base class for fields that have a single value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.form.Field |
|---|
Field.FieldStyles |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.HasDirection |
|---|
HasDirection.Direction |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Method Summary | |
|---|---|
HandlerRegistration |
addChangeHandler(ChangeHandler handler)
|
HandlerRegistration |
addKeyDownHandler(KeyDownHandler handler)
|
HandlerRegistration |
addKeyPressHandler(KeyPressHandler handler)
|
HandlerRegistration |
addKeyUpHandler(KeyUpHandler handler)
|
HandlerRegistration |
addParseErrorHandler(ParseErrorEvent.ParseErrorHandler handler)
Adds a ParseErrorEvent.ParseErrorHandler handler for ParseErrorEvent
events. |
ValueBaseInputCell<T> |
getCell()
Get the Cell wrapped by this widget. |
T |
getCurrentValue()
Returns the field's current value. |
int |
getCursorPos()
Gets the current position of the cursor (this also serves as the beginning of the text selection). |
HasDirection.Direction |
getDirection()
|
DirectionEstimator |
getDirectionEstimator()
|
java.lang.String |
getEmptyText()
Returns the field's empty text. |
PropertyEditor<T> |
getPropertyEditor()
Returns the field's property editor. |
java.lang.String |
getSelectedText()
Gets the text currently selected within this text box. |
int |
getSelectionLength()
Gets the length of the current text selection. |
java.lang.String |
getText()
Gets this object's text. |
T |
getValueOrThrow()
Return the parsed value, or null if the field is empty. |
boolean |
isAllowBlank()
Returns the field's allow blank state. |
boolean |
isClearValueOnParseError()
Returns true if the current value is cleared on a parse error. |
boolean |
isCurrentValid()
Returns the valid state of the current value. |
boolean |
isCurrentValid(boolean preventMark)
Returns the valid state of the current value. |
boolean |
isSelectOnFocus()
Returns the select of focus state. |
void |
select(int start,
int length)
Selects text in the field. |
void |
selectAll()
Selects all the text. |
void |
setAllowBlank(boolean allowBlank)
Sets whether a field is valid when its value length = 0 (default to true). |
void |
setClearValueOnParseError(boolean clearValueOnParseError)
True to clear the current value when a parse error occurs (defaults to true). |
void |
setCursorPos(int pos)
Sets the cursor position. |
void |
setDirection(HasDirection.Direction direction)
Sets the directionality for a widget. |
void |
setDirectionEstimator(boolean enabled)
Toggles on / off direction estimation. |
void |
setDirectionEstimator(DirectionEstimator directionEstimator)
Sets the {link DirectionEstimator} object. |
void |
setEmptyText(java.lang.String emptyText)
Sets the default text to display in an empty field (defaults to null). |
void |
setId(java.lang.String id)
Sets the component's id. |
void |
setPropertyEditor(PropertyEditor<T> propertyEditor)
Sets the field's property editor which is used to translate typed values to string, and string values back to typed values. |
void |
setReadOnly(boolean readOnly)
Sets the field's read only state. |
void |
setSelectionRange(int pos,
int length)
Sets the range of text to be selected. |
void |
setSelectOnFocus(boolean selectOnFocus)
True to automatically select any existing field text when the field receives input focus (defaults to false). |
void |
setText(java.lang.String text)
Sets the underlying DOM field's value directly, bypassing validation. |
void |
setValue(T value)
Sets this object's value without firing any events. |
boolean |
validateCurrent(boolean preventMark)
|
| Methods inherited from class com.sencha.gxt.widget.core.client.form.Field |
|---|
addInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clear, clearInvalid, finishEditing, flush, forceInvalid, getErrorSupport, getName, getValidateOnBlur, getValidationDelay, getValidators, isAutoValidate, isEditing, isReadOnly, isValid, isValid, markInvalid, onBrowserEvent, onPropertyChange, removeValidator, reset, setAutoValidate, setDelegate, setErrorSupport, setName, setOriginalValue, setValidateOnBlur, setValidationDelay, setValue, showErrors, validate, validate |
| Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent |
|---|
getElement, getKeyProvider, getValue, redraw, setValue |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.user.client.ui.IsWidget |
|---|
asWidget |
| Methods inherited from interface com.google.gwt.user.client.TakesValue |
|---|
getValue |
| Methods inherited from interface com.google.gwt.user.client.ui.HasValue |
|---|
getValue, setValue |
| Method Detail |
|---|
public HandlerRegistration addChangeHandler(ChangeHandler handler)
addChangeHandler in interface HasChangeHandlerspublic HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
addKeyDownHandler in interface HasKeyDownHandlerspublic HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
addKeyPressHandler in interface HasKeyPressHandlerspublic HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
addKeyUpHandler in interface HasKeyUpHandlerspublic HandlerRegistration addParseErrorHandler(ParseErrorEvent.ParseErrorHandler handler)
ParseErrorEvent.HasParseErrorHandlersParseErrorEvent.ParseErrorHandler handler for ParseErrorEvent
events.
addParseErrorHandler in interface ParseErrorEvent.HasParseErrorHandlershandler - the handler
public ValueBaseInputCell<T> getCell()
CellComponentCell wrapped by this widget.
getCell in class Field<T>Cell being wrappedpublic T getCurrentValue()
public int getCursorPos()
public HasDirection.Direction getDirection()
getDirection in interface HasDirectionpublic DirectionEstimator getDirectionEstimator()
getDirectionEstimator in interface HasDirectionEstimatorpublic java.lang.String getEmptyText()
public PropertyEditor<T> getPropertyEditor()
public java.lang.String getSelectedText()
public int getSelectionLength()
public java.lang.String getText()
getText in interface HasText
public T getValueOrThrow()
throws java.text.ParseException
java.text.ParseException - if the value cannot be parsedpublic boolean isAllowBlank()
public boolean isClearValueOnParseError()
public boolean isCurrentValid()
public boolean isCurrentValid(boolean preventMark)
public boolean isSelectOnFocus()
public void select(int start,
int length)
start - the index where the selection should start.length - the number of characters to be selectedpublic void selectAll()
public void setAllowBlank(boolean allowBlank)
allowBlank - true to allow blanks, false otherwisepublic void setClearValueOnParseError(boolean clearValueOnParseError)
clearValueOnParseError - true to clean the value on parse errorpublic void setCursorPos(int pos)
pos - the new cursor positionpublic void setDirection(HasDirection.Direction direction)
setDirection in interface HasDirectiondirection - RTL if the directionality should be set to right-to-left,
LTR if the directionality should be set to left-to-right DEFAULT
if the directionality should not be explicitly setpublic void setDirectionEstimator(boolean enabled)
setDirectionEstimator in interface HasDirectionEstimatorenabled - Whether to enable direction estimation. If true, sets the
DirectionEstimator object to a default DirectionEstimator.public void setDirectionEstimator(DirectionEstimator directionEstimator)
setDirectionEstimator in interface HasDirectionEstimatordirectionEstimator - The {code DirectionEstimator} to be set. null
means turning off direction estimation.public void setEmptyText(java.lang.String emptyText)
emptyText - the empty textpublic void setId(java.lang.String id)
Component
setId in class Componentid - the idpublic void setPropertyEditor(PropertyEditor<T> propertyEditor)
propertyEditor - the property editorpublic void setReadOnly(boolean readOnly)
Field
setReadOnly in class Field<T>readOnly - the read only state
public void setSelectionRange(int pos,
int length)
pos - the position of the first character to be selectedlength - the number of characters to be selectedpublic void setSelectOnFocus(boolean selectOnFocus)
selectOnFocus - true to focuspublic void setText(java.lang.String text)
setValue(T).
setText in interface HasTexttext - the textpublic void setValue(T value)
setValue in interface ValueAwareEditor<T>setValue in interface TakesValue<T>setValue in interface HasValue<T>setValue in class CellComponent<T>value - the parsed valuepublic boolean validateCurrent(boolean preventMark)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||