net.xoetrope.swt
Class XMenuItem

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Item
          extended by org.eclipse.swt.widgets.MenuItem
              extended by net.xoetrope.swt.XMenuItem
All Implemented Interfaces:
XActionable, XAttributedComponent, XTextHolder

public class XMenuItem
extends org.eclipse.swt.widgets.MenuItem
implements XTextHolder, XActionable, XAttributedComponent

A wrapper for menu items

Copyright (c) Xoetrope Ltd., 1998-2004


Constructor Summary
XMenuItem(XMenu parent)
          Create a new menuitem
 
Method Summary
protected  void checkSubclass()
          Suppress the subclassing exception
 void setAction(java.lang.Object instance)
          Set an action object
 int setAttribute(java.lang.String attribName, java.lang.Object attribValue)
          Set one or more attributes of the component.
 
Methods inherited from class org.eclipse.swt.widgets.MenuItem
addArmListener, addHelpListener, addSelectionListener, getAccelerator, getEnabled, getMenu, getParent, getSelection, isEnabled, removeArmListener, removeHelpListener, removeSelectionListener, setAccelerator, setEnabled, setImage, setMenu, setSelection, setText
 
Methods inherited from class org.eclipse.swt.widgets.Item
getImage, getText
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.xoetrope.xui.XTextHolder
getText, setText
 

Constructor Detail

XMenuItem

public XMenuItem(XMenu parent)
Create a new menuitem

Parameters:
parent - parent menu
Method Detail

checkSubclass

protected void checkSubclass()
Suppress the subclassing exception

Overrides:
checkSubclass in class org.eclipse.swt.widgets.MenuItem

setAction

public void setAction(java.lang.Object instance)
Set an action object

Specified by:
setAction in interface XActionable
Parameters:
action - the action object

setAttribute

public int setAttribute(java.lang.String attribName,
                        java.lang.Object attribValue)
Set one or more attributes of the component.

Specified by:
setAttribute in interface XAttributedComponent
Parameters:
attribName - the name of the attribute
attribValue - the value of the attribute
Returns:
0 for success, non zero for failure or to require some further action