All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xu.xu_MenuButtonGroupElement

java.lang.Object
   |
   +----com.sun.java.swing.tree.DefaultMutableTreeNode
           |
           +----xg.xg_Node
                   |
                   +----xg.xg_Element
                           |
                           +----xu.xu_MenuButtonGroupElement

public class xu_MenuButtonGroupElement
extends xg_Element

An XML element to represent a Swing button group. It represents a collection of radio buttons within a menu, only one of which can be selected at once.

It also supports associating an Action with the group, which is invoked (ie. its actionPerformed method is called) when the currently-selected button is changed. This behaviour means it is possible for a frame to use a button group without having to deal with the relatively large number of classes used here to implement them.

The xu_ButtonGroupAction class exists for this purpose (although any class derived from Action can be used). xu_ButtonGroupAction is able to keep track of which item in the group is currently selected. Thus a button group can be used while seeing only the xu_ButtonGroupAction and xu_FrameConfigManager classes.


Variable Index

 o GroupAction
The action associated with this element.
 o IdAttName
The name of the attribute which holds the ID of this button group.
 o RegisteredName
The element type name normally used in XML for this sort of element.
 o TheButtonGroup
The button group created by this element.

Constructor Index

 o xu_MenuButtonGroupElement()
Construct a menu button group with no type and no name.
 o xu_MenuButtonGroupElement(String)
Construct a menu button group with a name.

Method Index

 o getButtonGroup()
Get the button group created by this element.
 o getSummaryString()
Get a summary descriptive string suitable for display in the tree view or elsewhere.
 o toString()
Return a string representation of the element (intended for use as debug output).
 o verify()
Verify that this node is correct (ie.

Variables

 o TheButtonGroup
 protected ButtonGroup TheButtonGroup
The button group created by this element.

 o GroupAction
 protected Action GroupAction
The action associated with this element.

 o RegisteredName
 public static final String RegisteredName
The element type name normally used in XML for this sort of element.

 o IdAttName
 public static final String IdAttName
The name of the attribute which holds the ID of this button group.

Constructors

 o xu_MenuButtonGroupElement
 public xu_MenuButtonGroupElement()
Construct a menu button group with no type and no name.

 o xu_MenuButtonGroupElement
 public xu_MenuButtonGroupElement(String InputNodeName)
Construct a menu button group with a name.

Parameters:
InputNodeName - The name of the element

Methods

 o verify
 public void verify() throws xg_VerificationException
Verify that this node is correct (ie. internally correct and/or consistent with other nodes - such as its parent). The node is OK if each of its children is an xu_MenuItemElement or not an xg_Element.

Throws: xg_VerificationException
Description of verification problem
Overrides:
verify in class xg_Node
 o getButtonGroup
 public ButtonGroup getButtonGroup()
Get the button group created by this element.

Returns:
The button group itself.
 o getSummaryString
 public String getSummaryString()
Get a summary descriptive string suitable for display in the tree view or elsewhere.

Returns:
A description suitable for display in the tree view
Overrides:
getSummaryString in class xg_Node
 o toString
 public String toString()
Return a string representation of the element (intended for use as debug output).

Returns:
String representing the node type and it's name.
Overrides:
toString in class xg_Element

All Packages  Class Hierarchy  This Package  Previous  Next  Index