Class MenuItem
java.lang.Object
com.motivewave.platform.sdk.common.menu.MenuItem
- Direct Known Subclasses:
Menu
,MenuSeparator
Encapsulates information for displayed a custom menu item when the user invokes the popup trigger on a study (right click).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the action to execute when the user selects (clicks) the menu item.getText()
Gets the display text for the menu item.boolean
Gets the checked attribute for the menu item.boolean
Indicates if this menu item should be disabled (not clickable to the user).void
Sets the action to execute when the user selects (clicks) the menu item.void
setChecked
(boolean checked) Sets the checked attribute for the menu item.void
setDisabled
(boolean disabled) Indicates if this menu item should be disabled (not clickable to the user).void
Sets the display text for the menu item.
-
Constructor Details
-
MenuItem
Constructor. Creates a menu item with the given text label.- Parameters:
text
- display text for the menu item
-
MenuItem
Constructor. Creates a menu item with the given text label.- Parameters:
text
- display text for the menu itemaction
- action to execute when this item is selected (clicked) by the user
-
MenuItem
Constructor. Creates a menu item with the given text label.- Parameters:
text
- display text for the menu itemchecked
- if true a check mark will appear to the left of the menu itemaction
- action to execute when this item is selected (clicked) by the user
-
-
Method Details
-
getText
Gets the display text for the menu item.- Returns:
- display text
-
setText
Sets the display text for the menu item.- Parameters:
text
- display text
-
isChecked
public boolean isChecked()Gets the checked attribute for the menu item. If this is set to true then a check mark will be displayed to the left of the display text.- Returns:
- true if a check mark should be displayed to the left of the display text
-
setChecked
public void setChecked(boolean checked) Sets the checked attribute for the menu item. If this is set to true then a check mark will be displayed to the left of the display text.- Parameters:
checked
- true if a check mark should be displayed to the left of the display text
-
isDisabled
public boolean isDisabled()Indicates if this menu item should be disabled (not clickable to the user).- Returns:
- true if this item is not clickable to the user
-
setDisabled
public void setDisabled(boolean disabled) Indicates if this menu item should be disabled (not clickable to the user).- Parameters:
disabled
- true if this item is not clickable to the user
-
getAction
Gets the action to execute when the user selects (clicks) the menu item.- Returns:
- action to execute when the menu item is clicked
-
setAction
Sets the action to execute when the user selects (clicks) the menu item.- Parameters:
action
- action to execute when the menu item is clicked
-