public class MenuEntry
extends java.lang.Object
implements java.io.Serializable
Chip is able to perform. It is used to generate context menues| Constructor and Description |
|---|
MenuEntry(java.lang.String event)
Creates a new
MenuEntry (which is enabled). |
MenuEntry(java.lang.String name,
java.lang.String event)
Creates a new
MenuEntry (which is enabled). |
MenuEntry(java.lang.String name,
java.lang.String event,
boolean enabled)
Creates a new
MenuEntry. |
MenuEntry(java.lang.String name,
java.lang.String event,
java.lang.String value,
boolean enabled)
Creates a new
MenuEntry. |
MenuEntry(java.lang.String name,
java.lang.String event,
java.lang.String value,
boolean enabled,
java.lang.String icon)
Creates a new
MenuEntry. |
MenuEntry(java.lang.String name,
java.lang.String event,
java.lang.String value,
boolean enabled,
java.lang.String icon,
java.util.List menuEntries)
Creates a new
MenuEntry. |
| Modifier and Type | Method and Description |
|---|---|
static MenuEntry |
createHeading(java.lang.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
|
java.lang.String |
getConfirmMessage() |
java.lang.String |
getEvent()
Returns the event of the
MenuEntry. |
java.lang.String |
getIcon() |
java.util.List |
getMenuEntries() |
java.lang.String |
getName()
Returns the display name of the
MenuEntry. |
static MenuEntry |
getSplitter()
Returns a MenuEntry object which acts as a splitter element.
|
java.lang.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(java.lang.String confirmMessage) |
void |
setEnabled(boolean enabled)
Setting enabled to true makes this menu entry active (= it can be clicked on).
|
void |
setEvent(java.lang.String event) |
void |
setIcon(java.lang.String icon) |
void |
setMenuEntries(java.util.List menuEntries) |
void |
setName(java.lang.String name)
Sets the display name of this entry.
|
void |
setSplitter(boolean isSplitter) |
void |
setSubMenuBottomAlign(boolean subMenuBottomAlign) |
void |
setValue(java.lang.String value) |
void |
setVisible(boolean visible) |
public MenuEntry(java.lang.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(java.lang.String name,
java.lang.String event)
MenuEntry (which is enabled).name - the display name of the MenuEntry (must be already localized)event - the event of the MenuEntrypublic MenuEntry(java.lang.String name,
java.lang.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(java.lang.String name,
java.lang.String event,
java.lang.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(java.lang.String name,
java.lang.String event,
java.lang.String value,
boolean enabled,
java.lang.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(java.lang.String name,
java.lang.String event,
java.lang.String value,
boolean enabled,
java.lang.String icon,
java.util.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 java.lang.String getName()
MenuEntry.MenuEntrypublic void setName(java.lang.String name)
name - the display name of this entrypublic java.lang.String getEvent()
MenuEntry.MenuEntrypublic void setEvent(java.lang.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 java.lang.String getValue()
MenuEntry.MenuEntry.public void setValue(java.lang.String value)
value - The value to set.public java.lang.String getIcon()
public void setIcon(java.lang.String icon)
icon - The imageURL to set.public static MenuEntry getSplitter()
public static MenuEntry createHeading(java.lang.String name)
name - the name of the entry (which must be already localized)public java.util.List getMenuEntries()
public void setMenuEntries(java.util.List menuEntries)
menuEntries - The menuEntries to set.public boolean isSplitter()
public void setSplitter(boolean isSplitter)
isSplitter - The isSplitter to set.public java.lang.String getConfirmMessage()
public void setConfirmMessage(java.lang.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.