Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.awt.menu
Class MenuItemGroup  view MenuItemGroup download MenuItemGroup.java

java.lang.Object
  extended bycom.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.


Field Summary
(package private)  CheckboxMenuItem currentItem
           
(package private)  com.flexstor.common.util.FlexVector items
           
 
Constructor Summary
MenuItemGroup()
           
 
Method Summary
 void add(CheckboxMenuItem item)
          Add a menu item to this group and sets up observer relationship.
 CheckboxMenuItem getCurrent()
          Gets the currently selected item
 void update(java.util.Observable o, java.lang.Object checkboxMenuItem)
          Implementation of Observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

com.flexstor.common.util.FlexVector items

currentItem

CheckboxMenuItem currentItem
Constructor Detail

MenuItemGroup

public MenuItemGroup()
Method Detail

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