public class

ValueBoxEditor

extends TakesValueEditor<T>
implements HasEditorDelegate<T>
java.lang.Object
   ↳ com.google.gwt.editor.client.adapters.TakesValueEditor<T>
     ↳ com.google.gwt.editor.ui.client.adapters.ValueBoxEditor<T>

Class Overview

Adapts the ValueBoxBase interface to the Editor framework. This adapter uses getValueOrThrow() to report parse errors to the Editor framework.

Summary

Protected Constructors
ValueBoxEditor(ValueBoxBase<T> peer)
Constructs a new ValueBoxEditor that adapts a ValueBoxBase peer instance.
Public Methods
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)
[Expand]
Inherited Methods
From class com.google.gwt.editor.client.adapters.TakesValueEditor
From class java.lang.Object
From interface com.google.gwt.editor.client.HasEditorDelegate
From interface com.google.gwt.user.client.TakesValue

Protected Constructors

protected ValueBoxEditor (ValueBoxBase<T> peer)

Constructs a new ValueBoxEditor that adapts a ValueBoxBase peer instance.

Parameters
peer a ValueBoxBase instance of type T

Public Methods

public EditorDelegate<T> getDelegate ()

Returns the EditorDelegate for this instance.

Returns

public T getValue ()

Calls getValueOrThrow(). If a ParseException is thrown, it will be available through EditorError.getUserData().

Returns
  • a value of type T
See Also

public static ValueBoxEditor<T> of (ValueBoxBase<T> valueBox)

Returns a new TakesValueEditor that adapts a ValueBoxBase instance.

Parameters
valueBox a ValueBoxBase instance to adapt
Returns
  • a ValueBoxEditor instance of the same type as the adapted ValueBoxBase instance

public void setDelegate (EditorDelegate<T> delegate)

Sets the EditorDelegate for this instance. This method is only called by the driver.

Parameters
delegate an EditorDelegate, or null
See Also

public void setValue (T value)