T - the type of data being editedpublic abstract class AbstractDecorator<T>
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.editor.client.HasEditorErrors<T>, com.google.gwt.editor.client.IsEditor<com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T>>, com.google.gwt.user.client.TakesValue<T>, com.google.gwt.user.client.ui.HasValue<T>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.user.client.ui.Focusable
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractDecorator.Resources
A ClientBundle that provides images and decoratorStyle sheets for the decorator.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.google.gwt.user.client.ui.SimplePanel |
contents
content panel.
|
| Constructor and Description |
|---|
AbstractDecorator(ErrorPanelLocationEnum errorLocation)
Constructs a Decorator.
|
AbstractDecorator(ErrorPanelLocationEnum errorLocation,
AbstractDecorator.Resources resource)
Constructs a Decorator.
|
AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget)
Constructs a Decorator using a
Widget widget with error location. |
AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget,
ErrorPanelLocationEnum errorLocation)
Constructs a Decorator using a
Widget widget with error location. |
AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget,
ErrorPanelLocationEnum errorLocation,
AbstractDecorator.Resources decoratorResource)
Constructs a Decorator using a
Widget widget with error location and style sheet. |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler phandler) |
com.google.gwt.event.shared.HandlerRegistration |
addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler pkeyUpHandler) |
protected void |
addValueChangeHandler(com.google.gwt.event.logical.shared.HasValueChangeHandlers<T> pwidget)
add a change handler to clear error state on value change.
|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> phandler) |
com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T> |
asEditor()
Returns the associated
ValueBoxEditor. |
void |
clearErrors()
clear errors.
|
protected boolean |
editorErrorMatches(com.google.gwt.editor.client.EditorError perror)
Checks if a error belongs to this widget.
|
protected static AbstractDecorator.Resources |
getDefaultResources()
get default resource, if not set, create one.
|
int |
getTabIndex() |
T |
getValue() |
com.google.gwt.user.client.ui.Widget |
getWidget()
get the widget.
|
boolean |
isFocusOnError()
check if focus on error is active.
|
void |
setAccessKey(char pkey) |
void |
setChildWidget(com.google.gwt.user.client.TakesValue<T> pwidget)
Set the widget that the EditorPanel will display.
|
void |
setEditor(ExtendedValueBoxEditor<T> peditor)
Sets the associated
ValueBoxEditor. |
void |
setFocus(boolean pfocused) |
void |
setFocusOnError(boolean pfocusOnError)
set focus on error flag, if it's true, the widget get's the focus if validation finds an error.
|
void |
setTabIndex(int pindex) |
void |
setValue(T pvalue) |
void |
setValue(T pvalue,
boolean pfireEvents) |
void |
showErrors(List<com.google.gwt.editor.client.EditorError> errors)
The default implementation will display, but not consume, received errors whose
getEditor() method returns the Editor passed into
setEditor(de.knightsoftnet.validators.client.decorators.ExtendedValueBoxEditor<T>). |
claimElement, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringprotected final com.google.gwt.user.client.ui.SimplePanel contents
public AbstractDecorator(ErrorPanelLocationEnum errorLocation, AbstractDecorator.Resources resource)
errorLocation - location of the error textresource - resource with css informationpublic AbstractDecorator(ErrorPanelLocationEnum errorLocation)
errorLocation - location of the error textpublic AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget,
ErrorPanelLocationEnum errorLocation,
AbstractDecorator.Resources decoratorResource)
Widget widget with error location and style sheet.pwidget - the widgeterrorLocation - location of the error textdecoratorResource - resource with css informationpublic AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget,
ErrorPanelLocationEnum errorLocation)
Widget widget with error location.pwidget - the widgeterrorLocation - location of the error textpublic AbstractDecorator(com.google.gwt.user.client.ui.Widget pwidget)
Widget widget with error location.pwidget - the widgetprotected static AbstractDecorator.Resources getDefaultResources()
@UiChild(limit=1,
tagname="widget")
public void setChildWidget(com.google.gwt.user.client.TakesValue<T> pwidget)
setEditor(de.knightsoftnet.validators.client.decorators.ExtendedValueBoxEditor<T>).pwidget - a IsEditor widgetpublic final com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> phandler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>protected void addValueChangeHandler(com.google.gwt.event.logical.shared.HasValueChangeHandlers<T> pwidget)
pwidget - widget to set the handler topublic final void clearErrors()
public void showErrors(List<com.google.gwt.editor.client.EditorError> errors)
getEditor() method returns the Editor passed into
setEditor(de.knightsoftnet.validators.client.decorators.ExtendedValueBoxEditor<T>).showErrors in interface com.google.gwt.editor.client.HasEditorErrors<T>errors - a List of EditorError instancesprotected boolean editorErrorMatches(com.google.gwt.editor.client.EditorError perror)
perror - editor error to checkpublic final T getValue()
public final void setValue(T pvalue)
public final void setValue(T pvalue, boolean pfireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<T>public final void setTabIndex(int pindex)
setTabIndex in interface com.google.gwt.user.client.ui.Focusablepublic final int getTabIndex()
getTabIndex in interface com.google.gwt.user.client.ui.Focusablepublic final void setAccessKey(char pkey)
setAccessKey in interface com.google.gwt.user.client.ui.Focusablepublic final void setFocus(boolean pfocused)
setFocus in interface com.google.gwt.user.client.ui.Focusablepublic final com.google.gwt.user.client.ui.Widget getWidget()
getWidget in class com.google.gwt.user.client.ui.Compositepublic com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T> asEditor()
ValueBoxEditor.asEditor in interface com.google.gwt.editor.client.IsEditor<com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T>>ValueBoxEditor instancesetEditor(ExtendedValueBoxEditor)public final void setEditor(ExtendedValueBoxEditor<T> peditor)
ValueBoxEditor.peditor - a ValueBoxEditor instanceasEditor()public final boolean isFocusOnError()
public final void setFocusOnError(boolean pfocusOnError)
pfocusOnError - the focusOnError to setpublic final com.google.gwt.event.shared.HandlerRegistration addKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler phandler)
addKeyPressHandler in interface com.google.gwt.event.dom.client.HasKeyPressHandlerspublic com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler pkeyUpHandler)
addKeyUpHandler in interface com.google.gwt.event.dom.client.HasKeyUpHandlersCopyright © 2015–2016. All rights reserved.