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 Item

    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
                      com.gwtext.client.widgets.menu.Item

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

Direct Known Subclasses:
  CheckItem, ColorItem, DateItem

    public class Item

extends BaseItem

A base class for all menu items that require menu-related functionality (like sub-menus) and are not static display items. Item extends the base functionality of `BaseItem` by adding menu-specific activation and click handling.

Field Summary

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

Constructor Summary
`Item()`
`Item(com.google.gwt.core.client.JavaScriptObject jsObj)`
`Item(java.lang.String text)`
`Item(java.lang.String text, BaseItemListener listener)`
`Item(java.lang.String text, BaseItemListener listener, java.lang.String icon)`

Method Summary
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`protected com.google.gwt.core.client.JavaScriptObject` | `getConfigPrototype()`
`java.lang.String` | `getHref()` The href attribute to use for the underlying anchor link (defaults to '#').
`java.lang.String` | `getHrefTarget()` The target attribute to use for the underlying anchor link (defaults to '').
`java.lang.String` | `getIconCls()`
`java.lang.String` | `getItemCls()` The default CSS class to use for menu items.
`java.lang.String` | `getText()` Retrun the text of the item.
`java.lang.String` | `getXType()` Gets the xtype for this component as registered with ComponentMgr.
`void` | `setHref(java.lang.String href)` The href attribute to use for the underlying anchor link (defaults to '#').
`void` | `setHrefTarget(java.lang.String hrefTarget)` The target attribute to use for the underlying anchor link (defaults to '').
`void` | `setIcon(java.lang.String icon)` The item's icon.
`void` | `setIconCls(java.lang.String iconCls)`
`void` | `setItemCls(java.lang.String itemCls)` The default CSS class to use for menu items (defaults to 'x-menu-item')
`void` | `setText(java.lang.String text)` The text of the check item.

Methods inherited from class com.gwtext.client.widgets.menu.BaseItem
`addListener, getActiveClass, getHideDelay, getShowDelay, isCanActivate, isHideOnClick, setActiveClass, setCanActivate, setHideDelay, setHideOnClick, setShowDelay`

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

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
`addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, toString, unsinkEvents`

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

Constructor Detail

### Item

    public Item()

### Item

    public Item(java.lang.String text)

### Item

    public Item(java.lang.String text,
                BaseItemListener listener)

### Item

    public Item(java.lang.String text,
                BaseItemListener listener,
                java.lang.String icon)

### Item

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

Method Detail

### getConfigPrototype

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

  Overrides:
    `getConfigPrototype` in class `BaseItem`

### getXType

    public java.lang.String getXType()

  Description copied from class: `Component`
  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"

  Overrides:
    `getXType` in class `Component`
  Returns:
    the xtype

### create

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

  Overrides:
    `create` in class `BaseItem`

### setText

    public void setText(java.lang.String text)

  The text of the check item.

  Parameters:
    `text` - the text

### getText

    public java.lang.String getText()

  Retrun the text of the item.

  Returns:
    the item text

### setIconCls

    public void setIconCls(java.lang.String iconCls)

### getIconCls

    public java.lang.String getIconCls()

  Returns:
    the icon CSS class

### setHref

    public void setHref(java.lang.String href)
                 throws java.lang.IllegalStateException

  The href attribute to use for the underlying anchor link (defaults to '#').

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

### getHref

    public java.lang.String getHref()

  The href attribute to use for the underlying anchor link (defaults to '#').

  Returns:
    the href attribute

### setHrefTarget

    public void setHrefTarget(java.lang.String hrefTarget)
                       throws java.lang.IllegalStateException

  The target attribute to use for the underlying anchor link (defaults to '').

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

### getHrefTarget

    public java.lang.String getHrefTarget()

  The target attribute to use for the underlying anchor link (defaults to '').

  Returns:
    the href target

### setIcon

    public void setIcon(java.lang.String icon)
                 throws java.lang.IllegalStateException

  The item's icon.

  Overrides:
    `setIcon` in class `BaseItem`
  Parameters:
    `icon` - the icon
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setItemCls

    public void setItemCls(java.lang.String itemCls)
                    throws java.lang.IllegalStateException

  The default CSS class to use for menu items (defaults to 'x-menu-item')

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

### getItemCls

    public java.lang.String getItemCls()
                                throws java.lang.IllegalStateException

  The default CSS class to use for menu items.

  Returns:
    the default CSS class to use for menu items
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

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