com.gwtext.client.widgets.menu
Class MenuItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.gwtext.client.widgets.Component
              extended by com.gwtext.client.widgets.menu.BaseItem
                  extended by com.gwtext.client.widgets.menu.MenuItem
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, Observable

public class MenuItem
extends BaseItem

MenuItem class. This is useful for creating sumbmenu by adding a MenuItem to the main Menu.

See Also:
Menu.addItem(BaseItem)

Field Summary
 
Fields inherited from class com.gwtext.client.widgets.Component
config, id
 
Constructor Summary
MenuItem()
          Create a new MenuItem
MenuItem(com.google.gwt.core.client.JavaScriptObject jsObj)
           
MenuItem(java.lang.String text, Menu submenu)
          Create a new MenuItem.
 
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 getIconCls()
           
 Menu getMenu()
          Return the sub menu.
 java.lang.String getText()
          Return the menu text.
 void setIconCls(java.lang.String iconCls)
          Set the icon CSS class.
 void setMenu(Menu menu)
          Set the sub-menu.
 void setText(java.lang.String text)
          Set the text of the menu.
 
Methods inherited from class com.gwtext.client.widgets.menu.BaseItem
addListener, getActiveClass, getHideDelay, getShowDelay, isCanActivate, isHideOnClick, setActiveClass, setCanActivate, setHideDelay, setHideOnClick, setIcon, setShowDelay
 
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, 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, 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
getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, 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

MenuItem

public MenuItem()
Create a new MenuItem


MenuItem

public MenuItem(java.lang.String text,
                Menu submenu)
Create a new MenuItem.

Parameters:
text - the menu text
submenu - the submenu

MenuItem

public MenuItem(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

getConfigPrototype

protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
Overrides:
getConfigPrototype in class BaseItem

create

protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
Overrides:
create in class BaseItem

setIconCls

public void setIconCls(java.lang.String iconCls)
Set the icon CSS class.

Parameters:
iconCls - the icon class

getIconCls

public java.lang.String getIconCls()
Returns:
the icon CSS class

setText

public void setText(java.lang.String text)
Set the text of the menu.

Parameters:
text - the menu text

getText

public java.lang.String getText()
Return the menu text.

Returns:
the menu text

setMenu

public void setMenu(Menu menu)
Set the sub-menu.

Parameters:
menu - the sub menu

getMenu

public Menu getMenu()
Return the sub menu.

Returns:
the sub menu