com.extjs.gxt.ui.client.widget.menu
Class CheckMenuItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.menu.Item
                  extended by com.extjs.gxt.ui.client.widget.menu.MenuItem
                      extended by com.extjs.gxt.ui.client.widget.menu.CheckMenuItem
All Implemented Interfaces:
Observable, com.google.gwt.user.client.EventListener

public class CheckMenuItem
extends MenuItem

Adds a menu item that contains a checkbox by default, but can also be part of a radio group. A horizontal row of buttons.

Events:
BeforeCheckChange : MenuEvent(menu, item)
Fires before the item is checked or unchecked.
CheckChange : MenuEvent(menu, item)
Fires after the item is checked or unchecked.


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.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CheckMenuItem()
          Creates a new check menu item.
CheckMenuItem(java.lang.String text)
          Creates a new check menu item.
 
Method Summary
 java.lang.String getGroup()
          Returns the group name.
 java.lang.String getGroupStyle()
          Returns the group style.
 boolean isChecked()
          Returns true if the item is checked.
 void setChecked(boolean checked)
          Set the checked state of this item.
 void setChecked(boolean state, boolean supressEvent)
          Set the checked state of this item.
 void setGroup(java.lang.String group)
          All check items with the same group name will automatically be grouped into a single-select radio button group (defaults to null).
 void setGroupStyle(java.lang.String groupStyle)
          The default CSS class to use for radio group check items (defaults to "x-menu-group-item").
 
Methods inherited from class com.extjs.gxt.ui.client.widget.menu.MenuItem
expandMenu, getIconStyle, getSubMenu, getText, setIconStyle, setSubMenu, setText
 
Methods inherited from class com.extjs.gxt.ui.client.widget.menu.Item
addSelectionListener, getActiveStyle, getHideOnClick, getParentMenu, removeSelectionListener, setActiveStyle, setHideOnClick
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addListener, addPlugin, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isDisabledEvents, isEnabled, isRendered, isVisible, onBrowserEvent, onComponentEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setHeight, setId, setIntStyleAttribute, setItemId, setPixelSize, setSize, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setWidth, show, sinkEvents, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckMenuItem

public CheckMenuItem()
Creates a new check menu item.


CheckMenuItem

public CheckMenuItem(java.lang.String text)
Creates a new check menu item.

Parameters:
text - the text
Method Detail

getGroup

public java.lang.String getGroup()
Returns the group name.

Returns:
the name

getGroupStyle

public java.lang.String getGroupStyle()
Returns the group style.

Returns:
the group style

isChecked

public boolean isChecked()
Returns true if the item is checked.

Returns:
the checked state

setChecked

public void setChecked(boolean checked)
Set the checked state of this item.

Parameters:
checked - the new checked state

setChecked

public void setChecked(boolean state,
                       boolean supressEvent)
Set the checked state of this item.

Parameters:
state - the new checked state
supressEvent - true to prevent the checkchange event from firing

setGroup

public void setGroup(java.lang.String group)
All check items with the same group name will automatically be grouped into a single-select radio button group (defaults to null).

Parameters:
group - the group

setGroupStyle

public void setGroupStyle(java.lang.String groupStyle)
The default CSS class to use for radio group check items (defaults to "x-menu-group-item").

Parameters:
groupStyle - the group style