|
|||||||||
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
jsky.util.gui.ToggleButtonPanel
public class ToggleButtonPanel
This widget displays a group of radio buttons in a tabular layout.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected EventListenerList |
listenerList
List of listeners for item events |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ToggleButtonPanel(String[] names,
int nrows,
int ncols,
boolean enableMultipleSelection)
Create a panel containing toggle buttons, arranged in the given number of rows and columns. |
|
ToggleButtonPanel(String[] names,
int nrows,
int ncols,
boolean enableMultipleSelection,
int hgap,
int vgap)
Create a panel containing toggle buttons, arranged in the given number of rows and columns. |
Method Summary | |
---|---|
void |
addItemListener(ItemListener l)
Register to receive item events from this object whenever the selected item changes. |
protected void |
fireItemEvent(ItemEvent itemEvent)
Notify any item listeners that the selection changed. |
JToggleButton |
getButton(int n)
Return the nth button |
int |
getNumberOfButtons()
Return the number of buttons |
JToggleButton |
getSelected()
Return the selected button |
static void |
main(String[] args)
test main |
void |
removeItemListener(ItemListener l)
Stop receiving item events from this object. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listenerList
Constructor Detail |
---|
public ToggleButtonPanel(String[] names, int nrows, int ncols, boolean enableMultipleSelection, int hgap, int vgap)
names
- an array of ToggleButton labelsnrows
- the number of rowsnrows
- the number of columnsenableMultipleSelection
- if true, multiple buttons may be selected, otherwise only onehgap
- the horizontal gapvgap
- the vertical gappublic ToggleButtonPanel(String[] names, int nrows, int ncols, boolean enableMultipleSelection)
names
- an array of ToggleButton labelsnrows
- the number of rowsnrows
- the number of columnsenableMultipleSelection
- if true, multiple buttons may be selected, otherwise only oneMethod Detail |
---|
public void addItemListener(ItemListener l)
public void removeItemListener(ItemListener l)
protected void fireItemEvent(ItemEvent itemEvent)
public JToggleButton getSelected()
public int getNumberOfButtons()
public JToggleButton getButton(int n)
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |