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>
public class ValueBoxEditor<T> extends TakesValueEditor<T> implements HasEditorDelegate<T>
Adapts theValueBoxBaseinterface to the Editor framework. This adapter usesValueBoxBase.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
Constructors Modifier Constructor Description protectedValueBoxEditor(ValueBoxBase<T> peer)Constructs a new ValueBoxEditor that adapts aValueBoxBasepeer instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EditorDelegate<T>getDelegate()Returns theEditorDelegatefor this instance.TgetValue()static <T> ValueBoxEditor<T>of(ValueBoxBase<T> valueBox)Returns a new TakesValueEditor that adapts aValueBoxBaseinstance.voidsetDelegate(EditorDelegate<T> delegate)Sets theEditorDelegatefor this instance.voidsetValue(T value)Sets the value.-
Methods inherited from class com.google.gwt.editor.client.adapters.TakesValueEditor
of
-
-
-
-
Constructor Detail
-
ValueBoxEditor
protected ValueBoxEditor(ValueBoxBase<T> peer)
Constructs a new ValueBoxEditor that adapts aValueBoxBasepeer instance.- Parameters:
peer- aValueBoxBaseinstance of type T
-
-
Method Detail
-
of
public static <T> ValueBoxEditor<T> of(ValueBoxBase<T> valueBox)
Returns a new TakesValueEditor that adapts aValueBoxBaseinstance.- Parameters:
valueBox- aValueBoxBaseinstance to adapt- Returns:
- a ValueBoxEditor instance of the same type as the
adapted
ValueBoxBaseinstance
-
getDelegate
public EditorDelegate<T> getDelegate()
Returns theEditorDelegatefor this instance.- Returns:
- an
EditorDelegate, ornull - See Also:
setDelegate(EditorDelegate)
-
getValue
public T getValue()
CallsValueBoxBase.getValueOrThrow(). If aParseExceptionis thrown, it will be available throughEditorError.getUserData().- Specified by:
getValuein interfaceTakesValue<T>- Overrides:
getValuein classTakesValueEditor<T>- Returns:
- a value of type T
- See Also:
setValue(Object)
-
setDelegate
public void setDelegate(EditorDelegate<T> delegate)
Sets theEditorDelegatefor this instance. This method is only called by the driver.- Specified by:
setDelegatein interfaceHasEditorDelegate<T>- Parameters:
delegate- anEditorDelegate, ornull- See Also:
getDelegate()
-
setValue
public void setValue(T value)
Description copied from interface:TakesValueSets the value.- Specified by:
setValuein interfaceTakesValue<T>- Overrides:
setValuein classTakesValueEditor<T>- Parameters:
value- a value object of type V- See Also:
TakesValue.getValue()
-
-