|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.quadrique.jbuildingblocks.gui.PanelBase
com.quadrique.jbuildingblocks.gui.PanelPairComponentComponent
com.quadrique.jbuildingblocks.gui.PanelPairRadioComponent
public class PanelPairRadioComponent
This panel is used to lay out a set of component pairs. For each pair:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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 |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
PanelPairRadioComponent(boolean zDrawBorder,
String zTitle,
boolean zIsReadOnly)
constructor |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent zEvent)
Whenever a radio button is selected, this routine is called. |
void |
addListener(PanelPairSelectionListener zListener)
Call this method to register and to be notified of selection changes |
int |
addPair(boolean zIsSelected,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
This method is called to add a pair of JRadioButton/JComponent |
int |
getSelectedRadioButtonIndex()
|
void |
removeListener(PanelPairSelectionListener zListener)
Call this method to remove a previously registered listener |
void |
reset()
|
void |
selectRadioButton(int zButtonIndex)
This routine is used to programmatically set the radio button that is selected. |
| Methods inherited from class com.quadrique.jbuildingblocks.gui.PanelPairComponentComponent |
|---|
addPair |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PanelPairRadioComponent(boolean zDrawBorder,
String zTitle,
boolean zIsReadOnly)
zDrawBorder - true if you want a group box (i.e. draw a border)zTitle - the title of the group box (use null if you don't want a group box)zIsReadOnly - true if the checkboxes cannot be modified b ythe end userPanelBase| Method Detail |
|---|
public void reset()
public int addPair(boolean zIsSelected,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
throws Exception
zIsSelected - true if the radio button is to be selectedzRightComponent - the component to display to the right of the checkboxzFillRightComponentXSpace - if true, use the maximum amount of space available. If flase, use the component preferred widthzExtraYSpaceWeight - use 1.0 to give the right component the maximum height. Use 0.0 if you don't want the heigth to grow.
Exception - if an error occurspublic int getSelectedRadioButtonIndex()
public void actionPerformed(ActionEvent zEvent)
actionPerformed in interface ActionListenerzEvent - the event
public void selectRadioButton(int zButtonIndex)
throws Exception
zButtonIndex - the index of the radio button. The range
is from 0 (for the first radio button added to the list) to n-1 (for the
nth radio button that has been added to the list).
Exception - if an error occurs
public void addListener(PanelPairSelectionListener zListener)
throws Exception
zListener - Reference to an instance of a class that implements the
PanelPairSelectionListener interface.
Exception - if an error occursPanelPairSelectionListener,
PanelPairSelectionEventpublic void removeListener(PanelPairSelectionListener zListener)
zListener - Reference to an instance of a class that implements the
PanelPairSelectionListener interface.SelectionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||