| com.gwtext.client.widgets.Component com.gwtext.client.widgets.Editor
All known Subclasses: com.gwtext.client.widgets.tree.TreeEditor,
Editor | public class Editor extends Component (Code) | | A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
|
Constructor Summary | |
public | Editor() | public | Editor(Field field) Create a new Editor. | public | Editor(JavaScriptObject jsObj) |
Method Summary | |
native public void | addListener(EditorListener listener) Add an Editor listener. | native public void | cancelEdit(boolean remainVisible) Cancels the editing process and hides the editor without persisting any changes. | native public void | completeEdit(boolean remainVisible) Ends the editing process, persists the changed value to the underlying field, and hides the editor. | native protected JavaScriptObject | create(JavaScriptObject config) | protected JavaScriptObject | getConfigPrototype() | native public Object | getValue() Gets the data value of the editor. | native public String | getValueAsString() Gets the data value of the editor. | public String | getXType() | native public void | realign() Realigns the editor to the bound field based on the current alignment config value. | public void | setAlignment(String anchorPosition) The position to align to. | public void | setAutosize(boolean autosize) True for the editor to automatically adopt the size of the underlying field. | public void | setAutosize(String autosize) Set to "width" to adopt the width only, or "height" to adopt the height only. | public void | setCancelOnEsc(boolean cancelOnEsc) True to cancel the edit when the escape key is pressed (defaults to false). | public void | setCompleteOnEnter(boolean completeOnEnter) True to complete the edit when the enter key is pressed (defaults to false). | public void | setConstrain(boolean constrain) True to constrain the editor to the viewport. | public void | setField(Field field) | public void | setHideEl(boolean hideEl) False to keep the bound element visible while the editor is displayed (defaults to true). | public void | setIgnoreNoChange(boolean ignoreNoChange) True to skip the the edit completion process (no save, no events fired) if the user completes an edit and the
value has not changed (defaults to false). | public void | setRevertInvalid(boolean revertInvalid) True to automatically revert the field value and cancel the edit when the user completes an edit and the field validation fails (defaults to true). | public void | setShadow(boolean shadow) | public void | setShadow(String shadow) | native public void | setSize(int width, int height) Sets the height and width of this editor. | public void | setSwallowKeys(boolean swallowKeys) Handle the keydown/keypress events so they don't propagate (defaults to true). | public void | setUpdateEl(boolean updateEl) True to update the innerHTML of the bound element when the update completes (defaults to false). | public void | setValue(String value) The data value of the underlying field (defaults to ""). | public void | setValue(Date value) The data value of the underlying field (defaults to ""). | public void | setValue(long value) The data value of the underlying field (defaults to ""). | public void | setValue(double value) The data value of the underlying field (defaults to ""). | public void | setValue(boolean value) The data value of the underlying field (defaults to ""). | native public void | setValueRendered(boolean value) Sets the data value of the editor. | native public void | setValueRendered(double value) Sets the data value of the editor. | native public void | setValueRendered(long value) Sets the data value of the editor. | native public void | setValueRendered(Date value) Sets the data value of the editor. | native public void | startEdit(String id) Starts the editing process and shows the editor. | native public void | startEdit(String id, String value) Starts the editing process and shows the editor.
Parameters: id - the element ID to edit Parameters: value - A value to initialize the editor with. | native public void | startEdit(Element el) Starts the editing process and shows the editor. | native public void | startEdit(Element el, String value) Starts the editing process and shows the editor.
Parameters: el - the element to edit Parameters: value - A value to initialize the editor with. |
Editor | public Editor(Field field)(Code) | | Create a new Editor.
Parameters: field - the editor field |
Editor | public Editor(JavaScriptObject jsObj)(Code) | | |
addListener | native public void addListener(EditorListener listener)(Code) | | Add an Editor listener.
Parameters: listener - the listener |
cancelEdit | native public void cancelEdit(boolean remainVisible)(Code) | | Cancels the editing process and hides the editor without persisting any changes. The field value will be reverted to the original starting value.
Parameters: remainVisible - override the default behavior and keep the editor visible after cancel (defaults to false) |
completeEdit | native public void completeEdit(boolean remainVisible)(Code) | | Ends the editing process, persists the changed value to the underlying field, and hides the editor.
Parameters: remainVisible - Override the default behavior and keep the editor visible after edit (defaults to false) |
create | native protected JavaScriptObject create(JavaScriptObject config)(Code) | | |
getConfigPrototype | protected JavaScriptObject getConfigPrototype()(Code) | | |
getValue | native public Object getValue()(Code) | | Gets the data value of the editor.
the editor value |
getValueAsString | native public String getValueAsString()(Code) | | Gets the data value of the editor.
the value as String |
realign | native public void realign()(Code) | | Realigns the editor to the bound field based on the current alignment config value.
|
setAlignment | public void setAlignment(String anchorPosition)(Code) | | The position to align to.
Parameters: anchorPosition - defaults to "c-c" |
setAutosize | public void setAutosize(boolean autosize) throws IllegalStateException(Code) | | True for the editor to automatically adopt the size of the underlying field.
Parameters: autosize - true to autosize throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setAutosize | public void setAutosize(String autosize) throws IllegalStateException(Code) | | Set to "width" to adopt the width only, or "height" to adopt the height only.
Parameters: autosize - the autosize value throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setCancelOnEsc | public void setCancelOnEsc(boolean cancelOnEsc)(Code) | | True to cancel the edit when the escape key is pressed (defaults to false).
Parameters: cancelOnEsc - cancel on escape |
setCompleteOnEnter | public void setCompleteOnEnter(boolean completeOnEnter)(Code) | | True to complete the edit when the enter key is pressed (defaults to false).
Parameters: completeOnEnter - true to complete on enter |
setConstrain | public void setConstrain(boolean constrain) throws IllegalStateException(Code) | | True to constrain the editor to the viewport.
Parameters: constrain - true to constrain the editor to the viewport throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setHideEl | public void setHideEl(boolean hideEl)(Code) | | False to keep the bound element visible while the editor is displayed (defaults to true).
Parameters: hideEl - true to hide element |
setIgnoreNoChange | public void setIgnoreNoChange(boolean ignoreNoChange)(Code) | | True to skip the the edit completion process (no save, no events fired) if the user completes an edit and the
value has not changed (defaults to false). Applies only to string values - edits for other data types will never be ignored.
Parameters: ignoreNoChange - true to ingnore no change |
setRevertInvalid | public void setRevertInvalid(boolean revertInvalid)(Code) | | True to automatically revert the field value and cancel the edit when the user completes an edit and the field validation fails (defaults to true).
Parameters: revertInvalid - true to rever invalid field value |
setShadow | public void setShadow(boolean shadow) throws IllegalStateException(Code) | | "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "frame")
Parameters: shadow - the shadow setting throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setShadow | public void setShadow(String shadow) throws IllegalStateException(Code) | | "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "frame")
Parameters: shadow - the shadow setting throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setSize | native public void setSize(int width, int height)(Code) | | Sets the height and width of this editor.
Parameters: width - the new width Parameters: height - the new height |
setSwallowKeys | public void setSwallowKeys(boolean swallowKeys) throws IllegalStateException(Code) | | Handle the keydown/keypress events so they don't propagate (defaults to true).
Parameters: swallowKeys - true to swallow keys throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setUpdateEl | public void setUpdateEl(boolean updateEl)(Code) | | True to update the innerHTML of the bound element when the update completes (defaults to false).
Parameters: updateEl - true to update the element |
setValue | public void setValue(String value)(Code) | | The data value of the underlying field (defaults to "").
Parameters: value - the field value |
setValue | public void setValue(Date value)(Code) | | The data value of the underlying field (defaults to "").
Parameters: value - the field value |
setValue | public void setValue(long value)(Code) | | The data value of the underlying field (defaults to "").
Parameters: value - the field value |
setValue | public void setValue(double value)(Code) | | The data value of the underlying field (defaults to "").
Parameters: value - the field value |
setValue | public void setValue(boolean value)(Code) | | The data value of the underlying field (defaults to "").
Parameters: value - the field value |
setValueRendered | native public void setValueRendered(boolean value)(Code) | | Sets the data value of the editor.
Parameters: value - the value |
setValueRendered | native public void setValueRendered(double value)(Code) | | Sets the data value of the editor.
Parameters: value - the value |
setValueRendered | native public void setValueRendered(long value)(Code) | | Sets the data value of the editor.
Parameters: value - the value |
setValueRendered | native public void setValueRendered(Date value)(Code) | | Sets the data value of the editor.
Parameters: value - the value |
startEdit | native public void startEdit(String id)(Code) | | Starts the editing process and shows the editor.
Parameters: id - the element ID to edit |
startEdit | native public void startEdit(String id, String value)(Code) | | Starts the editing process and shows the editor.
Parameters: id - the element ID to edit Parameters: value - A value to initialize the editor with. If a value is not provided, it defaults to the innerHTML of the element. |
startEdit | native public void startEdit(Element el)(Code) | | Starts the editing process and shows the editor.
Parameters: el - the element to edit |
startEdit | native public void startEdit(Element el, String value)(Code) | | Starts the editing process and shows the editor.
Parameters: el - the element to edit Parameters: value - A value to initialize the editor with. If a value is not provided, it defaults to the innerHTML of the element. |
Methods inherited from com.gwtext.client.widgets.Component | public void addClass(String cls)(Code)(Java Doc) native public void addClassCreated(String cls)(Code)(Java Doc) native public void addEvent(String events)(Code)(Java Doc) public void addEvents(String[] events)(Code)(Java Doc) protected void addListener(String event, JavaScriptObject fn)(Code)(Java Doc) native public void addListener(String event, Function funtion)(Code)(Java Doc) native protected void addListener(ComponentListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected void beforeDestroy()(Code)(Java Doc) protected void check() throws IllegalStateException(Code)(Java Doc) public Component cloneComponent()(Code)(Java Doc) public Component cloneComponent(Component overrides)(Code)(Java Doc) native protected JavaScriptObject cloneConfig(JavaScriptObject config)(Code)(Java Doc) abstract protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc) native public void destroy()(Code)(Java Doc) public void disable()(Code)(Java Doc) public void enable()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void error(String message) throws IllegalStateException(Code)(Java Doc) public void focus()(Code)(Java Doc) native public void focus(boolean selectText)(Code)(Java Doc) native public void focus(boolean selectText, int delay)(Code)(Java Doc) public Element getApplyTo()(Code)(Java Doc) protected String getAttribute(String attribute)(Code)(Java Doc) protected boolean getAttributeAsBoolean(String attribute)(Code)(Java Doc) protected float getAttributeAsFloat(String attribute)(Code)(Java Doc) protected int getAttributeAsInt(String attribute)(Code)(Java Doc) protected JavaScriptObject getAttributeAsJavaScriptObject(String attribute)(Code)(Java Doc) public boolean getAutoShow()(Code)(Java Doc) public String getCls()(Code)(Java Doc) native protected static JavaScriptObject getComponentJS(String id)(Code)(Java Doc) public JavaScriptObject getConfig()(Code)(Java Doc) abstract protected JavaScriptObject getConfigPrototype()(Code)(Java Doc) public String getCtCls()(Code)(Java Doc) public String getDisabledClass()(Code)(Java Doc) native public ExtElement getEl()(Code)(Java Doc) native protected Element getElement(JavaScriptObject jsObj)(Code)(Java Doc) public Element getElement()(Code)(Java Doc) public String getHideMode()(Code)(Java Doc) public boolean getHideParent()(Code)(Java Doc) public String getId()(Code)(Java Doc) native public String getItemId()(Code)(Java Doc) public JavaScriptObject getJsObj()(Code)(Java Doc) public int getOffsetHeight()(Code)(Java Doc) public int getOffsetWidth()(Code)(Java Doc) public JavaScriptObject getOrCreateJsObj()(Code)(Java Doc) native public Container getOwnerContainer()(Code)(Java Doc) public Element getRenderTo()(Code)(Java Doc) public String[] getStateEvents()(Code)(Java Doc) public String getStateId()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) protected Element getStyleElement()(Code)(Java Doc) public String getTitle()(Code)(Java Doc) public String getXType()(Code)(Java Doc) native public String getXTypes()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void hide()(Code)(Java Doc) protected void initComponent()(Code)(Java Doc) public boolean isCreated()(Code)(Java Doc) public boolean isDisabled()(Code)(Java Doc) public boolean isHidden()(Code)(Java Doc) native public boolean isRendered()(Code)(Java Doc) native public boolean isVisible()(Code)(Java Doc) native public boolean isXType(String xtype)(Code)(Java Doc) native public boolean isXType(String xtype, boolean shallow)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) native public void removeClass(String cls)(Code)(Java Doc) native public void render(String id)(Code)(Java Doc) native public void render(String id, String position)(Code)(Java Doc) native public void render(String id, int position)(Code)(Java Doc) native public void render(Element element)(Code)(Java Doc) native public void render(Element element, String position)(Code)(Java Doc) native public void render(Element element, int position)(Code)(Java Doc) public void setApplyTo(Element element) throws IllegalStateException(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, long value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, double value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, Date value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) public void setAutoEl(String autoEl)(Code)(Java Doc) public void setAutoShow(boolean autoShow) throws IllegalStateException(Code)(Java Doc) public void setCls(String cls)(Code)(Java Doc) public void setCtCls(String ctCls) throws IllegalStateException(Code)(Java Doc) public void setDisabled(boolean disabled)(Code)(Java Doc) public void setDisabledClass(String disabledClass)(Code)(Java Doc) public void setEl(Element el) throws IllegalStateException(Code)(Java Doc) public void setEl(String elementID) throws IllegalStateException(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setHideMode(String hideMode)(Code)(Java Doc) public void setHideParent(boolean hideParent) throws IllegalStateException(Code)(Java Doc) final public void setId(String id) throws IllegalStateException(Code)(Java Doc) public void setRenderTo(Element elem) throws IllegalStateException(Code)(Java Doc) public void setStateEvents(String[] stateEvents) throws IllegalStateException(Code)(Java Doc) public void setStateId(String stateId) throws IllegalStateException(Code)(Java Doc) public void setStyle(String style) throws IllegalStateException(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc)
|
|
|