|
|||||||||
| 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.AbstractButton
javax.swing.JToggleButton
public class JToggleButton
The JToggleButton component provides a stateful button,
which can be either selected or unselected. This provides the basis
for the implementations of radio buttons (JRadioButton)
and check boxes (JCheckBox).
JRadioButton,
JCheckBox,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
JToggleButton.AccessibleJToggleButton
This class provides accessibility support for the toggle button. |
static class |
JToggleButton.ToggleButtonModel
The model handles the storage and maintenance of the state of the toggle button. |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| 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 |
|---|
| 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 |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JToggleButton()
Constructs an unselected toggle button with no text or icon. |
|
JToggleButton(Action a)
Constructs a toggle button using the labelling, state and icon specified by the supplied action. |
|
JToggleButton(Icon icon)
Constructs an unselected toggle button with the supplied icon and no text. |
|
JToggleButton(Icon icon,
boolean selected)
Constructs a toggle button with the supplied icon and state. |
|
JToggleButton(String text)
Constructs an unselected toggle button using the supplied text and no icon. |
|
JToggleButton(String text,
boolean selected)
Constructs a toggle button with the supplied text and state. |
|
JToggleButton(String text,
Icon icon)
Constructs an unselected toggle button with the supplied text and icon. |
|
JToggleButton(String text,
Icon icon,
boolean selected)
Constructs a toggle button with the supplied text, icon and state. |
|
| Method Summary | |
|---|---|
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JToggleButton. |
String |
getUIClassID()
Returns a string that specifies the name of the Look and Feel class that renders this component. |
protected String |
paramString()
Returns a textual representation of this component for debugging. |
void |
updateUI()
This method resets the toggle button's UI delegate to the default UI for the current look and feel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JToggleButton()
public JToggleButton(Action a)
a - the action to use to define the properties of the button.public JToggleButton(Icon icon)
icon - the icon to use.
public JToggleButton(Icon icon,
boolean selected)
icon - the icon to use.selected - if true, the toggle button is initially in the
selected state. Otherwise, the button is unselected.public JToggleButton(String text)
text - the text to use.
public JToggleButton(String text,
boolean selected)
text - the text to use.selected - if true, the toggle button is initially in the
selected state. Otherwise, the button is unselected.
public JToggleButton(String text,
Icon icon)
text - the text to use.icon - the icon to use.
public JToggleButton(String text,
Icon icon,
boolean selected)
text - the text to use.icon - the icon to use.selected - if true, the toggle button is initially in the
selected state. Otherwise, the button is unselected.| Method Detail |
|---|
public AccessibleContext getAccessibleContext()
JToggleButton.
The context is created, if necessary.
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponentpublic String getUIClassID()
getUIClassID in class JComponentString form.JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()protected String paramString()
paramString in class AbstractButtonString form for debugging.public void updateUI()
updateUI in class AbstractButton
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||