Class symantec.itools.awt.RadioButtonGroupPanel
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.RadioButtonGroupPanel
Object
|
+----Component
|
+----Container
|
+----Panel
|
+----BorderPanel
|
+----symantec.itools.awt.RadioButtonGroupPanel
- public class RadioButtonGroupPanel
- extends BorderPanel
- implements ItemSelectable
Creates an rectangular panel area that automatically groups
the RadioButtons that it contains.
All the RadioButtons within the RadioButtonGroupPanel act together. Only
one of the RadioButtons can be "on" at a time.
- Version:
- 1.1, August 22, 1997
- Author:
- Symantec
-
errors
- Error strings.
-
group
- The Checkbox group for the radio buttons.
-
isAdded
- is the component added to a container hierarchy?
-
itemListener
- Listener(s) that get notified when an ItemEvent is generated.
-
rbList
- Vector of Checkboxes added to the panel.
-
tempSelectionIndex
- Internal use.
-
symantec.itools.awt.RadioButtonGroupPanel()
- Constructs a RadioButtonGroupPanel.
-
addImpl(Component, Object, int)
- Adds the specified component to this container at the specified
index.
-
addItemListener(ItemListener)
- Adds the specified item listener to receive item events
from this component.
-
addNotify()
- Tells this component that it has been added to a container.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addSelectedRadioButtonIndexListener(PropertyChangeListener)
- Adds a listener for the SelectedRadioButtonIndex property changes.
-
addSelectedRadioButtonIndexListener(VetoableChangeListener)
- Adds a vetoable listener for the SelectedRadioButtonIndex property changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
getSelectedObjects()
- Returns the selected items or null if no items are selected.
-
getSelectedRadioButton()
- Gets the current choice.
-
getSelectedRadioButtonIndex()
- Gets the index of the current choice.
-
isValidSelectedRadioButtonIndex(int)
- Is the given index value valid.
-
moveIntoGroup(Component)
- Internal helper method.
-
remove(int)
- Removes the component at the specified index from this container.
-
removeAll()
- Removes all the components from this container.
-
removeItemListener(ItemListener)
- Removes the specified Item listener so it no longer receives
Item events from this component.
-
removeNotify()
- Tells this component that it is being removed from a container.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeSelectedRadioButtonIndexListener(PropertyChangeListener)
- Removes a listener for the SelectedRadioButtonIndex property changes.
-
removeSelectedRadioButtonIndexListener(VetoableChangeListener)
- Removes a vetoable listener for the SelectedRadioButtonIndex property changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
setSelectedRadioButton(Checkbox)
- Sets the current choice to the specified RadioButton.
-
setSelectedRadioButtonIndex(int)
- Sets the current choice to the specified RadioButton.
-
sourceItemEvent(Checkbox)
- Fires an item event to the listeners.
-
toString()
- Returns the String representation of this RadioButtonGroup's values.
errors
protected transient java.util.ResourceBundle errors
- Error strings.
group
protected java.awt.CheckboxGroup group
- The Checkbox group for the radio buttons.
isAdded
protected boolean isAdded
- is the component added to a container hierarchy?
itemListener
protected java.awt.event.ItemListener itemListener
- Listener(s) that get notified when an ItemEvent is generated.
rbList
protected java.util.Vector rbList
- Vector of Checkboxes added to the panel. Used to set selected RadioButton by index.
tempSelectionIndex
protected int tempSelectionIndex
- Internal use.
Remembers the requested selected index so that
setSelectedIndex
may be called before the appropriate radio button has been added.
RadioButtonGroupPanel
public RadioButtonGroupPanel()
- Constructs a RadioButtonGroupPanel.
addImpl
protected void addImpl(Component component,
Object constraints,
int index)
- Adds the specified component to this container at the specified
index.
- Overrides:
- addImpl in class BorderPanel
addItemListener
public synchronized void addItemListener(ItemListener l)
- Adds the specified item listener to receive item events
from this component.
- Parameters:
- l - the item listener
- See Also:
- removeItemListener
addNotify
public synchronized void addNotify()
- Tells this component that it has been added to a container.
This is a standard Java AWT method which gets called by the AWT when
this component is added to a container. Typically, it is used to
create this component's peer.
It has been overridden here to hook-up event listeners.
- Overrides:
- addNotify in class BorderPanel
- See Also:
- removeNotify
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- listener - the listener to add.
- Overrides:
- addPropertyChangeListener in class BorderPanel
- See Also:
- removePropertyChangeListener
addSelectedRadioButtonIndexListener
public synchronized void addSelectedRadioButtonIndexListener(PropertyChangeListener listener)
- Adds a listener for the SelectedRadioButtonIndex property changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeSelectedRadioButtonIndexListener(java.beans.PropertyChangeListener)
addSelectedRadioButtonIndexListener
public synchronized void addSelectedRadioButtonIndexListener(VetoableChangeListener listener)
- Adds a vetoable listener for the SelectedRadioButtonIndex property changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeSelectedRadioButtonIndexListener(java.beans.VetoableChangeListener)
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- listener - the listener to add.
- Overrides:
- addVetoableChangeListener in class BorderPanel
- See Also:
- removeVetoableChangeListener
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
- Returns the selected items or null if no items are selected.
getSelectedRadioButton
public java.awt.Checkbox getSelectedRadioButton()
- Gets the current choice.
getSelectedRadioButtonIndex
public int getSelectedRadioButtonIndex()
- Gets the index of the current choice.
- Returns:
- the index of the selected RadioButton. -1 if no selection.
- See Also:
- setSelectedRadioButtonIndex
isValidSelectedRadioButtonIndex
protected boolean isValidSelectedRadioButtonIndex(int index)
- Is the given index value valid.
- Parameters:
- index - the given index to test
- Returns:
- true if the given index is acceptable, false if not.
To be valid it has to be within the limits of the rbList:
moveIntoGroup
protected void moveIntoGroup(Component component)
- Internal helper method.
Adds the given Checkbox into this panel's CheckboxGroup without changing
its "selected" state.
- Parameters:
- component - the Checkbox to add to this RadioButtonGroupPanel
remove
public void remove(int index)
- Removes the component at the specified index from this container.
- Parameters:
- index - the index of the component to be removed
- Overrides:
- remove in class BorderPanel
- See Also:
- add
removeAll
public void removeAll()
- Removes all the components from this container.
- Overrides:
- removeAll in class BorderPanel
- See Also:
- add, remove
removeItemListener
public synchronized void removeItemListener(ItemListener l)
- Removes the specified Item listener so it no longer receives
Item events from this component.
- Parameters:
- l - the action listener
- See Also:
- addItemListener
removeNotify
public synchronized void removeNotify()
- Tells this component that it is being removed from a container.
This is a standard Java AWT method which gets called by the AWT when
this component is removed from a container. Typically, it is used to
destroy the peers of this component and all its subcomponents.
It has been overridden here to unhook event listeners.
- Overrides:
- removeNotify in class BorderPanel
- See Also:
- addNotify
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- listener - the listener to remove.
- Overrides:
- removePropertyChangeListener in class BorderPanel
- See Also:
- addPropertyChangeListener
removeSelectedRadioButtonIndexListener
public synchronized void removeSelectedRadioButtonIndexListener(PropertyChangeListener listener)
- Removes a listener for the SelectedRadioButtonIndex property changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addSelectedRadioButtonIndexListener(java.beans.PropertyChangeListener)
removeSelectedRadioButtonIndexListener
public synchronized void removeSelectedRadioButtonIndexListener(VetoableChangeListener listener)
- Removes a vetoable listener for the SelectedRadioButtonIndex property changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addSelectedRadioButtonIndexListener(java.beans.VetoableChangeListener)
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- listener - the listener to remove.
- Overrides:
- removeVetoableChangeListener in class BorderPanel
- See Also:
- addVetoableChangeListener
setSelectedRadioButton
public synchronized void setSelectedRadioButton(Checkbox rb) throws PropertyVetoException
- Sets the current choice to the specified RadioButton.
- Parameters:
- rb - the current RadioButton (CheckBox) choice
- Throws: PropertyVetoException
- if the recipient wishes the property
change to be rolled back.
setSelectedRadioButtonIndex
public synchronized void setSelectedRadioButtonIndex(int index) throws PropertyVetoException
- Sets the current choice to the specified RadioButton.
- Parameters:
- index - the index of the RadioButton to be the selected.
- Throws: PropertyVetoException
- if the recipient wishes the property
change to be rolled back.
- See Also:
- getSelectedRadioButtonIndex
sourceItemEvent
protected void sourceItemEvent(Checkbox item)
- Fires an item event to the listeners.
- Parameters:
- item - the radio button that changed state
toString
public java.lang.String toString()
- Returns the String representation of this RadioButtonGroup's values.
Convert to String.
- Overrides:
- toString in class Component
All Packages Class Hierarchy This Package Previous Next Index