|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.awt.Toolkit
public abstract class Toolkit

This class is the abstract superclass of all actual
implementations of the Abstract Window Toolkit. Subclasses of
Toolkit are used to bind the various components
to particular native toolkit implementations.
Many GUI operations may be performed asynchronously. This means that if you set the state of a component, and then immediately query the state, the returned value may not yet reflect the requested change. This includes, but is not limited to:
ScrollPane.setScrollPosition
and then getScrollPosition may return an incorrect
value if the original request has not yet been processed.
setVisible(true) on a Window,
Frame or Dialog may occur
asynchronously.
setSize, setBounds or
setLocation on a Window,
Frame or Dialog are forwarded
to the underlying window management system and may be
ignored or modified. See Window
for
more information.
Most applications should not call any of the methods in this
class directly. The methods defined by Toolkit are
the "glue" that joins the platform-independent classes in the
java.awt package with their counterparts in
java.awt.peer. Some methods defined by
Toolkit query the native operating system directly.
| Field Summary | |
|---|---|
protected Map |
desktopProperties
|
protected PropertyChangeSupport |
desktopPropsSupport
|
| Constructor Summary | |
|---|---|
Toolkit
|
|
| Method Summary | ||
|---|---|---|
void |
addAWTEventListener
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask. |
|
void |
addPropertyChangeListener
Adds the specified property change listener for the named desktop property. |
|
abstract void |
beep
Emits an audio beep. |
|
abstract int |
checkImage
Indicates the construction status of a specified image that is being prepared for display. |
|
protected abstract ButtonPeer |
createButton
Creates this toolkit's implementation of Button using
the specified peer interface. |
|
protected abstract CanvasPeer |
createCanvas
Creates this toolkit's implementation of Canvas using
the specified peer interface. |
|
protected abstract CheckboxPeer |
createCheckbox
Creates this toolkit's implementation of Checkbox using
the specified peer interface. |
|
protected abstract CheckboxMenuItemPeer |
createCheckboxMenuItem
Creates this toolkit's implementation of CheckboxMenuItem using
the specified peer interface. |
|
protected abstract ChoicePeer |
createChoice
Creates this toolkit's implementation of Choice using
the specified peer interface. |
|
protected LightweightPeer |
createComponent
Creates a peer for a component or container. |
|
Cursor |
createCustomCursor
Creates a new custom cursor object. |
|
protected abstract DialogPeer |
createDialog
Creates this toolkit's implementation of Dialog using
the specified peer interface. |
|
|
createDragGestureRecognizer
Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified. |
|
abstract DragSourceContextPeer |
createDragSourceContextPeer
Creates the peer for a DragSourceContext. |
|
protected abstract FileDialogPeer |
createFileDialog
Creates this toolkit's implementation of FileDialog using
the specified peer interface. |
|
protected abstract FramePeer |
createFrame
Creates this toolkit's implementation of Frame using
the specified peer interface. |
|
Image |
createImage
Creates an image which decodes the image stored in the specified byte array. |
|
abstract Image |
createImage
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length. |
|
abstract Image |
createImage
Creates an image with the specified image producer. |
|
abstract Image |
createImage
Returns an image which gets pixel data from the specified file. |
|
abstract Image |
createImage
Returns an image which gets pixel data from the specified URL. |
|
protected abstract LabelPeer |
createLabel
Creates this toolkit's implementation of Label using
the specified peer interface. |
|
protected abstract ListPeer |
createList
Creates this toolkit's implementation of List using
the specified peer interface. |
|
protected abstract MenuPeer |
createMenu
Creates this toolkit's implementation of Menu using
the specified peer interface. |
|
protected abstract MenuBarPeer |
createMenuBar
Creates this toolkit's implementation of MenuBar using
the specified peer interface. |
|
protected abstract MenuItemPeer |
createMenuItem
Creates this toolkit's implementation of MenuItem using
the specified peer interface. |
|
protected abstract PanelPeer |
createPanel
Creates this toolkit's implementation of Panel using
the specified peer interface. |
|
protected abstract PopupMenuPeer |
createPopupMenu
Creates this toolkit's implementation of PopupMenu using
the specified peer interface. |
|
protected abstract ScrollbarPeer |
createScrollbar
Creates this toolkit's implementation of Scrollbar using
the specified peer interface. |
|
protected abstract ScrollPanePeer |
createScrollPane
Creates this toolkit's implementation of ScrollPane using
the specified peer interface. |
|
protected abstract TextAreaPeer |
createTextArea
Creates this toolkit's implementation of TextArea using
the specified peer interface. |
|
protected abstract TextFieldPeer |
createTextField
Creates this toolkit's implementation of TextField using
the specified peer interface. |
|
protected abstract WindowPeer |
createWindow
Creates this toolkit's implementation of Window using
the specified peer interface. |
|
AWTEventListener |
getAWTEventListeners
Returns an array of all the AWTEventListeners
registered on this toolkit. |
|
AWTEventListener |
getAWTEventListeners
Returns an array of all the AWTEventListeners
registered on this toolkit which listen to all of the event
types indicates in the eventMask argument. |
|
Dimension |
getBestCursorSize
Returns the supported cursor dimension which is closest to the desired sizes. |
|
abstract ColorModel |
getColorModel
Determines the color model of this toolkit's screen. |
|
static Toolkit |
getDefaultToolkit
Gets the default toolkit. |
|
Object |
getDesktopProperty
Obtains a value for the specified desktop property. |
|
abstract String |
getFontList
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames() ![]() |
|
abstract FontMetrics |
getFontMetrics
Deprecated. As of JDK version 1.2, replaced by the Font
method getLineMetrics. |
|
protected abstract FontPeer |
getFontPeer
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts |
|
abstract Image |
getImage
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. |
|
abstract Image |
getImage
Returns an image which gets pixel data from the specified URL. |
|
boolean |
getLockingKeyState
Returns whether the given locking key on the keyboard is currently in its "on" state. |
|
int |
getMaximumCursorColors
Returns the maximum number of colors the Toolkit supports in a custom cursor palette. |
|
int |
getMenuShortcutKeyMask
Determines which modifier key is the appropriate accelerator key for menu shortcuts. |
|
protected MouseInfoPeer |
getMouseInfoPeer
Obtains this toolkit's implementation of helper class for MouseInfo operations. |
|
protected static Container |
getNativeContainer
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight). |
|
PrintJob |
getPrintJob
Gets a PrintJob object which is the result of initiating
a print operation on the toolkit's platform. |
|
abstract PrintJob |
getPrintJob
Gets a PrintJob object which is the result of initiating
a print operation on the toolkit's platform. |
|
static String |
getProperty
Gets a property with the specified key and default. |
|
PropertyChangeListener |
getPropertyChangeListeners
Returns an array of all the property change listeners registered on this toolkit. |
|
PropertyChangeListener |
getPropertyChangeListeners
Returns an array of all the PropertyChangeListeners
associated with the named property. |
|
| ||