/** * Returns a {@link TakesValueEditor} backed by the ValueListBox. */ public TakesValueEditor<List<T>> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
/** * Returns a new ValueEditor that holds the given value. * * @param value a data object of type T * @return a SimpleEditor instance holding the given value */ public static <T> SimpleEditor<T> of(T value) { return new SimpleEditor<T>(value); }
/** * Creates a temporary sub-Editor to use for traversal. * * @return an {@link Editor} of type E */ public E createEditorForTraversal() { return editorSource.createEditorForTraversal(); }
@Override public IndexedEditor<T> create(int index) { assert index >= 0; return new IndexedEditor<T>(index, data); }
@Override public void setValue(Q value) { this.value = value; push(); }
/** * Returns a new ValueEditor that modifies the given {@link TakesValue} peer * instance. * * @param peer a {@link TakesValue} instance * @return a TakesValueEditor instance of the same type as its peer */ public static <T> TakesValueEditor<T> of(TakesValue<T> peer) { return new TakesValueEditor<T>(peer); }
/** * Create a HasDataEditor backed by a HasData. * * @param <T> the type of data to be edited * @param data the HasData that is displaying the data * @return a instance of a HasDataEditor */ public static <T> HasDataEditor<T> of(HasData<T> data) { return new HasDataEditor<T>(data); }
/** * Prevent subclassing. */ private HasDataEditor(HasData<T> data) { super(new HasDataEditorSource<T>(data)); } }
/** * Create a ListEditor backed by an EditorSource. * * @param <T> The type of data being managed * @param <E> The type of Editor * @param source the EditorSource which will create sub-Editors * @return a new instance of ListEditor */ public static <T, E extends Editor<? super T>> ListEditor<T, E> of( EditorSource<E> source) { return new ListEditor<T, E>(source); }
/** * Construct an OptionalFieldEditor backed by the given sub-Editor. * * @param <T> The type of data being managed * @param <E> The type of Editor * @param subEditor the sub-Editor that will be attached to the Editor * hierarchy * @return a new instance of OptionalFieldEditor */ public static <T, E extends Editor<? super T>> OptionalFieldEditor<T, E> of( E subEditor) { return new OptionalFieldEditor<T, E>(subEditor); }
public LeafValueEditor<String> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
/** * Returns a {@link TakesValueEditor} backed by the ValueListBox. */ public TakesValueEditor<T> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
/** * Returns a {@link TakesValueEditor} backed by the SuggestBox. */ public LeafValueEditor<String> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
public LeafValueEditor<T> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
public LeafValueEditor<Boolean> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
public LeafValueEditor<Boolean> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
@Override public LeafValueEditor<Boolean> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
@Override public LeafValueEditor<C> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
/** * Returns a {@link TakesValueEditor} backed by the ValuePicker. */ public LeafValueEditor<T> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }
/** * Returns a {@link TakesValueEditor} backed by the DatePicker. */ public LeafValueEditor<Date> asEditor() { if (editor == null) { editor = TakesValueEditor.of(this); } return editor; }