Class ValueBoxEditor<T>
java.lang.Object
com.google.gwt.editor.client.adapters.TakesValueEditor<T>
com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T>
- Type Parameters:
T
- the type of value to be edited
- All Implemented Interfaces:
Editor<T>
,HasEditorDelegate<T>
,LeafValueEditor<T>
,TakesValue<T>
Adapts the
ValueBoxBase
interface to the Editor framework. This
adapter uses ValueBoxBase.getValueOrThrow()
to report parse errors to
the Editor framework.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor
Editor.Ignore, Editor.Path
-
Constructor Summary
ModifierConstructorDescriptionprotected
ValueBoxEditor
(ValueBoxBase<T> peer) Constructs a new ValueBoxEditor that adapts aValueBoxBase
peer instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns theEditorDelegate
for this instance.getValue()
static <T> ValueBoxEditor
<T> of
(ValueBoxBase<T> valueBox) Returns a new TakesValueEditor that adapts aValueBoxBase
instance.void
setDelegate
(EditorDelegate<T> delegate) Sets theEditorDelegate
for this instance.void
Sets the value.Methods inherited from class com.google.gwt.editor.client.adapters.TakesValueEditor
of
-
Constructor Details
-
ValueBoxEditor
Constructs a new ValueBoxEditor that adapts aValueBoxBase
peer instance.- Parameters:
peer
- aValueBoxBase
instance of type T
-
-
Method Details
-
of
Returns a new TakesValueEditor that adapts aValueBoxBase
instance.- Parameters:
valueBox
- aValueBoxBase
instance to adapt- Returns:
- a ValueBoxEditor instance of the same type as the
adapted
ValueBoxBase
instance
-
getDelegate
Returns theEditorDelegate
for this instance.- Returns:
- an
EditorDelegate
, ornull
- See Also:
-
getValue
CallsValueBoxBase.getValueOrThrow()
. If aParseException
is thrown, it will be available throughEditorError.getUserData()
.- Specified by:
getValue
in interfaceTakesValue<T>
- Overrides:
getValue
in classTakesValueEditor<T>
- Returns:
- a value of type T
- See Also:
-
setDelegate
Sets theEditorDelegate
for this instance. This method is only called by the driver.- Specified by:
setDelegate
in interfaceHasEditorDelegate<T>
- Parameters:
delegate
- anEditorDelegate
, ornull
- See Also:
-
setValue
Description copied from interface:TakesValue
Sets the value.- Specified by:
setValue
in interfaceTakesValue<T>
- Overrides:
setValue
in classTakesValueEditor<T>
- Parameters:
value
- a value object of type V- See Also:
-