waba.ui
Class MenuItem
java.lang.Object
|
+--waba.ui.MenuItem
- public class MenuItem
- extends java.lang.Object
This class represents a menu item. It is used in conjunction with the MenuBar and PopupMenu classes.
- Since:
- SuperWaba 5.8
|
Field Summary |
java.lang.String |
caption
The menu item's caption. |
boolean |
isChecked
True if this item is checked. |
boolean |
isEnabled
True if this item is enabled, false otherwise. |
|
Constructor Summary |
MenuItem()
Constructs a separator menu item. |
MenuItem(java.lang.String caption)
Constructs a menu item with the given caption. |
MenuItem(java.lang.String caption,
boolean isChecked)
Constructs a menu item with the given caption and the given default state for the check.
|
|
Method Summary |
boolean |
isCheckable()
Returns true if this menu item is checkable. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
caption
public java.lang.String caption
- The menu item's caption.
isChecked
public boolean isChecked
- True if this item is checked. Note that you must use the constructor
that specifies the starting state of the check (if set or unset), otherwise
changing this will not work.
isEnabled
public boolean isEnabled
- True if this item is enabled, false otherwise.
MenuItem
public MenuItem()
- Constructs a separator menu item.
MenuItem
public MenuItem(java.lang.String caption)
- Constructs a menu item with the given caption. This item CANNOT be checked, but can be enabled/disabled.
MenuItem
public MenuItem(java.lang.String caption,
boolean isChecked)
- Constructs a menu item with the given caption and the given default state for the check.
This item CAN be checked and can be enabled/disabled as well.
isCheckable
public boolean isCheckable()
- Returns true if this menu item is checkable.