|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vaadin.peter.contextmenu.ContextMenu.ContextMenuItem
public class ContextMenu.ContextMenuItem
ContextMenuItem represents one clickable item in the context menu. Item may have sub items.
Constructor Summary | |
---|---|
protected |
ContextMenu.ContextMenuItem(ContextMenuState.ContextMenuItemState itemState)
|
Method Summary | |
---|---|
ContextMenu.ContextMenuItem |
addItem(com.vaadin.server.Resource icon)
Adds new item as this item's sub item with given icon |
ContextMenu.ContextMenuItem |
addItem(String caption)
Adds new item as this item's sub item with given caption |
ContextMenu.ContextMenuItem |
addItem(String caption,
com.vaadin.server.Resource icon)
Adds new item as this item's sub item with given caption and icon |
void |
addItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
Adds context menu item click listener only to this item. |
boolean |
equals(Object other)
|
Object |
getData()
|
com.vaadin.server.Resource |
getIcon()
|
int |
hashCode()
|
boolean |
hasSeparator()
|
boolean |
hasSubMenu()
|
boolean |
isEnabled()
|
protected void |
notifyClickListeners()
|
void |
removeItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
Removes given click listener from this item. |
void |
setData(Object data)
Associates given object with this menu item. |
void |
setEnabled(boolean enabled)
Enables or disables this menu item |
void |
setIcon(com.vaadin.server.Resource icon)
Sets given resource as icon of this menu item. |
void |
setSeparatorVisible(boolean separatorVisible)
Sets or disables separator line under this item |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ContextMenu.ContextMenuItem(ContextMenuState.ContextMenuItemState itemState)
Method Detail |
---|
protected void notifyClickListeners()
public void setData(Object data)
data
- public Object getData()
public ContextMenu.ContextMenuItem addItem(String caption)
caption
-
public ContextMenu.ContextMenuItem addItem(com.vaadin.server.Resource icon)
icon
-
public ContextMenu.ContextMenuItem addItem(String caption, com.vaadin.server.Resource icon)
caption
- icon
-
public void setIcon(com.vaadin.server.Resource icon)
icon
- public com.vaadin.server.Resource getIcon()
public void setSeparatorVisible(boolean separatorVisible)
visible
- public boolean hasSeparator()
public void setEnabled(boolean enabled)
enabled
- public boolean isEnabled()
public boolean hasSubMenu()
public void addItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
clickListener
- public void removeItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
clickListener
- public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |