/* Toolkit.java -- AWT Toolkit superclass
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
{
/** The default toolkit name. */
private static String default_toolkit_name
- = "gnu.java.awt.peer.gtk.GtkToolkit";
+ = gnu.classpath.Configuration.default_awt_peer_toolkit;
/**
* The toolkit in use. Once we load it, we don't ever change it
- * if the awt.toolkit propert is set.
+ * if the awt.toolkit property is set.
*/
private static Toolkit toolkit;
* Creates a peer object for the specified <code>Button</code>.
*
* @param target The <code>Button</code> to create the peer for.
+ *
* @return The peer for the specified <code>Button</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract ButtonPeer createButton(Button target);
*
* @param target The <code>TextField</code> to create the peer for.
* @return The peer for the specified <code>TextField</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract TextFieldPeer createTextField(TextField target);
*
* @param target The <code>Label</code> to create the peer for.
* @return The peer for the specified <code>Label</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract LabelPeer createLabel(Label target);
*
* @param target The <code>List</code> to create the peer for.
* @return The peer for the specified <code>List</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract ListPeer createList(List target);
*
* @param target The <code>Checkbox</code> to create the peer for.
* @return The peer for the specified <code>Checkbox</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract CheckboxPeer createCheckbox(Checkbox target);
*
* @param target The <code>Scrollbar</code> to create the peer for.
* @return The peer for the specified <code>Scrollbar</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract ScrollbarPeer createScrollbar(Scrollbar target);
*
* @param target The <code>ScrollPane</code> to create the peer for.
* @return The peer for the specified <code>ScrollPane</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract ScrollPanePeer createScrollPane(ScrollPane target);
*
* @param target The <code>TextArea</code> to create the peer for.
* @return The peer for the specified <code>TextArea</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract TextAreaPeer createTextArea(TextArea target);
*
* @param target The <code>Choice</code> to create the peer for.
* @return The peer for the specified <code>Choice</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract ChoicePeer createChoice(Choice target);
*
* @param target The <code>Frame</code> to create the peer for.
* @return The peer for the specified <code>Frame</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract FramePeer createFrame(Frame target);
*
* @param target The <code>Window</code> to create the peer for.
* @return The peer for the specified <code>Window</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract WindowPeer createWindow(Window target);
*
* @param target The dialog to create the peer for
* @return The peer for the specified font name.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract DialogPeer createDialog(Dialog target);
*
* @param target The <code>MenuBar</code> to create the peer for.
* @return The peer for the specified <code>MenuBar</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract MenuBarPeer createMenuBar(MenuBar target);
*
* @param target The <code>Menu</code> to create the peer for.
* @return The peer for the specified <code>Menu</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract MenuPeer createMenu(Menu target);
*
* @param target The <code>PopupMenu</code> to create the peer for.
* @return The peer for the specified <code>PopupMenu</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract PopupMenuPeer createPopupMenu(PopupMenu target);
*
* @param target The <code>MenuItem</code> to create the peer for.
* @return The peer for the specified <code>MenuItem</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract MenuItemPeer createMenuItem(MenuItem target);
*
* @param target The <code>FileDialog</code> to create the peer for.
* @return The peer for the specified <code>FileDialog</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract FileDialogPeer createFileDialog(FileDialog target);
*
* @param target The <code>CheckboxMenuItem</code> to create the peer for.
* @return The peer for the specified <code>CheckboxMenuItem</code> object.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected abstract CheckboxMenuItemPeer
createCheckboxMenuItem(CheckboxMenuItem target);
* the interface used by the <code>SystemColors</code> class.
*
* @param colors The array to copy the system colors into.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected void loadSystemColors(int systemColors[])
{
/**
* @since 1.4
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public void setDynamicLayout(boolean dynamic)
{
/**
* @since 1.4
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected boolean isDynamicLayoutSet()
{
/**
* @since 1.4
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public boolean isDynamicLayoutActive()
{
* Returns the dimensions of the screen in pixels.
*
* @return The dimensions of the screen in pixels.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public abstract Dimension getScreenSize();
* Returns the screen resolution in dots per square inch.
*
* @return The screen resolution in dots per square inch.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public abstract int getScreenResolution();
/**
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
+ *
* @since 1.4
*/
public Insets getScreenInsets(GraphicsConfiguration gc)
* if the property is not set.
*
* @return An instance of the system default toolkit.
+ *
* @throws AWTError If the toolkit cannot be loaded.
*/
public static Toolkit getDefaultToolkit()
* @param height The height of the image.
* @param observer The observer to receive events about the preparation
* process.
+ *
* @return <code>true</code> if the image is already prepared for rendering,
* <code>false</code> otherwise.
*/
* @param height The height of the image.
* @param observer The observer to receive events about the preparation
* process.
+ *
* @return A union of the bitmasks from
* <code>java.awt.image.ImageObserver</code> that indicates the current
* state of the imaging readying process.
* Creates an image using the specified <code>ImageProducer</code>
*
* @param producer The <code>ImageProducer</code> to create the image from.
+ *
* @return The created image.
*/
public abstract Image createImage(ImageProducer producer);
* a recognized format. Supported formats vary from toolkit to toolkit.
*
* @param data The raw image data.
+ *
* @return The created image.
*/
public Image createImage(byte[] data)
* @param data The raw image data.
* @param offset The offset into the data where the image data starts.
* @param len The length of the image data.
+ *
* @return The created image.
*/
public abstract Image createImage(byte[] data, int offset, int len);
* @param frame The window initiating the print job.
* @param title The print job title.
* @param props The print job properties.
+ *
* @return The requested print job, or <code>null</code> if the job
* was cancelled.
*/
* Returns the system clipboard.
*
* @return THe system clipboard.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public abstract Clipboard getSystemClipboard();
/**
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
+ *
* @since 1.4
*/
public Clipboard getSystemSelection()
* to change the default.
*
* @return The key mask for the menu accelerator key.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public int getMenuShortcutKeyMask()
{