java.lang.Object
com.flexstor.common.awt.menu.MenuItemGroup
- All Implemented Interfaces:
- java.util.Observer
- public class MenuItemGroup
- extends java.lang.Object
- implements java.util.Observer
This class implements a group of menu items. Within
the group, only one and exactly one item can be selected. Selection
of one item automatically deselects the previous item.
MenuItemgroup is an Observer of CheckboxMenuItem.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
items
com.flexstor.common.util.FlexVector items
currentItem
CheckboxMenuItem currentItem
MenuItemGroup
public MenuItemGroup()
add
public void add(CheckboxMenuItem item)
- Add a menu item to this group and sets up observer relationship.
update
public void update(java.util.Observable o,
java.lang.Object checkboxMenuItem)
- Implementation of Observer. Reacts to a notification when
state of a CheckboxMenuItem changes.
- Specified by:
update in interface java.util.Observer
getCurrent
public CheckboxMenuItem getCurrent()
- Gets the currently selected item