org.formaria.swt
Class MenuItem

java.lang.Object
  extended by org.eclipse.swt.widgets.MenuItem
      extended by org.formaria.swt.MenuItem
All Implemented Interfaces:
Actionable, ImageHolder, TextHolder

public class MenuItem
extends org.eclipse.swt.widgets.MenuItem
implements TextHolder, Actionable, ImageHolder

A wrapper for menu items

Copyright (c) Formaria Ltd.,


Constructor Summary
MenuItem(Menu parent)
          Create a new menuitem
 
Method Summary
protected  void checkSubclass()
          Suppress the subclassing exception
 java.lang.String getImageName()
          Gets the name of the image being displayed.
 void setAction(java.lang.Object instance)
          Set an action object
 void setImage(java.awt.Image img)
          Set the image.
 void setImageName(java.lang.String imageUrl)
          Set the image url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.formaria.aria.TextHolder
getText, setText
 

Constructor Detail

MenuItem

public MenuItem(Menu parent)
Create a new menuitem

Parameters:
parent - parent menu
Method Detail

checkSubclass

protected void checkSubclass()
Suppress the subclassing exception


setAction

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

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

setImageName

public void setImageName(java.lang.String imageUrl)
Set the image url

Specified by:
setImageName in interface ImageHolder
Parameters:
imageUrl - the relative image URL

setImage

public void setImage(java.awt.Image img)
Description copied from interface: ImageHolder
Set the image.

Specified by:
setImage in interface ImageHolder
Parameters:
img - the new image

getImageName

public java.lang.String getImageName()
Description copied from interface: ImageHolder
Gets the name of the image being displayed.

Specified by:
getImageName in interface ImageHolder
Returns:
the image name