1 |
/* Toolkit.java -- AWT Toolkit superclass |
/* Toolkit.java -- AWT Toolkit superclass |
2 |
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
134 |
* Creates a peer object for the specified <code>TextField</code>. |
* Creates a peer object for the specified <code>TextField</code>. |
135 |
* |
* |
136 |
* @param target The <code>TextField</code> to create the peer for. |
* @param target The <code>TextField</code> to create the peer for. |
137 |
|
* |
138 |
* @return The peer for the specified <code>TextField</code> object. |
* @return The peer for the specified <code>TextField</code> object. |
139 |
* |
* |
140 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
145 |
* Creates a peer object for the specified <code>Label</code>. |
* Creates a peer object for the specified <code>Label</code>. |
146 |
* |
* |
147 |
* @param target The <code>Label</code> to create the peer for. |
* @param target The <code>Label</code> to create the peer for. |
148 |
|
* |
149 |
* @return The peer for the specified <code>Label</code> object. |
* @return The peer for the specified <code>Label</code> object. |
150 |
* |
* |
151 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
156 |
* Creates a peer object for the specified <code>List</code>. |
* Creates a peer object for the specified <code>List</code>. |
157 |
* |
* |
158 |
* @param target The <code>List</code> to create the peer for. |
* @param target The <code>List</code> to create the peer for. |
159 |
|
* |
160 |
* @return The peer for the specified <code>List</code> object. |
* @return The peer for the specified <code>List</code> object. |
161 |
* |
* |
162 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
167 |
* Creates a peer object for the specified <code>Checkbox</code>. |
* Creates a peer object for the specified <code>Checkbox</code>. |
168 |
* |
* |
169 |
* @param target The <code>Checkbox</code> to create the peer for. |
* @param target The <code>Checkbox</code> to create the peer for. |
170 |
|
* |
171 |
* @return The peer for the specified <code>Checkbox</code> object. |
* @return The peer for the specified <code>Checkbox</code> object. |
172 |
* |
* |
173 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
178 |
* Creates a peer object for the specified <code>Scrollbar</code>. |
* Creates a peer object for the specified <code>Scrollbar</code>. |
179 |
* |
* |
180 |
* @param target The <code>Scrollbar</code> to create the peer for. |
* @param target The <code>Scrollbar</code> to create the peer for. |
181 |
|
* |
182 |
* @return The peer for the specified <code>Scrollbar</code> object. |
* @return The peer for the specified <code>Scrollbar</code> object. |
183 |
* |
* |
184 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
189 |
* Creates a peer object for the specified <code>ScrollPane</code>. |
* Creates a peer object for the specified <code>ScrollPane</code>. |
190 |
* |
* |
191 |
* @param target The <code>ScrollPane</code> to create the peer for. |
* @param target The <code>ScrollPane</code> to create the peer for. |
192 |
|
* |
193 |
* @return The peer for the specified <code>ScrollPane</code> object. |
* @return The peer for the specified <code>ScrollPane</code> object. |
194 |
* |
* |
195 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
200 |
* Creates a peer object for the specified <code>TextArea</code>. |
* Creates a peer object for the specified <code>TextArea</code>. |
201 |
* |
* |
202 |
* @param target The <code>TextArea</code> to create the peer for. |
* @param target The <code>TextArea</code> to create the peer for. |
203 |
|
* |
204 |
* @return The peer for the specified <code>TextArea</code> object. |
* @return The peer for the specified <code>TextArea</code> object. |
205 |
* |
* |
206 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
211 |
* Creates a peer object for the specified <code>Choice</code>. |
* Creates a peer object for the specified <code>Choice</code>. |
212 |
* |
* |
213 |
* @param target The <code>Choice</code> to create the peer for. |
* @param target The <code>Choice</code> to create the peer for. |
214 |
|
* |
215 |
* @return The peer for the specified <code>Choice</code> object. |
* @return The peer for the specified <code>Choice</code> object. |
216 |
* |
* |
217 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
222 |
* Creates a peer object for the specified <code>Frame</code>. |
* Creates a peer object for the specified <code>Frame</code>. |
223 |
* |
* |
224 |
* @param target The <code>Frame</code> to create the peer for. |
* @param target The <code>Frame</code> to create the peer for. |
225 |
|
* |
226 |
* @return The peer for the specified <code>Frame</code> object. |
* @return The peer for the specified <code>Frame</code> object. |
227 |
* |
* |
228 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
233 |
* Creates a peer object for the specified <code>Canvas</code>. |
* Creates a peer object for the specified <code>Canvas</code>. |
234 |
* |
* |
235 |
* @param target The <code>Canvas</code> to create the peer for. |
* @param target The <code>Canvas</code> to create the peer for. |
236 |
|
* |
237 |
* @return The peer for the specified <code>Canvas</code> object. |
* @return The peer for the specified <code>Canvas</code> object. |
238 |
*/ |
*/ |
239 |
protected abstract CanvasPeer createCanvas(Canvas target); |
protected abstract CanvasPeer createCanvas(Canvas target); |
242 |
* Creates a peer object for the specified <code>Panel</code>. |
* Creates a peer object for the specified <code>Panel</code>. |
243 |
* |
* |
244 |
* @param target The <code>Panel</code> to create the peer for. |
* @param target The <code>Panel</code> to create the peer for. |
245 |
|
* |
246 |
* @return The peer for the specified <code>Panel</code> object. |
* @return The peer for the specified <code>Panel</code> object. |
247 |
*/ |
*/ |
248 |
protected abstract PanelPeer createPanel(Panel target); |
protected abstract PanelPeer createPanel(Panel target); |
251 |
* Creates a peer object for the specified <code>Window</code>. |
* Creates a peer object for the specified <code>Window</code>. |
252 |
* |
* |
253 |
* @param target The <code>Window</code> to create the peer for. |
* @param target The <code>Window</code> to create the peer for. |
254 |
|
* |
255 |
* @return The peer for the specified <code>Window</code> object. |
* @return The peer for the specified <code>Window</code> object. |
256 |
* |
* |
257 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
262 |
* Creates a peer object for the specified <code>Dialog</code>. |
* Creates a peer object for the specified <code>Dialog</code>. |
263 |
* |
* |
264 |
* @param target The dialog to create the peer for |
* @param target The dialog to create the peer for |
265 |
|
* |
266 |
* @return The peer for the specified font name. |
* @return The peer for the specified font name. |
267 |
* |
* |
268 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
273 |
* Creates a peer object for the specified <code>MenuBar</code>. |
* Creates a peer object for the specified <code>MenuBar</code>. |
274 |
* |
* |
275 |
* @param target The <code>MenuBar</code> to create the peer for. |
* @param target The <code>MenuBar</code> to create the peer for. |
276 |
|
* |
277 |
* @return The peer for the specified <code>MenuBar</code> object. |
* @return The peer for the specified <code>MenuBar</code> object. |
278 |
* |
* |
279 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
284 |
* Creates a peer object for the specified <code>Menu</code>. |
* Creates a peer object for the specified <code>Menu</code>. |
285 |
* |
* |
286 |
* @param target The <code>Menu</code> to create the peer for. |
* @param target The <code>Menu</code> to create the peer for. |
287 |
|
* |
288 |
* @return The peer for the specified <code>Menu</code> object. |
* @return The peer for the specified <code>Menu</code> object. |
289 |
* |
* |
290 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
295 |
* Creates a peer object for the specified <code>PopupMenu</code>. |
* Creates a peer object for the specified <code>PopupMenu</code>. |
296 |
* |
* |
297 |
* @param target The <code>PopupMenu</code> to create the peer for. |
* @param target The <code>PopupMenu</code> to create the peer for. |
298 |
|
* |
299 |
* @return The peer for the specified <code>PopupMenu</code> object. |
* @return The peer for the specified <code>PopupMenu</code> object. |
300 |
* |
* |
301 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
306 |
* Creates a peer object for the specified <code>MenuItem</code>. |
* Creates a peer object for the specified <code>MenuItem</code>. |
307 |
* |
* |
308 |
* @param target The <code>MenuItem</code> to create the peer for. |
* @param target The <code>MenuItem</code> to create the peer for. |
309 |
|
* |
310 |
* @return The peer for the specified <code>MenuItem</code> object. |
* @return The peer for the specified <code>MenuItem</code> object. |
311 |
* |
* |
312 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
317 |
* Creates a peer object for the specified <code>FileDialog</code>. |
* Creates a peer object for the specified <code>FileDialog</code>. |
318 |
* |
* |
319 |
* @param target The <code>FileDialog</code> to create the peer for. |
* @param target The <code>FileDialog</code> to create the peer for. |
320 |
|
* |
321 |
* @return The peer for the specified <code>FileDialog</code> object. |
* @return The peer for the specified <code>FileDialog</code> object. |
322 |
* |
* |
323 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
328 |
* Creates a peer object for the specified <code>CheckboxMenuItem</code>. |
* Creates a peer object for the specified <code>CheckboxMenuItem</code>. |
329 |
* |
* |
330 |
* @param target The <code>CheckboxMenuItem</code> to create the peer for. |
* @param target The <code>CheckboxMenuItem</code> to create the peer for. |
331 |
|
* |
332 |
* @return The peer for the specified <code>CheckboxMenuItem</code> object. |
* @return The peer for the specified <code>CheckboxMenuItem</code> object. |
333 |
* |
* |
334 |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
345 |
* XXX: FIXME |
* XXX: FIXME |
346 |
* |
* |
347 |
* @param target The <code>Component</code> to create the peer for. |
* @param target The <code>Component</code> to create the peer for. |
348 |
|
* |
349 |
* @return The peer for the specified <code>Component</code> object. |
* @return The peer for the specified <code>Component</code> object. |
350 |
*/ |
*/ |
351 |
protected LightweightPeer createComponent(Component target) |
protected LightweightPeer createComponent(Component target) |
358 |
* |
* |
359 |
* @param name The font to create the peer for. |
* @param name The font to create the peer for. |
360 |
* @param style The font style to create the peer for. |
* @param style The font style to create the peer for. |
361 |
|
* |
362 |
* @return The peer for the specified font name. |
* @return The peer for the specified font name. |
363 |
|
* |
364 |
|
* @deprecated |
365 |
*/ |
*/ |
366 |
protected abstract FontPeer getFontPeer(String name, int style); |
protected abstract FontPeer getFontPeer(String name, int style); |
367 |
|
|
439 |
* Returns the color model of the screen. |
* Returns the color model of the screen. |
440 |
* |
* |
441 |
* @return The color model of the screen. |
* @return The color model of the screen. |
442 |
|
* |
443 |
|
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true. |
444 |
*/ |
*/ |
445 |
public abstract ColorModel getColorModel(); |
public abstract ColorModel getColorModel(); |
446 |
|
|
455 |
* Return the font metrics for the specified font |
* Return the font metrics for the specified font |
456 |
* |
* |
457 |
* @param name The name of the font to return metrics for. |
* @param name The name of the font to return metrics for. |
458 |
|
* |
459 |
* @return The requested font metrics. |
* @return The requested font metrics. |
460 |
*/ |
*/ |
461 |
public abstract FontMetrics getFontMetrics(Font name); |
public abstract FontMetrics getFontMetrics(Font name); |
673 |
* component. |
* component. |
674 |
* |
* |
675 |
* @param component The component to fetch the native container for. |
* @param component The component to fetch the native container for. |
676 |
|
* |
677 |
* @return The native container object for this component. |
* @return The native container object for this component. |
678 |
*/ |
*/ |
679 |
protected static Container getNativeContainer(Component component) |
protected static Container getNativeContainer(Component component) |
727 |
* default value if the property does not exist. |
* default value if the property does not exist. |
728 |
* |
* |
729 |
* @param key The name of the property to retrieve. |
* @param key The name of the property to retrieve. |
730 |
* @param defThe default value of the property. |
* @param def The default value of the property. |
731 |
*/ |
*/ |
732 |
public static String getProperty(String key, String def) |
public static String getProperty(String key, String def) |
733 |
{ |
{ |