|
||||||||||
| 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>
T - the field's data typepublic abstract class Field<T>
Base class for all cell based fields.
| Nested Class Summary | |
|---|---|
static interface |
Field.FieldStyles
|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Method Summary | |
|---|---|
HandlerRegistration |
addInvalidHandler(InvalidEvent.InvalidHandler handler)
Adds a InvalidEvent.InvalidHandler handler for InvalidEvent
events. |
void |
addValidator(Validator<T> validator)
|
HandlerRegistration |
addValidHandler(ValidEvent.ValidHandler handler)
Adds a ValidEvent handler for ValidEvent
events. |
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<T> handler)
|
void |
clear()
Clears the value from the field. |
void |
clearInvalid()
Clear any invalid styles / messages for this field. |
void |
finishEditing()
|
void |
flush()
|
void |
forceInvalid(String msg)
Forces the field to be invalid using the given error message. |
FieldCell<T> |
getCell()
Get the Cell wrapped by this widget. |
ErrorHandler |
getErrorSupport()
Returns the field's error support instance. |
String |
getName()
Gets the field's name. |
boolean |
getValidateOnBlur()
Returns true if the value is validate on blur. |
int |
getValidationDelay()
Returns the field's validation delay in milliseconds. |
List<Validator<T>> |
getValidators()
Returns the field's validators. |
boolean |
isAutoValidate()
Returns true if the field value is validated on each key press. |
boolean |
isEditing()
|
boolean |
isReadOnly()
Returns the read only state. |
boolean |
isValid()
Returns whether or not the field value is currently valid. |
boolean |
isValid(boolean preventMark)
Returns whether or not the field value is currently valid. |
void |
markInvalid(String msg)
Marks this field as invalid. |
void |
onBrowserEvent(Event event)
|
void |
onPropertyChange(String... paths)
|
void |
removeValidator(Validator<T> validator)
Removes the validator. |
void |
reset()
Resets the current field value to the originally loaded value and clears any validation messages. |
void |
setAutoValidate(boolean autoValidate)
Sets whether the value is validated on each key press (defaults to false). |
void |
setDelegate(EditorDelegate<T> delegate)
|
void |
setErrorSupport(ErrorHandler error)
Sets the field's error support instance. |
void |
setName(String name)
|
void |
setOriginalValue(T value)
|
void |
setReadOnly(boolean readOnly)
Sets the field's read only state. |
void |
setValidateOnBlur(boolean validateOnBlur)
Sets whether the field should validate when it loses focus (defaults to true). |
void |
setValidationDelay(int validationDelay)
Sets length of time in milliseconds after user input begins until validation is initiated (defaults to 250). |
void |
setValue(T value,
boolean fireEvents,
boolean redraw)
Sets this object's value and optionally redraw the widget. |
void |
showErrors(List<EditorError> errors)
|
boolean |
validate()
Validates the field value. |
boolean |
validate(boolean preventMark)
Validates the field value. |
| Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent |
|---|
getElement, getKeyProvider, getValue, redraw, setValue, 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.user.client.ui.IsWidget |
|---|
asWidget |
| Methods inherited from interface com.google.gwt.user.client.TakesValue |
|---|
getValue, setValue |
| Methods inherited from interface com.google.gwt.user.client.ui.HasValue |
|---|
getValue, setValue, setValue |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.editor.client.ValueAwareEditor |
|---|
setValue |
| Method Detail |
|---|
public HandlerRegistration addInvalidHandler(InvalidEvent.InvalidHandler handler)
InvalidEvent.HasInvalidHandlersInvalidEvent.InvalidHandler handler for InvalidEvent
events.
addInvalidHandler in interface InvalidEvent.HasInvalidHandlershandler - the handler
public void addValidator(Validator<T> validator)
public HandlerRegistration addValidHandler(ValidEvent.ValidHandler handler)
ValidEvent.HasValidHandlersValidEvent handler for ValidEvent
events.
addValidHandler in interface ValidEvent.HasValidHandlershandler - the handler
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
addValueChangeHandler in interface HasValueChangeHandlers<T>addValueChangeHandler in class CellComponent<T>public void clear()
clear in interface IsField<T>public void clearInvalid()
clearInvalid in interface IsField<T>public void finishEditing()
public void flush()
flush in interface ValueAwareEditor<T>public void forceInvalid(String msg)
clearInvalid() must be called to clear the error.
Also, no other validation logic will execute.
msg - the error textpublic FieldCell<T> getCell()
CellComponentCell wrapped by this widget.
getCell in class CellComponent<T>Cell being wrappedpublic ErrorHandler getErrorSupport()
public String getName()
getName in interface HasNamepublic boolean getValidateOnBlur()
public int getValidationDelay()
public List<Validator<T>> getValidators()
public boolean isAutoValidate()
public boolean isEditing()
public boolean isReadOnly()
true if read only, otherwise falsepublic boolean isValid()
public boolean isValid(boolean preventMark)
IsField
isValid in interface IsField<T>preventMark - true for silent validation (no invalid event and field
is not marked invalid)
public void markInvalid(String msg)
forceInvalid(String)
msg - the validation messagepublic void onBrowserEvent(Event event)
onBrowserEvent in interface EventListeneronBrowserEvent in class CellComponent<T>public void onPropertyChange(String... paths)
onPropertyChange in interface ValueAwareEditor<T>public void removeValidator(Validator<T> validator)
validator - the validator to removepublic void reset()
IsField
reset in interface IsField<T>public void setAutoValidate(boolean autoValidate)
autoValidate - true to validate on each key presspublic void setDelegate(EditorDelegate<T> delegate)
setDelegate in interface HasEditorDelegate<T>public void setErrorSupport(ErrorHandler error)
error - the error supportpublic void setName(String name)
setName in interface HasNamepublic void setOriginalValue(T value)
public void setReadOnly(boolean readOnly)
readOnly - the read only statepublic void setValidateOnBlur(boolean validateOnBlur)
validateOnBlur - true to validate on blur, otherwise falsepublic void setValidationDelay(int validationDelay)
validationDelay - the delay in milliseconds
public void setValue(T value,
boolean fireEvents,
boolean redraw)
CellComponentValueChangeEvent when
fireEvents is true and the new value does not equal the existing value.
Redraws the widget when redraw is true and the new value does not equal the
existing value.
setValue in class CellComponent<T>value - the object's new valuefireEvents - fire events if true and value is newredraw - redraw the widget if true and value is newpublic void showErrors(List<EditorError> errors)
showErrors in interface HasEditorErrors<T>public boolean validate()
true if valid, otherwise falsepublic boolean validate(boolean preventMark)
validate in interface IsField<T>preventMark - true to not mark the field valid and fire invalid event
when invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||