|
||||||||||
| 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.container.Container
com.sencha.gxt.widget.core.client.container.ResizeContainer
com.sencha.gxt.widget.core.client.container.SimpleContainer
com.sencha.gxt.widget.core.client.form.AdapterField<T>
public abstract class AdapterField<T>
| Nested Class Summary |
|---|
| 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.editor.client.Editor |
|---|
Editor.Ignore, Editor.Path |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
IndexedPanel.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
AdapterField(Widget widget)
|
|
| 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. |
void |
clear()
Clears the value from the field. |
void |
clearInvalid()
Clear any invalid styles / messages for this field. |
void |
disable()
Disable this widget. |
void |
enable()
Enable this widget. |
void |
forceInvalid(String msg)
Forces the field to be invalid using the given error message. |
ErrorHandler |
getErrorSupport()
Returns the field's error support instance. |
List<Validator<T>> |
getValidators()
Returns the field's validators. |
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 |
removeValidator(Validator<T> validator)
|
void |
reset()
Resets the current field value to the originally loaded value and clears any validation messages. |
void |
setDelegate(EditorDelegate<T> delegate)
|
void |
setErrorSupport(ErrorHandler error)
|
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.container.SimpleContainer |
|---|
add, add, getWidget, isResize, setResize, setWidget, setWidget |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer |
|---|
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.Container |
|---|
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove |
| 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 |
| Constructor Detail |
|---|
public AdapterField(Widget widget)
| 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 void clear()
clear in interface HasWidgetsclear in interface IsField<T>clear in class Containerpublic void clearInvalid()
clearInvalid in interface IsField<T>public void disable()
Component
disable in class Containerpublic void enable()
Component
enable in class Containerpublic void forceInvalid(String msg)
clearInvalid() must be called to clear the error.
Also, no other validation logic will execute.
msg - the error textpublic ErrorHandler getErrorSupport()
public List<Validator<T>> getValidators()
public 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)
Calling this will also register an error in the editor, if any.
msg - the validation messagepublic void removeValidator(Validator<T> validator)
public void reset()
reset in interface IsField<T>public void setDelegate(EditorDelegate<T> delegate)
setDelegate in interface HasEditorDelegate<T>public void setErrorSupport(ErrorHandler error)
public 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
true if valid, otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||