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.menu
Class BaseItem

    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.menu.BaseItem

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

Direct Known Subclasses:
  Adapter, Item, MenuItem, Separator, TextItem

    public class BaseItem

extends Component

The base class for all items that render into menus. BaseItem provides default rendering, activated state management and base configuration options shared by all menu components.

Field Summary

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

Constructor Summary
`BaseItem()`
`BaseItem(com.google.gwt.core.client.JavaScriptObject jsObj)`

Method Summary
`void` | `addListener(BaseItemListener listener)` Adda BaseItem listener.
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`java.lang.String` | `getActiveClass()` The CSS class to use when the item becomes activated.
`protected com.google.gwt.core.client.JavaScriptObject` | `getConfigPrototype()`
`int` | `getHideDelay()` Length of time in milliseconds to wait before hiding after a click (defaults to 100).
`int` | `getShowDelay()` Length of time in milliseconds to wait before showing a hidden item after a click (defaults to 100).
`boolean` | `isCanActivate()` True if this item can be visually activated (defaults to false).
`boolean` | `isHideOnClick()` True to hide the containing menu after this item is clicked (defaults to true).
`void` | `setActiveClass(java.lang.String activeClass)` The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
`void` | `setCanActivate(boolean canActivate)` True if this item can be visually activated (defaults to false)
`void` | `setHideDelay(int hideDelay)` Length of time in milliseconds to wait before hiding after a click (defaults to 100).
`void` | `setHideOnClick(boolean hideOnClick)` True to hide the containing menu after this item is clicked (defaults to true).
`void` | `setIcon(java.lang.String icon)`
`void` | `setShowDelay(int showDelay)` Length of time in milliseconds to wait before showing a hidden item after a click (defaults to 100)

Methods inherited from class com.gwtext.client.widgets.Component
`addClass, addClassCreated, addEvent, addEvents, addListener, addListener, addListener, addPlugin, addStyleDependentName, addStyleName, afterRender, beforeDestroy, check, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, fireEvent, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getCls, getComponentJS, getConfig, getCtCls, getDisabledClass, getEl, getElement, getElement, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getStyleElement, getTitle, getXType, 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, setCls, setCtCls, setDisabled, setDisabledClass, setEl, setEl, setHeight, setHideMode, setHideParent, setId, setRenderTo, setRenderToID, setStateEvents, setStateId, setStyle, setStyle, setStyleName, setStylePrimaryName, setTitle, setVisible, setWidth, show, suspendEvents`

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`

Constructor Detail

### BaseItem

    public BaseItem()

### BaseItem

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

Method Detail

### getConfigPrototype

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

  Specified by:
    `getConfigPrototype` in class `Component`

### addListener

    public void addListener(BaseItemListener listener)

  Adda BaseItem listener.

  Parameters:
    `listener` - the listener

### create

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

  Specified by:
    `create` in class `Component`

### setActiveClass

    public void setActiveClass(java.lang.String activeClass)
                        throws java.lang.IllegalStateException

  The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")

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

### getActiveClass

    public java.lang.String getActiveClass()

  The CSS class to use when the item becomes activated.

  Returns:
    the CSS class to use when the item becomes activated

### setCanActivate

    public void setCanActivate(boolean canActivate)
                        throws java.lang.IllegalStateException

  True if this item can be visually activated (defaults to false)

  Parameters:
    `canActivate` - true if can be activated
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### isCanActivate

    public boolean isCanActivate()
                          throws java.lang.IllegalStateException

  True if this item can be visually activated (defaults to false).

  Returns:
    true if this item can be visually activated (defaults to false)
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setHideDelay

    public void setHideDelay(int hideDelay)
                      throws java.lang.IllegalStateException

  Length of time in milliseconds to wait before hiding after a click (defaults to 100).

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

### getHideDelay

    public int getHideDelay()
                     throws java.lang.IllegalStateException

  Length of time in milliseconds to wait before hiding after a click (defaults to 100).

  Returns:
    the hide delay
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setShowDelay

    public void setShowDelay(int showDelay)
                      throws java.lang.IllegalStateException

  Length of time in milliseconds to wait before showing a hidden item after a click (defaults to 100)

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

### getShowDelay

    public int getShowDelay()
                     throws java.lang.IllegalStateException

  Length of time in milliseconds to wait before showing a hidden item after a click (defaults to 100).

  Returns:
    the show delay
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setHideOnClick

    public void setHideOnClick(boolean hideOnClick)
                        throws java.lang.IllegalStateException

  True to hide the containing menu after this item is clicked (defaults to true).

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

### isHideOnClick

    public boolean isHideOnClick()
                          throws java.lang.IllegalStateException

  True to hide the containing menu after this item is clicked (defaults to true).

  Returns:
    true to hide on click
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setIcon

    public void setIcon(java.lang.String icon)

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