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); |
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) |
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 |
{ |
{ |