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
Class Component

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

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

Direct Known Subclasses:
  BaseItem, BoxComponent, Button, ColorPalette, DatePicker, Editor

    public abstract class Component

extends com.google.gwt.user.client.ui.Widget
implements Observable

Base class for all Ext components. All subclasses of Component can automatically participate in the standard Ext component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/show and enable/disable behavior. All visual widgets that require rendering into a layout should subclass Component (or BoxComponent if managed box model handling is required).

Every component has a specific xtype. This is the list of all valid xtypes:

     xtype            Class
     -------------    ------------------
     box              BoxComponent
     button           Button
     colorpalette     ColorPalette
     component        Component
     container        Container
     cycle            CycleButton
     dataview         DataView
     datepicker       DatePicker
     editor           Editor
     editorgrid       EditorGridPanel
     grid             GridPanel
     paging           PagingToolbar
     panel            Panel
     progress         ProgressBar
     splitbutton      SplitButton
     tabpanel         TabPanel
     treepanel        TreePanel
     viewport         ViewPort
     window           Window

     Toolbar components
     ---------------------------------------
     toolbar          Toolbar

     Form components
     ---------------------------------------
     checkbox         Checkbox
     combo            ComboBox
     datefield        DateField
     field            Field
     fieldset         FieldSet
     form             FormPanel
     hidden           Hidden
     htmleditor       HtmlEditor
     numberfield      NumberField
     radio            Radio
     textarea         TextArea
     textfield        TextField
     timefield        TimeField

Field Summary
`protected com.google.gwt.core.client.JavaScriptObject` | `config`
`protected java.lang.String` | `id`

Constructor Summary
`Component()` Create a new Component.
`Component(com.google.gwt.user.client.Element element)` Component Constructor.
`Component(com.google.gwt.core.client.JavaScriptObject jsObj)`
`Component(java.lang.String id)` Creates a Component object reference for an already rendered Component.

Method Summary
`void` | `addClass(java.lang.String cls)` Adds a CSS class to the component's underlying element.
`void` | `addClassCreated(java.lang.String cls)`
`void` | `addEvent(java.lang.String event)` Allow the component to fire this event.
`void` | `addEvents(java.lang.String[] events)` Allow the component to fire these events.
`protected void` | `addListener(ComponentListener listener)` Add a component listner.
`void` | `addListener(java.lang.String event, Function funtion)` Add a raw event listener.
`protected void` | `addListener(java.lang.String event, com.google.gwt.core.client.JavaScriptObject fn)`
`void` | `addPlugin(ComponentPlugin plugin)`
`void` | `addStyleDependentName(java.lang.String clsSuffix)` Deprecated. use addClass(...) instead
`void` | `addStyleName(java.lang.String cls)` Just calls addClass(cls).
`protected void` | `afterRender()` Template method that is called after the Component has been renedered.
`protected void` | `beforeDestroy()` This template method is called before the component is destroy.
`protected void` | `check()`
`Component` | `cloneComponent()` Clone the current component using the original config values passed into this instance by default.
`Component` | `cloneComponent(Component overrides)` Clone the current component using the original config values passed into this instance by default.
`protected com.google.gwt.core.client.JavaScriptObject` | `cloneConfig(com.google.gwt.core.client.JavaScriptObject config)`
`protected abstract com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`void` | `destroy()` Destroys this component by purging any event listeners, removing the component's element from the DOM, removing the component from its `Container` (if applicable) and unregistering it from `ComponentMgr`.
`void` | `disable()` Disable this component.
`void` | `enable()` Enable this component.
`boolean` | `equals(java.lang.Object obj)`
`protected void` | `error(java.lang.String message)`
`Container` | `findParentBy(ContainerTraversalCallback cb)` Find a container above this component at any level by a custom function.
`Container` | `findParentByType(java.lang.String xtype)` Find a container above this component at any level by xtype.
`void` | `fireEvent(java.lang.String event)` Fires the specified event.
`void` | `focus()` Try to focus this component.
`void` | `focus(boolean selectText)` Try to focus this component.
`void` | `focus(boolean selectText, int delay)` Try to focus this component.
`com.google.gwt.user.client.Element` | `getApplyTo()`
`protected java.lang.String` | `getAttribute(java.lang.String attribute)`
`protected boolean` | `getAttributeAsBoolean(java.lang.String attribute)`
`protected float` | `getAttributeAsFloat(java.lang.String attribute)`
`protected int` | `getAttributeAsInt(java.lang.String attribute)`
`protected com.google.gwt.core.client.JavaScriptObject` | `getAttributeAsJavaScriptObject(java.lang.String attribute)`
`boolean` | `getAutoShow()`
`java.lang.String` | `getCls()`
`protected static com.google.gwt.core.client.JavaScriptObject` | `getComponentJS(java.lang.String id)`
`com.google.gwt.core.client.JavaScriptObject` | `getConfig()`
`protected abstract com.google.gwt.core.client.JavaScriptObject` | `getConfigPrototype()`
`java.lang.String` | `getCtCls()`
`java.lang.String` | `getDisabledClass()`
`ExtElement` | `getEl()`
`com.google.gwt.user.client.Element` | `getElement()`
`com.google.gwt.user.client.Element` | `getElement(boolean allowPreRender)`
`protected com.google.gwt.user.client.Element` | `getElement(com.google.gwt.core.client.JavaScriptObject jsObj)`
`java.lang.String` | `getHideMode()` How this component should hidden.
`boolean` | `getHideParent()`
`java.lang.String` | `getId()`
`java.lang.String` | `getItemId()` Returns the item id of this component.
`com.google.gwt.core.client.JavaScriptObject` | `getJsObj()`
`int` | `getOffsetHeight()`
`int` | `getOffsetWidth()`
`com.google.gwt.core.client.JavaScriptObject` | `getOrCreateJsObj()`
`Container` | `getOwnerContainer()` The component's owner Ext.Container (defaults to undefined, and is set automatically when the component is added to a container).
`com.google.gwt.user.client.Element` | `getRenderTo()`
`java.lang.String[]` | `getStateEvents()` An array of events that, when fired, should trigger this component to save its state (defaults to none).
`java.lang.String` | `getStateId()` The unique id for this component to use for state management purposes (defaults to the component id).
`protected com.google.gwt.user.client.Element` | `getStyleElement()`
`java.lang.String` | `getTitle()`
`java.lang.String` | `getXType()` Gets the xtype for this component as registered with ComponentMgr.
`java.lang.String` | `getXTypes()` Returns this component's xtype hierarchy as a slash-delimited string.
`int` | `hashCode()`
`void` | `hide()` Hide this component.
`protected void` | `initComponent()` This template method is called after the Component has been instantiated but before it's rendered.
`boolean` | `isCreated()`
`boolean` | `isDisabled()` True if this component is disabled.
`boolean` | `isHidden()`
`boolean` | `isRendered()`
`boolean` | `isVisible()` Returns true if this component is visible.
`boolean` | `isXType(java.lang.String xtype)` Tests whether or not this component is of a specific xtype.
`boolean` | `isXType(java.lang.String xtype, boolean shallow)` Tests whether or not this component is of a specific xtype.
`protected void` | `onDestroy()` This template method is called on component destroy.
`void` | `purgeListeners()` Removes all listeners for this Component.
`void` | `removeClass(java.lang.String cls)` Removes a CSS class from the component's underlying element.
`void` | `removeStyleDependentName(java.lang.String clsSuffix)` Deprecated. use removeClass(...) instead
`void` | `removeStyleName(java.lang.String cls)` Just calls removeClass(cls).
`void` | `render(com.google.gwt.user.client.Element element)` If this is a lazy rendering component, render it to its container element.
`void` | `render(com.google.gwt.user.client.Element element, int position)` If this is a lazy rendering component, render it to its container element.
`void` | `render(com.google.gwt.user.client.Element element, java.lang.String position)` If this is a lazy rendering component, render it to its container element.
`void` | `render(java.lang.String id)` If this is a lazy rendering component, render it to its container element.
`void` | `render(java.lang.String id, int position)` If this is a lazy rendering component, render it to its container element.
`void` | `render(java.lang.String id, java.lang.String position)` If this is a lazy rendering component, render it to its container element.
`void` | `resumeEvents()` Resume firing events.
`void` | `setApplyTo(com.google.gwt.user.client.Element element)` The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component.
`protected void` | `setAttribute(java.lang.String attribute, boolean value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, boolean value, boolean allowPostCreate, boolean allowPostRendered)`
`protected void` | `setAttribute(java.lang.String attribute, java.util.Date value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, double value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, com.google.gwt.user.client.Element value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, com.google.gwt.user.client.Element value, boolean allowPostCreate, boolean allowPostRendered)`
`protected void` | `setAttribute(java.lang.String attribute, int[] value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, int[] value, boolean allowPostCreate, boolean allowPostRender)`
`protected void` | `setAttribute(java.lang.String attribute, int value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, int value, boolean allowPostCreate, boolean allowPostRender)`
`protected void` | `setAttribute(java.lang.String attribute, com.google.gwt.core.client.JavaScriptObject value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, com.google.gwt.core.client.JavaScriptObject value, boolean allowPostCreate, boolean allowPostRender)`
`protected void` | `setAttribute(java.lang.String attribute, long value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, java.util.Map value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, java.util.Map value, boolean allowPostCreate, boolean allowPostRendered)`
`protected void` | `setAttribute(java.lang.String attribute, java.lang.String[] value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, java.lang.String[] value, boolean allowPostCreate, boolean allowPostRender)`
`protected void` | `setAttribute(java.lang.String attribute, java.lang.String value, boolean allowPostCreate)`
`protected void` | `setAttribute(java.lang.String attribute, java.lang.String value, boolean allowPostCreate, boolean allowPostRendered)`
`void` | `setAutoEl(DomConfig domConfig)` A DomConfig specification to create an element with.
`void` | `setAutoEl(java.lang.String autoEl)` A tag name to create an element with.
`void` | `setAutoShow(boolean autoShow)` True if the component should check for hidden classes (e.g.
`void` | `setCls(java.lang.String cls)` An optional extra CSS class that will be added to this component's Element (defaults to '').
`void` | `setCtCls(java.lang.String ctCls)` An optional extra CSS class that will be added to this component's container (defaults to '').
`void` | `setDisabled(boolean disabled)` Convenience function for setting disabled/enabled by boolean.
`void` | `setDisabledClass(java.lang.String disabledClass)` CSS class added to the component when it is disabled (defaults to "x-item-disabled").
`void` | `setEl(com.google.gwt.user.client.Element el)` Sets the underlying Element for the component.
`void` | `setEl(java.lang.String elementID)`
`void` | `setHeight(java.lang.String height)`
`void` | `setHideMode(java.lang.String hideMode)` How this component should hidden.
`void` | `setHideParent(boolean hideParent)` True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false).
`void` | `setId(java.lang.String id)` The unique id of this component (defaults to an auto-assigned id).
`void` | `setRenderTo(com.google.gwt.user.client.Element elem)` The id of the node, a DOM node or an existing Element that will be the container to render this component into.
`void` | `setRenderToID(java.lang.String elemID)` The id of the node, a DOM node or an existing Element that will be the container to render this component into.
`void` | `setStateEvents(java.lang.String[] stateEvents)` An array of events that, when fired, should trigger this component to save its state (defaults to none).
`void` | `setStateId(java.lang.String stateId)` The unique id for this component to use for state management purposes (defaults to the component id).
`void` | `setStyle(GenericConfig style)` A custom style specification to be applied to this component's Element.
`void` | `setStyle(java.lang.String style)` A custom style specification to be applied to this component's Element.
`void` | `setStyleName(java.lang.String cls)` Just calls setCls(cls).
`void` | `setStylePrimaryName(java.lang.String style)` Deprecated. use setCls(...) or setCtCls(...) instead
`void` | `setTitle(java.lang.String title)`
`void` | `setVisible(boolean visible)` Convenience function to hide or show this component by boolean.
`void` | `setWidth(java.lang.String width)`
`void` | `show()` Show this component.
`void` | `suspendEvents()` Suspend the firing of all events.

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

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

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

Field Detail

### id

    protected java.lang.String id

### config

    protected com.google.gwt.core.client.JavaScriptObject config

Constructor Detail

### Component

    public Component()

  Create a new Component.

### Component

    public Component(com.google.gwt.user.client.Element element)

  Component Constructor. Applies the Component to an existing element.

  Parameters:
    `element` - the Element to apply the Component to

### Component

    public Component(com.google.gwt.core.client.JavaScriptObject jsObj)

### Component

    public Component(java.lang.String id)

  Creates a Component object reference for an already rendered Component.

  Parameters:
    `id` - the Component ID

Method Detail

### cloneConfig

    protected com.google.gwt.core.client.JavaScriptObject cloneConfig(com.google.gwt.core.client.JavaScriptObject config)

### initComponent

    protected void initComponent()

  This template method is called after the Component has been instantiated but before it's rendered. Subclasses can override it to provide any "constructor" type logic thats desired/

### afterRender

    protected void afterRender()

  Template method that is called after the Component has been renedered.

### beforeDestroy

    protected void beforeDestroy()

  This template method is called before the component is destroy. Subclasses can add any cleanup logic on destoy here.

### onDestroy

    protected void onDestroy()

  This template method is called on component destroy. Subclasses can add any cleanup logic on destoy here.

### getJsObj

    public com.google.gwt.core.client.JavaScriptObject getJsObj()

### getOrCreateJsObj

    public com.google.gwt.core.client.JavaScriptObject getOrCreateJsObj()

### getComponentJS

    protected static com.google.gwt.core.client.JavaScriptObject getComponentJS(java.lang.String id)

### addListener

    protected void addListener(java.lang.String event,
                               com.google.gwt.core.client.JavaScriptObject fn)

### getConfig

    public com.google.gwt.core.client.JavaScriptObject getConfig()

### getConfigPrototype

    protected abstract com.google.gwt.core.client.JavaScriptObject getConfigPrototype()

### getElement

    protected com.google.gwt.user.client.Element getElement(com.google.gwt.core.client.JavaScriptObject jsObj)

### create

    protected abstract com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)

### getElement

    public com.google.gwt.user.client.Element getElement()

  Overrides:
    `getElement` in class `com.google.gwt.user.client.ui.UIObject`

### getElement

    public com.google.gwt.user.client.Element getElement(boolean allowPreRender)

### addEvents

    public void addEvents(java.lang.String[] events)

  Allow the component to fire these events.

  Specified by:
    `addEvents` in interface `Observable`
  Parameters:
    `events` - the events

### addEvent

    public void addEvent(java.lang.String event)

  Allow the component to fire this event.

  Parameters:
    `event` - the event

### fireEvent

    public void fireEvent(java.lang.String event)

  Fires the specified event.

  Parameters:
    `event` - the event

### purgeListeners

    public void purgeListeners()

  Removes all listeners for this Component.

### resumeEvents

    public void resumeEvents()

  Resume firing events.

  See Also:
    `suspendEvents()`

### suspendEvents

    public void suspendEvents()

  Suspend the firing of all events.

  See Also:
    `resumeEvents()`

### isDisabled

    public boolean isDisabled()

  True if this component is disabled.

  Returns:
    true if disabled

### isHidden

    public boolean isHidden()

  Returns:
    true if the component is hidden

### getOwnerContainer

    public Container getOwnerContainer()

  The component's owner Ext.Container (defaults to undefined, and is set automatically when the component is added to a container).
  Note: This method should be called only after the component has been rendered.

  Returns:
    the owner container

### isCreated

    public boolean isCreated()

  Returns:
    true if the underlying widget object has been created

### isRendered

    public boolean isRendered()

  Returns:
    true if component has been rendered

### addClass

    public void addClass(java.lang.String cls)

  Adds a CSS class to the component's underlying element.

  Parameters:
    `cls` - the CSS class

### addClassCreated

    public void addClassCreated(java.lang.String cls)

### cloneComponent

    public Component cloneComponent()

  Clone the current component using the original config values passed into this instance by default.

  Returns:
    the cloned copy of this component

### cloneComponent

    public Component cloneComponent(Component overrides)

  Clone the current component using the original config values passed into this instance by default.

  Parameters:
    `overrides` - when cloning
  Returns:
    the cloned copy of this component

### destroy

    public void destroy()

  Destroys this component by purging any event listeners, removing the component's element from the DOM, removing the component from its `Container` (if applicable) and unregistering it from `ComponentMgr`. Destruction is generally handled automatically by the framework and this method should usually not need to be called directly.

### disable

    public void disable()

  Disable this component.

### enable

    public void enable()

  Enable this component.

### findParentBy

    public Container findParentBy(ContainerTraversalCallback cb)

  Find a container above this component at any level by a custom function. If the passed function returns true, the container will be returned.

  Parameters:
    `cb` - the ContainerTraversalCallback
  Returns:
    the Container or null if none found

### findParentByType

    public Container findParentByType(java.lang.String xtype)

  Find a container above this component at any level by xtype.

  Parameters:
    `xtype` - the container xtype
  Returns:
    the container or null if not found

### focus

    public void focus()

  Try to focus this component.

### focus

    public void focus(boolean selectText)

  Try to focus this component.

  Parameters:
    `selectText` - True to also select the text in this component (if applicable)

### focus

    public void focus(boolean selectText,
                      int delay)

  Try to focus this component.

  Parameters:
    `selectText` - True to also select the text in this component (if applicable)
    `delay` - delay the focus this number of milliseconds (true for 10 milliseconds)

### getEl

    public ExtElement getEl()

### getItemId

    public java.lang.String getItemId()

  Returns the item id of this component.

  Returns:
    the item ID

### getXType

    public java.lang.String getXType()

  Gets the xtype for this component as registered with ComponentMgr. For a list of all available xtypes, see the Component javadocs.

       TextField field = new TextField();
       field.getXType() returns "textfield"

  Returns:
    the xtype

### getXTypes

    public java.lang.String getXTypes()

  Returns this component's xtype hierarchy as a slash-delimited string. For a list of all available xtypes, see the Component class javadocs.

       TextField field = new TextField();
       field.getXTypes() returns "component/box/field/textfield"

  Returns:
    the xtype hierarchy string

### hide

    public void hide()

  Hide this component.

### isVisible

    public boolean isVisible()

  Returns true if this component is visible.

  Overrides:
    `isVisible` in class `com.google.gwt.user.client.ui.UIObject`
  Returns:
    true if visible

### isXType

    public boolean isXType(java.lang.String xtype)

  Tests whether or not this component is of a specific xtype. This can test whether this component is descended from the xtype (default) or whether it is directly of the xtype specified (shallow = true). For a list of all available xtypes, see the `Component` header. Example usage:

       TextField t = new TextField();
       boolean isText = t.isXType('textfield');        // true
       boolean isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
       boolean  isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance

  Parameters:
    `xtype` - the xtype to check for this component
  Returns:
    true if is style

### isXType

    public boolean isXType(java.lang.String xtype,
                           boolean shallow)

  Tests whether or not this component is of a specific xtype. This can test whether this component is descended from the xtype (default) or whether it is directly of the xtype specified (shallow = true). For a list of all available xtypes, see the `Component` header. Example usage:

       TextField t = new TextField();
       boolean isText = t.isXType('textfield');        // true
       boolean isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
       boolean  isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance

  Parameters:
    `xtype` - the xtype to check for this component
    `shallow` - false to check whether this component is descended from the xtype (this is the default), or true to check whether this component is directly of the specified xtype.
  Returns:
    true if is style

### removeClass

    public void removeClass(java.lang.String cls)

  Removes a CSS class from the component's underlying element.

  Parameters:
    `cls` - the CSS class to remove

### setDisabled

    public void setDisabled(boolean disabled)

  Convenience function for setting disabled/enabled by boolean.

  Parameters:
    `disabled` - true to disable

### setVisible

    public void setVisible(boolean visible)

  Convenience function to hide or show this component by boolean.

  Overrides:
    `setVisible` in class `com.google.gwt.user.client.ui.UIObject`
  Parameters:
    `visible` - True to show, false to hide

### render

    public void render(java.lang.String id)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `id` - the element id

### render

    public void render(java.lang.String id,
                       java.lang.String position)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `id` - the element id
    `position` - the element ID within the container before which this component will be inserted (defaults to appending to the end of the container)

### render

    public void render(java.lang.String id,
                       int position)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `id` - the element id
    `position` - the DOM node index within the container before which this component will be inserted (defaults to appending to the end of the container)

### render

    public void render(com.google.gwt.user.client.Element element)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `element` - the element

### render

    public void render(com.google.gwt.user.client.Element element,
                       java.lang.String position)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `element` - the element
    `position` - the element ID within the container before which this component will be inserted (defaults to appending to the end of the container)

### render

    public void render(com.google.gwt.user.client.Element element,
                       int position)

  If this is a lazy rendering component, render it to its container element.

  Parameters:
    `element` - the element
    `position` - the DOM node index within the container before which this component will be inserted (defaults to appending to the end of the container)

### show

    public void show()

  Show this component.

### addListener

    public void addListener(java.lang.String event,
                            Function funtion)

  Add a raw event listener.

  Parameters:
    `event` - the event name
    `funtion` - the fintion to execute

### addListener

    protected void addListener(ComponentListener listener)

  Add a component listner.

  Parameters:
    `listener` - the listener

### check

    protected void check()
                  throws java.lang.IllegalStateException

  Throws:
    `java.lang.IllegalStateException`

### setApplyTo

    public void setApplyTo(com.google.gwt.user.client.Element element)
                    throws java.lang.IllegalStateException

  The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.

  Parameters:
    `element` - the ID of existing DIV
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getApplyTo

    public com.google.gwt.user.client.Element getApplyTo()

  Returns:
    the Element this component was applied to

### setAutoEl

    public void setAutoEl(java.lang.String autoEl)

  A tag name to create an element with. This is intended to create shorthand utility components. It should not be used for higher level components which already create their own elements.

  Parameters:
    `autoEl` - the tag name

### setAutoEl

    public void setAutoEl(DomConfig domConfig)

  A DomConfig specification to create an element with. This is intended to create shorthand utility components. It should not be used for higher level components which already create their own elements.

  Parameters:
    `domConfig` - the DomConfig specification

### setAutoShow

    public void setAutoShow(boolean autoShow)
                     throws java.lang.IllegalStateException

  True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).

  Parameters:
    `autoShow` - true to autoShow
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getAutoShow

    public boolean getAutoShow()

  Returns:
    true if auto show

### setCls

    public void setCls(java.lang.String cls)

  An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.

  Parameters:
    `cls` - the CSS class

### getCls

    public java.lang.String getCls()

  Returns:
    the extra CSS applied to the components Element

### setCtCls

    public void setCtCls(java.lang.String ctCls)
                  throws java.lang.IllegalStateException

  An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.

  Parameters:
    `ctCls` - the container CSS class
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getCtCls

    public java.lang.String getCtCls()

  Returns:
    the extra CSS class applied to the components container.

### setDisabledClass

    public void setDisabledClass(java.lang.String disabledClass)

  CSS class added to the component when it is disabled (defaults to "x-item-disabled").

  Parameters:
    `disabledClass` - the disabled CSS class

### getDisabledClass

    public java.lang.String getDisabledClass()

  Returns:
    the CSS class used when the component is disabled

### setEl

    public void setEl(com.google.gwt.user.client.Element el)
               throws java.lang.IllegalStateException

  Sets the underlying Element for the component.

  Parameters:
    `el` - the element
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setEl

    public void setEl(java.lang.String elementID)
               throws java.lang.IllegalStateException

  Throws:
    `java.lang.IllegalStateException`

### setHideMode

    public void setHideMode(java.lang.String hideMode)

  How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset position) and "display" (css display) - defaults to "display".

  Parameters:
    `hideMode` - the hide mode

### getHideMode

    public java.lang.String getHideMode()

  How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset position) and "display" (css display) - defaults to "display".

  Returns:
    the hide mode

### setHideParent

    public void setHideParent(boolean hideParent)
                       throws java.lang.IllegalStateException

  True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.

  Parameters:
    `hideParent` - true to hide and show the component's container when hide/show is called on the component
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getHideParent

    public boolean getHideParent()

  Returns:
    true if hideParent enabled

### setId

    public final void setId(java.lang.String id)
                     throws java.lang.IllegalStateException

  The unique id of this component (defaults to an auto-assigned id).

  Note: ID's cannot be changed after the component has been rendered.

  Parameters:
    `id` - the components ID
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getId

    public java.lang.String getId()

  Returns:
    the ID of the Component

### setRenderTo

    public void setRenderTo(com.google.gwt.user.client.Element elem)
                     throws java.lang.IllegalStateException

  The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.

  Parameters:
    `elem` - the container element
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setRenderToID

    public void setRenderToID(java.lang.String elemID)
                       throws java.lang.IllegalStateException

  The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.

  Parameters:
    `elemID` - the container element
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getRenderTo

    public com.google.gwt.user.client.Element getRenderTo()

  Returns:
    the element the Component is rendered to

### setStateEvents

    public void setStateEvents(java.lang.String[] stateEvents)
                        throws java.lang.IllegalStateException

  An array of events that, when fired, should trigger this component to save its state (defaults to none). These can be any types of events supported by this component, including browser or custom events (e.g., ['click', 'customerchange']).

  Parameters:
    `stateEvents` - an array of state events
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getStateEvents

    public java.lang.String[] getStateEvents()

  An array of events that, when fired, should trigger this component to save its state (defaults to none). These can be any types of events supported by this component, including browser or custom events (e.g., ['click', 'customerchange']).

  Returns:
    an array of state events

### setStateId

    public void setStateId(java.lang.String stateId)
                    throws java.lang.IllegalStateException

  The unique id for this component to use for state management purposes (defaults to the component id).

  Parameters:
    `stateId` - the state ID
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getStateId

    public java.lang.String getStateId()

  The unique id for this component to use for state management purposes (defaults to the component id).

  Returns:
    the state ID

### setStyle

    public void setStyle(java.lang.String style)
                  throws java.lang.IllegalStateException

  A custom style specification to be applied to this component's Element.

  Parameters:
    `style` - the CSS style specification
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setStyle

    public void setStyle(GenericConfig style)
                  throws java.lang.IllegalStateException

  A custom style specification to be applied to this component's Element.

  Parameters:
    `style` - the CSS style specification
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setStyleName

    public void setStyleName(java.lang.String cls)

  Just calls setCls(cls). It is recommended that this method not be used, to avoid confusion.

  Overrides:
    `setStyleName` in class `com.google.gwt.user.client.ui.UIObject`
  Parameters:
    `cls` - the CSS class
  See Also:
    `setCls(String)`

### addStyleName

    public void addStyleName(java.lang.String cls)

  Just calls addClass(cls). It is recommended that this method not be used, to avoid confusion.

  Overrides:
    `addStyleName` in class `com.google.gwt.user.client.ui.UIObject`
  Parameters:
    `cls` - the CSS class
  See Also:
    `addClass(String)`

### removeStyleName

    public void removeStyleName(java.lang.String cls)

  Just calls removeClass(cls). It is recommended that this method not be used, to avoid confusion.

  Overrides:
    `removeStyleName` in class `com.google.gwt.user.client.ui.UIObject`
  Parameters:
    `cls` - the CSS class
  See Also:
    `removeClass(String)`

### setStylePrimaryName

    public void setStylePrimaryName(java.lang.String style)

  Deprecated. use setCls(...) or setCtCls(...) instead

  Overrides:
    `setStylePrimaryName` in class `com.google.gwt.user.client.ui.UIObject`

### addStyleDependentName

    public void addStyleDependentName(java.lang.String clsSuffix)

  Deprecated. use addClass(...) instead

  Overrides:
    `addStyleDependentName` in class `com.google.gwt.user.client.ui.UIObject`

### removeStyleDependentName

    public void removeStyleDependentName(java.lang.String clsSuffix)

  Deprecated. use removeClass(...) instead

  Overrides:
    `removeStyleDependentName` in class `com.google.gwt.user.client.ui.UIObject`

### getOffsetHeight

    public int getOffsetHeight()

  Overrides:
    `getOffsetHeight` in class `com.google.gwt.user.client.ui.UIObject`

### getOffsetWidth

    public int getOffsetWidth()

  Overrides:
    `getOffsetWidth` in class `com.google.gwt.user.client.ui.UIObject`

### getStyleElement

    protected com.google.gwt.user.client.Element getStyleElement()

  Overrides:
    `getStyleElement` in class `com.google.gwt.user.client.ui.UIObject`

### getTitle

    public java.lang.String getTitle()

  Overrides:
    `getTitle` in class `com.google.gwt.user.client.ui.UIObject`

### setHeight

    public void setHeight(java.lang.String height)

  Overrides:
    `setHeight` in class `com.google.gwt.user.client.ui.UIObject`

### setTitle

    public void setTitle(java.lang.String title)

  Overrides:
    `setTitle` in class `com.google.gwt.user.client.ui.UIObject`

### addPlugin

    public void addPlugin(ComponentPlugin plugin)

### getAttribute

    protected java.lang.String getAttribute(java.lang.String attribute)

### getAttributeAsJavaScriptObject

    protected com.google.gwt.core.client.JavaScriptObject getAttributeAsJavaScriptObject(java.lang.String attribute)

### getAttributeAsInt

    protected int getAttributeAsInt(java.lang.String attribute)

### getAttributeAsFloat

    protected float getAttributeAsFloat(java.lang.String attribute)

### getAttributeAsBoolean

    protected boolean getAttributeAsBoolean(java.lang.String attribute)

### error

    protected void error(java.lang.String message)
                  throws java.lang.IllegalStateException

  Throws:
    `java.lang.IllegalStateException`

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.lang.String value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.lang.String value,
                                boolean allowPostCreate,
                                boolean allowPostRendered)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.util.Map value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.util.Map value,
                                boolean allowPostCreate,
                                boolean allowPostRendered)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                int[] value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                int[] value,
                                boolean allowPostCreate,
                                boolean allowPostRender)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                long value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                double value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                int value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                int value,
                                boolean allowPostCreate,
                                boolean allowPostRender)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.util.Date value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                com.google.gwt.core.client.JavaScriptObject value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                com.google.gwt.core.client.JavaScriptObject value,
                                boolean allowPostCreate,
                                boolean allowPostRender)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.lang.String[] value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                java.lang.String[] value,
                                boolean allowPostCreate,
                                boolean allowPostRender)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                boolean value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                boolean value,
                                boolean allowPostCreate,
                                boolean allowPostRendered)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                com.google.gwt.user.client.Element value,
                                boolean allowPostCreate)

### setAttribute

    protected void setAttribute(java.lang.String attribute,
                                com.google.gwt.user.client.Element value,
                                boolean allowPostCreate,
                                boolean allowPostRendered)

### setWidth

    public void setWidth(java.lang.String width)

  Overrides:
    `setWidth` in class `com.google.gwt.user.client.ui.UIObject`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

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