84 |
/** |
/** |
85 |
* Initializes a new instance of <code>CheckboxMenuItem</code> with no |
* Initializes a new instance of <code>CheckboxMenuItem</code> with no |
86 |
* label and an initial state of off. |
* label and an initial state of off. |
87 |
|
* |
88 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() |
89 |
|
* returns true. |
90 |
*/ |
*/ |
91 |
public |
public |
92 |
CheckboxMenuItem() |
CheckboxMenuItem() |
101 |
* specified label and an initial state of off. |
* specified label and an initial state of off. |
102 |
* |
* |
103 |
* @param label The label of the menu item. |
* @param label The label of the menu item. |
104 |
|
* |
105 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() |
106 |
|
* returns true. |
107 |
*/ |
*/ |
108 |
public |
public |
109 |
CheckboxMenuItem(String label) |
CheckboxMenuItem(String label) |
120 |
* @param label The label of the menu item. |
* @param label The label of the menu item. |
121 |
* @param state The initial state of the menu item, where <code>true</code> |
* @param state The initial state of the menu item, where <code>true</code> |
122 |
* is on, and <code>false</code> is off. |
* is on, and <code>false</code> is off. |
123 |
|
* |
124 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() |
125 |
|
* returns true. |
126 |
*/ |
*/ |
127 |
public |
public |
128 |
CheckboxMenuItem(String label, boolean state) |
CheckboxMenuItem(String label, boolean state) |
129 |
{ |
{ |
130 |
super(label); |
super(label); |
131 |
this.state = state; |
this.state = state; |
132 |
|
|
133 |
|
if (GraphicsEnvironment.isHeadless()) |
134 |
|
throw new HeadlessException (); |
135 |
} |
} |
136 |
|
|
137 |
/*************************************************************************/ |
/*************************************************************************/ |