public class MenuEntry extends Object implements Serializable
Chip is able to perform. It is used to generate context menues| Constructor and Description |
|---|
MenuEntry(String event)
Creates a new
MenuEntry (which is enabled). |
MenuEntry(String name,
String event)
Creates a new
MenuEntry (which is enabled). |
MenuEntry(String name,
String event,
boolean enabled)
Creates a new
MenuEntry. |
MenuEntry(String name,
String event,
String value,
boolean enabled)
Creates a new
MenuEntry. |
MenuEntry(String name,
String event,
String value,
boolean enabled,
String icon)
Creates a new
MenuEntry. |
MenuEntry(String name,
String event,
String value,
boolean enabled,
String icon,
List menuEntries)
Creates a new
MenuEntry. |
| Modifier and Type | Method and Description |
|---|---|
static MenuEntry |
createHeading(String name)
Creates a MenuEntry object which acts as a heading.
|
MenuEntry |
disabled()
Returns you a disabled copy, does not modify the original action
|
MenuEntry |
enabled()
Gives you an enabled copy, does not modify the original action
|
String |
getConfirmMessage() |
String |
getEvent()
Returns the event of the
MenuEntry. |
String |
getIcon() |
List |
getMenuEntries() |
String |
getName()
Returns the display name of the
MenuEntry. |
static MenuEntry |
getSplitter()
Returns a MenuEntry object which acts as a splitter element.
|
String |
getValue()
Returns the value of this
MenuEntry. |
boolean |
isCommand() |
boolean |
isEnabled()
Returns true if this entry is enabled.
|
boolean |
isSplitter() |
boolean |
isSubMenuBottomAlign() |
boolean |
isVisible()
Returns true if this entry is visible.
|
void |
setCommand(boolean isCommand) |
void |
setConfirmMessage(String confirmMessage) |
void |
setEnabled(boolean enabled)
Setting enabled to true makes this menu entry active (= it can be clicked on).
|
void |
setEvent(String event) |
void |
setIcon(String icon) |
void |
setMenuEntries(List menuEntries) |
void |
setName(String name)
Sets the display name of this entry.
|
void |
setSplitter(boolean isSplitter) |
void |
setSubMenuBottomAlign(boolean subMenuBottomAlign) |
void |
setValue(String value) |
void |
setVisible(boolean visible) |
public MenuEntry(String event)
MenuEntry (which is enabled). You should override the getName() method,
otherwise the displayname will fallback to the event name!!event - the event of the MenuEntrypublic MenuEntry(String name, String event)
MenuEntry (which is enabled).name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntrypublic MenuEntry(String name, String event, boolean enabled)
MenuEntry.name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntryenabled - if true this menu entry is enabled (= can be clicked on)public MenuEntry(String name, String event, String value, boolean enabled)
MenuEntry.name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntryvalue - the value of the MenuEntryenabled - if true this menu entry is enabled (= can be clicked on)public MenuEntry(String name, String event, String value, boolean enabled, String icon)
MenuEntry.name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntryvalue - the value of the MenuEntryenabled - if true this menu entry is enabled (= can be clicked on)icon - the url of the image of the MenuEntrypublic MenuEntry(String name, String event, String value, boolean enabled, String icon, List menuEntries)
MenuEntry.name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntryvalue - the value of the MenuEntryenabled - if true this menu entry is enabled (= can be clicked on)icon - the url of the image of the MenuEntrymenuEntries - a list with the menu entriespublic String getName()
MenuEntry.MenuEntrypublic void setName(String name)
name - the display name of this entrypublic String getEvent()
MenuEntry.MenuEntrypublic void setEvent(String event)
event - The event to set.public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - using true makes this menu entry activepublic boolean isVisible()
public void setVisible(boolean visible)
visible - using true makes this menu entry visiblepublic MenuEntry enabled()
public MenuEntry disabled()
public String getValue()
MenuEntry.MenuEntry.public void setValue(String value)
value - The value to set.public String getIcon()
public void setIcon(String icon)
icon - The imageURL to set.public static MenuEntry getSplitter()
public static MenuEntry createHeading(String name)
name - the name of the entry (which must be already localized)public List getMenuEntries()
public void setMenuEntries(List menuEntries)
menuEntries - The menuEntries to set.public boolean isSplitter()
public void setSplitter(boolean isSplitter)
isSplitter - The isSplitter to set.public String getConfirmMessage()
public void setConfirmMessage(String confirmMessage)
public boolean isCommand()
public void setCommand(boolean isCommand)
public boolean isSubMenuBottomAlign()
public void setSubMenuBottomAlign(boolean subMenuBottomAlign)
Copyright © 2017 SAP SE. All Rights Reserved.