Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.widgets.tree
Class TreeEditor

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.gwtext.client.widgets.Component
                  com.gwtext.client.widgets.Editor
                      com.gwtext.client.widgets.tree.TreeEditor

All Implemented Interfaces:
  com.google.gwt.user.client.EventListener, Observable

    public class TreeEditor

extends Editor

A support class that allows you to make the nodes of a TreePanel editable. To do this, create an instance of TreeEditor passing the TreePanel and the `Field` that you'd like to use when the user double clicks on a node to edit it. For example you can assing a `TextField` or `ComboBox`.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.gwtext.client.widgets.Component
`config, id`

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`TreeEditor(TreePanel treePanel)` Create an editable tree using the default Field editor.
`TreeEditor(TreePanel treePanel, Field field)` Create an editable tree using the specified Field as the editor.

Method Summary
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject treePanel, com.google.gwt.core.client.JavaScriptObject field)`
`void` | `setCls(java.lang.String cls)` CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")
`void` | `setEditDelay(int editDelay)` The edit delay in milliseconds.
`void` | `setMaxWidth(int maxWidth)` The maximum width in pixels of the editor field (defaults to 250).
`void` | `setShim(boolean shim)` True to shim the editor if selects/iframes could be displayed beneath it (defaults to false).
`void` | `startEdit(TreeNode node)` Starts the editing process and shows the editor.

Methods inherited from class com.gwtext.client.widgets.Editor
`addListener, cancelEdit, completeEdit, create, getConfigPrototype, getValue, getValueAsString, getXType, realign, setAlignment, setAutosize, setAutosize, setCancelOnEsc, setCompleteOnEnter, setConstrain, setField, setHideEl, setIgnoreNoChange, setRevertInvalid, setShadow, setShadow, setSize, setSwallowKeys, setUpdateEl, setValue, setValue, setValue, setValue, setValue, setValueRendered, setValueRendered, startEdit, startEdit, startEdit, startEdit`

Methods inherited from class com.gwtext.client.widgets.Component
`addClass, addClassCreated, addEvent, addEvents, addListener, addListener, addListener, addPlugin, addStyleDependentName, addStyleName, afterRender, beforeDestroy, check, checkExtVer, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, fireEvent, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getCls, getComponentJS, getConfig, getConfigAsString, getCtCls, getDisabledClass, getEl, getElement, getElement, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getTitle, getXTypes, hashCode, hide, initComponent, isCreated, isDisabled, isHidden, isRendered, isVisible, isXType, isXType, onDestroy, purgeListeners, removeClass, removeStyleDependentName, removeStyleName, render, render, render, render, render, render, resumeEvents, setApplyTo, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoEl, setAutoEl, setAutoShow, setCtCls, setDisabled, setDisabledClass, setEl, setEl, setElement, setHeight, setHideMode, setHideParent, setId, setRenderTo, setRenderToID, setStateEvents, setStateId, setStyle, setStyle, setStyleName, setStylePrimaryName, setTitle, setVisible, setWidth, show, suspendEvents, toString`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TreeEditor

    public TreeEditor(TreePanel treePanel)

  Create an editable tree using the default Field editor.

  Parameters:
    `treePanel` - the TreePanel

### TreeEditor

    public TreeEditor(TreePanel treePanel,
                      Field field)

  Create an editable tree using the specified Field as the editor.

  Parameters:
    `treePanel` - the TreePanel
    `field` - the field

Method Detail

### create

    protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject treePanel,
                                                                 com.google.gwt.core.client.JavaScriptObject field)

### startEdit

    public void startEdit(TreeNode node)

  Starts the editing process and shows the editor.

  Parameters:
    `node` - the tree node to edit

### setCls

    public void setCls(java.lang.String cls)

  CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")

  Overrides:
    `setCls` in class `Component`
  Parameters:
    `cls` - the CSS class

### setMaxWidth

    public void setMaxWidth(int maxWidth)

  The maximum width in pixels of the editor field (defaults to 250). Note that if the maxWidth would exceed the containing tree element's size, it will be automatically limited for you to the container width, taking scroll and client offsets into account prior to each edit.

  Parameters:
    `maxWidth` - the max width

### setEditDelay

    public void setEditDelay(int editDelay)

  The edit delay in milliseconds. Default is 350ms.

  Parameters:
    `editDelay` - the edit delay

### setShim

    public void setShim(boolean shim)

  True to shim the editor if selects/iframes could be displayed beneath it (defaults to false).

  Parameters:
    `shim` - true to shim

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD