|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for MenuItem.
| Method Summary | |
void |
addItem(int index,
MenuItem item)
Add the given MenuItem to the list of subitems at the given index. |
void |
addItem(MenuItem item)
Add the given MenuItem to the list of subitems. |
void |
clearItems()
Remove all MenuItems from the list of subitems. |
boolean |
containsItem(IMenuItem item)
Determine if the given item is contained in the submenu of this menu. |
java.lang.Object |
getAttached()
Get the visual representation of the MenuItem. |
org.eclipse.swt.graphics.Image |
getImage()
|
int |
getIndex()
Get the index of the MenuItem in the list of subitems in its parent. |
int |
getIndexOf(IMenuItem item)
Get the index of the given MenuItem in the submenu of this. |
java.util.List |
getItems()
Get the list of all MenuItems of the submenu of this MenuItem. |
java.lang.String |
getName()
Get the name of the MenuItem. |
java.lang.Object |
getParentAttached()
Get the visual representation of the parent MenuItem |
int |
getStyle()
If no style was set then SWT.NONE is returned. |
ITask |
getTask()
Get the Task than will be called whenever this MenuItem is selected. |
void |
removeItem(MenuItem item)
Remove the given MenuItem from the list of subitems. |
void |
select()
Select the MenuItem. |
void |
setAttached(java.lang.Object attached)
Set the visual representation of the MenuItem e.g.: a ITreeWMClient or org.eclipse.swt.widget.MenuItem. |
void |
setImage(org.eclipse.swt.graphics.Image image)
Sets the image to show at this item. |
void |
setTask(ITask task)
Set the task to run when the MenuItem is selected |
| Method Detail |
public java.util.List getItems()
public boolean containsItem(IMenuItem item)
item - the MenuItem to search for in the submenu.
public void clearItems()
public java.lang.Object getAttached()
ITreeWMClient or org.eclipse.swt.widget.MenuItem.
public void setAttached(java.lang.Object attached)
ITreeWMClient or org.eclipse.swt.widget.MenuItem.
attached - the GUI-Object corresponding to this MenuItem.public java.lang.Object getParentAttached()
public java.lang.String getName()
public int getIndex()
public int getIndexOf(IMenuItem item)
item - to determine the index of
public void addItem(MenuItem item)
item - to add.
public void addItem(int index,
MenuItem item)
index - where to add the new item.item - to add.public void removeItem(MenuItem item)
item - to removepublic ITask getTask()
public void setTask(ITask task)
task - the task of this item.public void select()
public org.eclipse.swt.graphics.Image getImage()
public void setImage(org.eclipse.swt.graphics.Image image)
public int getStyle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||