|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.symantec.itools.javax.swing.JButtonGroupPanel
A rectangular panel that contains a
ButtonGroup
and supports various selection actions.
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
protected java.util.Vector |
buttons
The contained buttons. |
protected javax.swing.ButtonGroup |
group
The ButtonGroup the buttons contained by this panel belong to. |
protected java.util.Vector |
listeners
Button listeners. |
| Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
JButtonGroupPanel()
Constructs a default JButtonGroupPanel object. |
|
JButtonGroupPanel(javax.swing.ButtonGroup grp)
Constructs a JButtonGroupPanel for the given ButtonGroup. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the ActionListener
interface. |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified listener. |
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Standard routine to implement the various "add to container" methods. |
java.util.Enumeration |
getElements()
Gets the buttons in this panel's ButtonGroup. |
javax.swing.AbstractButton |
getSelection()
Gets the currently selected button. |
boolean |
isSelected(javax.swing.AbstractButton btn)
Determines whether the specified button is selected. |
boolean |
isSelected(java.lang.String text)
Determines whether button with the specified text is selected. |
void |
remove(javax.swing.AbstractButton btn)
Removes an AbstractButton from this panel. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes the specified listener. |
void |
setSelection(javax.swing.AbstractButton btn,
boolean f)
Determines whether the specified button is selected. |
void |
setSelection(java.lang.String text,
boolean f)
Determines whether the button with the specified text is selected. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected java.util.Vector buttons
AbstractButton.protected java.util.Vector listeners
ActionListener.addActionListener(java.awt.event.ActionListener),
removeActionListener(java.awt.event.ActionListener)protected javax.swing.ButtonGroup group
ButtonGroup the buttons contained by this panel belong to.
By default, a new ButtonGroup is created for the buttons added to this panel.| Constructor Detail |
public JButtonGroupPanel()
JButtonGroupPanel object.public JButtonGroupPanel(javax.swing.ButtonGroup grp)
JButtonGroupPanel for the given ButtonGroup.
All buttons in the group are automatically added to the panel.grp - the ButtonGroup this panel is for| Method Detail |
public java.util.Enumeration getElements()
ButtonGroup.public void addActionListener(java.awt.event.ActionListener listener)
listener - the listener to addremoveActionListener(java.awt.event.ActionListener)public void removeActionListener(java.awt.event.ActionListener listener)
listener - the listener to removeaddActionListener(java.awt.event.ActionListener)public void actionPerformed(java.awt.event.ActionEvent event)
ActionListener
interface.
Sends the given ActionEvent to all of the listeners registered using
addActionListener.
protected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
AbstractButton
to this panel if it hasn't already been added. It is also added to this panel's
ButtonGroup.public void remove(javax.swing.AbstractButton btn)
AbstractButton from this panel.
It is also removed from this panel's
ButtonGroup.btn - the button to removepublic void setSelection(javax.swing.AbstractButton btn, boolean f)
btn - the buttonf - true to select the button, false to de-select itpublic void setSelection(java.lang.String text, boolean f)
text - the text of the desired buttonf - true to select the button, false to de-select itpublic javax.swing.AbstractButton getSelection()
null if none is selectedpublic boolean isSelected(javax.swing.AbstractButton btn)
btn - the button to checktrue if the button is selected, false otherwisepublic boolean isSelected(java.lang.String text)
text - the text of the button to checktrue if the button is selected, false otherwise
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||