/** * Creates a temporary sub-Editor to use for traversal. * * @return an {@link Editor} of type E */ public E createEditorForTraversal() { return editorSource.createEditorForTraversal(); }
/** * Creates a temporary sub-Editor to use for traversal. * <p> * For backwards compatibility with GWT 2.5.0 and earlier, the default implementation calls * {@code create(0)} and {@link #dispose(Editor) disposes} the editor right away. * * @return an {@link Editor} of type E * @see ListEditor#createEditorForTraversal() * @see com.google.gwt.editor.client.EditorContext#traverseSyntheticCompositeEditor */ public E createEditorForTraversal() { E toReturn = create(0); dispose(toReturn); return toReturn; }
void detach() { for (int i = 0, j = editors.size(); i < j; i++) { chain.detach(editors.get(i)); editorSource.dispose(editors.get(i)); } }
/** * Create multiple Editors. This method may be optionally overridden to * provide a more efficient means of creating Editors in bulk. * * @param count the number of Editors desired * @param index the position at which the new Editors should be displayed * @return a List of {@link Editor}s of type E */ public List<E> create(int count, int index) { assert index >= 0; List<E> toReturn = new ArrayList<E>(count); for (int i = 0; i < count; i++) { toReturn.add(create(index + i)); } return toReturn; }
/** * Creates a temporary sub-Editor to use for traversal. * <p> * For backwards compatibility with GWT 2.5.0 and earlier, the default implementation calls * {@code create(0)} and {@link #dispose(Editor) disposes} the editor right away. * * @return an {@link Editor} of type E * @see ListEditor#createEditorForTraversal() * @see com.google.gwt.editor.client.EditorContext#traverseSyntheticCompositeEditor */ public E createEditorForTraversal() { E toReturn = create(0); dispose(toReturn); return toReturn; }
void detach() { for (int i = 0, j = editors.size(); i < j; i++) { chain.detach(editors.get(i)); editorSource.dispose(editors.get(i)); } }
/** * Must be called after construction. This is a two-phase initialization so * that ListEditor can assign its list field before any sub-editors might call * {@link ListEditor#getList()} */ void attach() { editors.addAll(editorSource.create(workingCopy.size(), 0)); for (int i = 0, j = workingCopy.size(); i < j; i++) { chain.attach(workingCopy.get(i), editors.get(i)); } }
@Override public T remove(final int index) { final T toReturn = workingCopy.remove(index); final E subEditor = editors.remove(index); editorSource.dispose(subEditor); final int size = editors.size(); for (int i = index; i < size; i++) { editorSource.setIndex(editors.get(i), i); } chain.detach(subEditor); return toReturn; }
/** * Creates a temporary sub-Editor to use for traversal. * <p> * For backwards compatibility with GWT 2.5.0 and earlier, the default implementation calls * {@code create(0)} and {@link #dispose(Editor) disposes} the editor right away. * * @return an {@link Editor} of type E * @see ListEditor#createEditorForTraversal() * @see com.google.gwt.editor.client.EditorContext#traverseSyntheticCompositeEditor */ public E createEditorForTraversal() { E toReturn = create(0); dispose(toReturn); return toReturn; }
void detach() { for (int i = 0, j = editors.size(); i < j; i++) { chain.detach(editors.get(i)); editorSource.dispose(editors.get(i)); } }
/** * Create multiple Editors. This method may be optionally overridden to * provide a more efficient means of creating Editors in bulk. * * @param count the number of Editors desired * @param index the position at which the new Editors should be displayed * @return a List of {@link Editor}s of type E */ public List<E> create(int count, int index) { assert index >= 0; List<E> toReturn = new ArrayList<E>(count); for (int i = 0; i < count; i++) { toReturn.add(create(index + i)); } return toReturn; }
/** * Creates a temporary sub-Editor to use for traversal. * * @return an {@link Editor} of type E */ public E createEditorForTraversal() { return editorSource.createEditorForTraversal(); }
void detach() { final int size = editors.size(); for (int i = 0; i < size; i++) { chain.detach(editors.get(i)); editorSource.dispose(editors.get(i)); } }
/** * Create multiple Editors. This method may be optionally overridden to * provide a more efficient means of creating Editors in bulk. * * @param count the number of Editors desired * @param index the position at which the new Editors should be displayed * @return a List of {@link Editor}s of type E */ public List<E> create(int count, int index) { assert index >= 0; List<E> toReturn = new ArrayList<E>(count); for (int i = 0; i < count; i++) { toReturn.add(create(index + i)); } return toReturn; }
/** * Creates a temporary sub-Editor to use for traversal. * * @return an {@link Editor} of type E */ public E createEditorForTraversal() { return editorSource.createEditorForTraversal(); }