    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.

##

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

##

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

##

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

##

TheButtonGroup

     protected ButtonGroup TheButtonGroup

  The button group created by this element.

GroupAction

     protected Action GroupAction

  The action associated with this element.

RegisteredName

     public static final String RegisteredName

  The element type name normally used in XML for this sort of element.

IdAttName

     public static final String IdAttName

  The name of the attribute which holds the ID of this button group.

##

xu_MenuButtonGroupElement

     public xu_MenuButtonGroupElement()

  Construct a menu button group with no type and no name.

xu_MenuButtonGroupElement

     public xu_MenuButtonGroupElement(String InputNodeName)

  Construct a menu button group with a name.

  Parameters:
    InputNodeName - The name of the element

##

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

getButtonGroup

     public ButtonGroup getButtonGroup()

  Get the button group created by this element.

  Returns:
    The button group itself.

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

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