|
||||||||||
| 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.PanelPairCheckComponent
public class PanelPairCheckComponent
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 | |
|---|---|
PanelPairCheckComponent(boolean zDrawBorder,
String zTitle)
constructor |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent zEvent)
Whenever a check button is selected, this routine is called. |
void |
addListener(PanelPairSelectionListener zListener)
Call this method to register and to be notified of selection changes |
void |
addPair(boolean zIsSelected,
boolean zIsReadOnly,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
This method is called to add a pair of JCheckbox/JComponent |
void |
addPair(boolean zIsSelected,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
This method is called to add a pair of JCheckbox/JComponent |
boolean |
isEnabled(int zIndex)
|
boolean |
isSelected(int zIndex)
|
void |
removeListener(PanelPairSelectionListener zListener)
Call this method to remove a previously registered listener |
void |
setEnabled(int zIndex,
boolean zIsEnabled)
to enable/disable the given check box |
void |
setSelected(int zIndex,
boolean zIsSelected)
to select/unselect the given check box |
| 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 PanelPairCheckComponent(boolean zDrawBorder,
String zTitle)
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)PanelBase| Method Detail |
|---|
public void addPair(boolean zIsSelected,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
throws Exception
zIsSelected - true if the check box 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 occurs
public void addPair(boolean zIsSelected,
boolean zIsReadOnly,
JComponent zRightComponent,
boolean zFillRightComponentXSpace,
double zExtraYSpaceWeight)
throws Exception
zIsSelected - true if the check box is to be selectedzIsReadOnly - true if the checkbox is read-only, false otherwisezRightComponent - 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 occurs
public boolean isSelected(int zIndex)
throws Exception
zIndex - the checkbox index
Exception - if an error occurspublic void actionPerformed(ActionEvent zEvent)
actionPerformed in interface ActionListenerzEvent - the selection event
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
public void setSelected(int zIndex,
boolean zIsSelected)
throws Exception
zIndex - the checkbox indexzIsSelected - true if the checkbox is to be selected, false otherwise
Exception - if an error occurs
public void setEnabled(int zIndex,
boolean zIsEnabled)
throws Exception
zIndex - the checkbox indexzIsEnabled - true if the checkbox is to be enabled, false otherwise
Exception - if an error occurs
public boolean isEnabled(int zIndex)
throws Exception
zIndex - the checkbox index
Exception - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||