diff options
Diffstat (limited to 'libjava/javax/swing/JToggleButton.java')
-rw-r--r-- | libjava/javax/swing/JToggleButton.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/libjava/javax/swing/JToggleButton.java b/libjava/javax/swing/JToggleButton.java index 0977b00c6fe..9f3395aa227 100644 --- a/libjava/javax/swing/JToggleButton.java +++ b/libjava/javax/swing/JToggleButton.java @@ -47,6 +47,8 @@ public class JToggleButton extends AbstractButton implements Accessible public static class ToggleButtonModel extends DefaultButtonModel { + private static final long serialVersionUID = -1589950750899943974L; + public void setPressed(boolean b) { if (! isEnabled()) @@ -62,6 +64,8 @@ public class JToggleButton extends AbstractButton implements Accessible } + private static final long serialVersionUID = -3128248873429850443L; + public JToggleButton() { this(null, null); @@ -82,6 +86,12 @@ public class JToggleButton extends AbstractButton implements Accessible this(text, null); } + public JToggleButton(String text, boolean selected) + { + this(text, null); + setSelected(selected); + } + public JToggleButton(String text, Icon icon) { this(text, icon, false); @@ -96,17 +106,20 @@ public class JToggleButton extends AbstractButton implements Accessible model.setSelected(selected); } - - + /** + * Gets the AccessibleContext associated with this JToggleButton. + */ public AccessibleContext getAccessibleContext() { - //Gets the AccessibleContext associated with this JToggleButton. return null; } + /** + * Returns a string that specifies the name of the L&F class that renders + * this component. + */ public String getUIClassID() { - //Returns a string that specifies the name of the L&F class that renders this component. return "ToggleButtonUI"; } |