T
- the type of value to be editedpublic class ValueBoxEditor<T> extends TakesValueEditor<T> implements HasEditorDelegate<T>
ValueBoxBase
interface to the Editor framework. This
adapter uses ValueBoxBase.getValueOrThrow()
to report parse errors to
the Editor framework.Editor.Ignore, Editor.Path
Modifier | Constructor and Description |
---|---|
protected |
ValueBoxEditor(ValueBoxBase<T> peer)
Constructs a new ValueBoxEditor that adapts a
ValueBoxBase peer
instance. |
Modifier and Type | Method and Description |
---|---|
EditorDelegate<T> |
getDelegate()
Returns the
EditorDelegate for this instance. |
T |
getValue()
|
static <T> ValueBoxEditor<T> |
of(ValueBoxBase<T> valueBox)
Returns a new TakesValueEditor that adapts a
ValueBoxBase
instance. |
void |
setDelegate(EditorDelegate<T> delegate)
Sets the
EditorDelegate for this instance. |
void |
setValue(T value)
Sets the value.
|
of
protected ValueBoxEditor(ValueBoxBase<T> peer)
ValueBoxBase
peer
instance.peer
- a ValueBoxBase
instance of type Tpublic static <T> ValueBoxEditor<T> of(ValueBoxBase<T> valueBox)
ValueBoxBase
instance.valueBox
- a ValueBoxBase
instance to adaptValueBoxBase
instancepublic EditorDelegate<T> getDelegate()
EditorDelegate
for this instance.EditorDelegate
, or null
setDelegate(EditorDelegate)
public T getValue()
ValueBoxBase.getValueOrThrow()
. If a ParseException
is thrown, it will be available through
EditorError.getUserData()
.getValue
in interface TakesValue<T>
getValue
in class TakesValueEditor<T>
setValue(Object)
public void setDelegate(EditorDelegate<T> delegate)
EditorDelegate
for this instance. This method is only
called by the driver.setDelegate
in interface HasEditorDelegate<T>
delegate
- an EditorDelegate
, or null
getDelegate()
public void setValue(T value)
TakesValue
setValue
in interface TakesValue<T>
setValue
in class TakesValueEditor<T>
value
- a value object of type VTakesValue.getValue()
Copyright © 2018. All rights reserved.