90 |
|
|
91 |
/** |
/** |
92 |
* Initializes a new instance of <code>Button</code> with no label. |
* Initializes a new instance of <code>Button</code> with no label. |
93 |
|
* |
94 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() |
95 |
|
* returns true |
96 |
*/ |
*/ |
97 |
public |
public |
98 |
Button() |
Button() |
107 |
* label. The action command name is also initialized to this value. |
* label. The action command name is also initialized to this value. |
108 |
* |
* |
109 |
* @param label The label to display on the button. |
* @param label The label to display on the button. |
110 |
|
* |
111 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() |
112 |
|
* returns true |
113 |
*/ |
*/ |
114 |
public |
public |
115 |
Button(String label) |
Button(String label) |
116 |
{ |
{ |
117 |
this.label = label; |
this.label = label; |
118 |
actionCommand = label; |
actionCommand = label; |
119 |
|
|
120 |
|
if (GraphicsEnvironment.isHeadless ()) |
121 |
|
throw new HeadlessException (); |
122 |
} |
} |
123 |
|
|
124 |
/*************************************************************************/ |
/*************************************************************************/ |
220 |
/** Returns all registered EventListers of the given listenerType. |
/** Returns all registered EventListers of the given listenerType. |
221 |
* listenerType must be a subclass of EventListener, or a |
* listenerType must be a subclass of EventListener, or a |
222 |
* ClassClassException is thrown. |
* ClassClassException is thrown. |
223 |
|
* |
224 |
|
* @exception ClassCastException If listenerType doesn't specify a class or |
225 |
|
* interface that implements @see java.util.EventListener. |
226 |
|
* |
227 |
* @since 1.3 |
* @since 1.3 |
228 |
*/ |
*/ |
229 |
public EventListener[] getListeners(Class listenerType) |
public EventListener[] getListeners(Class listenerType) |