/[classpath]/classpath/javax/swing/JToggleButton.java
ViewVC logotype

Diff of /classpath/javax/swing/JToggleButton.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by mark, Thu Jul 8 19:26:25 2004 UTC revision 1.12 by mark, Thu Jul 22 19:45:39 2004 UTC
# Line 81  public class JToggleButton extends Abstr Line 81  public class JToggleButton extends Abstr
81      this(null, icon);      this(null, icon);
82    }        }    
83        
84      public JToggleButton (Icon icon, boolean selected)
85      {
86        this(null, icon, selected);
87      }
88      
89    public JToggleButton(String text)    public JToggleButton(String text)
90    {    {
91      this(text, null);      this(text, null);
# Line 88  public class JToggleButton extends Abstr Line 93  public class JToggleButton extends Abstr
93                
94    public JToggleButton(String text, boolean selected)    public JToggleButton(String text, boolean selected)
95    {    {
96      this(text, null);      this(text, null, selected);
     setSelected(selected);  
97    }    }
98    
99    public JToggleButton(String text, Icon icon)    public JToggleButton(String text, Icon icon)
# Line 101  public class JToggleButton extends Abstr Line 105  public class JToggleButton extends Abstr
105    {    {
106      super(text, icon);      super(text, icon);
107    
108      hori_align = LEADING;      horizontalAlignment = LEADING;
109      setModel(new ToggleButtonModel());        setModel(new ToggleButtonModel());  
110      model.setSelected(selected);      model.setSelected(selected);
111    }    }
112    
113    /**    /**
114     * Gets the AccessibleContext associated with this JToggleButton.     * Gets the AccessibleContext associated with this <code>JToggleButton</code>.
115       *
116       * @return the associated context
117     */     */
118    public AccessibleContext getAccessibleContext()    public AccessibleContext getAccessibleContext()
119    {    {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26