public class ContextMenu.ContextMenuItem extends Object
Modifier | Constructor and Description |
---|---|
protected |
ContextMenuItem(ContextMenuState.ContextMenuItemState itemState) |
Modifier and Type | Method and Description |
---|---|
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
|
protected ContextMenuItem(ContextMenuState.ContextMenuItemState itemState)
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
- Copyright © 2016 Magnolia International Ltd.. All rights reserved.