All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.awt.Toolkit
Toolkit
are used to bind the various components
to particular native toolkit implementations.
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.
Button
using
the specified peer interface.
Canvas
using
the specified peer interface.
Checkbox
using
the specified peer interface.
CheckboxMenuItem
using
the specified peer interface.
Choice
using
the specified peer interface.
Dialog
using
the specified peer interface.
FileDialog
using
the specified peer interface.
Frame
using
the specified peer interface.
Label
using
the specified peer interface.
List
using
the specified peer interface.
Menu
using
the specified peer interface.
MenuBar
using
the specified peer interface.
MenuItem
using
the specified peer interface.
Panel
using
the specified peer interface.
PopupMenu
using
the specified peer interface.
Scrollbar
using
the specified peer interface.
ScrollPane
using
the specified peer interface.
TextArea
using
the specified peer interface.
TextField
using
the specified peer interface.
Window
using
the specified peer interface.
For 1.1, the following font names are deprecated (the replacement name follows):
The ZapfDingbats font is also deprecated in 1.1, but only as a separate fontname.
Font
using
the specified peer interface.
PrintJob
object which is the result
of initiating a print operation on the toolkit's platform.
public Toolkit()
protected abstract ButtonPeer createButton(Button target)
Button
using
the specified peer interface.
Button
.
protected abstract TextFieldPeer createTextField(TextField target)
TextField
using
the specified peer interface.
TextField
.
protected abstract LabelPeer createLabel(Label target)
Label
using
the specified peer interface.
Label
.
protected abstract ListPeer createList(List target)
List
using
the specified peer interface.
List
.
protected abstract CheckboxPeer createCheckbox(Checkbox target)
Checkbox
using
the specified peer interface.
Checkbox
.
protected abstract ScrollbarPeer createScrollbar(Scrollbar target)
Scrollbar
using
the specified peer interface.
Scrollbar
.
protected abstract ScrollPanePeer createScrollPane(ScrollPane target)
ScrollPane
using
the specified peer interface.
ScrollPane
.
protected abstract TextAreaPeer createTextArea(TextArea target)
TextArea
using
the specified peer interface.
TextArea
.
protected abstract ChoicePeer createChoice(Choice target)
Choice
using
the specified peer interface.
Choice
.
protected abstract FramePeer createFrame(Frame target)
Frame
using
the specified peer interface.
Frame
.
protected abstract CanvasPeer createCanvas(Canvas target)
Canvas
using
the specified peer interface.
Canvas
.
protected abstract PanelPeer createPanel(Panel target)
Panel
using
the specified peer interface.
Panel
.
protected abstract WindowPeer createWindow(Window target)
Window
using
the specified peer interface.
Window
.
protected abstract DialogPeer createDialog(Dialog target)
Dialog
using
the specified peer interface.
Dialog
.
protected abstract MenuBarPeer createMenuBar(MenuBar target)
MenuBar
using
the specified peer interface.
MenuBar
.
protected abstract MenuPeer createMenu(Menu target)
Menu
using
the specified peer interface.
Menu
.
protected abstract PopupMenuPeer createPopupMenu(PopupMenu target)
PopupMenu
using
the specified peer interface.
PopupMenu
.
protected abstract MenuItemPeer createMenuItem(MenuItem target)
MenuItem
using
the specified peer interface.
MenuItem
.
protected abstract FileDialogPeer createFileDialog(FileDialog target)
FileDialog
using
the specified peer interface.
FileDialog
.
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
CheckboxMenuItem
using
the specified peer interface.
CheckboxMenuItem
.
protected LightweightPeer createComponent(Component target)
protected abstract FontPeer getFontPeer(String name,
int style)
Font
using
the specified peer interface.
Font
.
protected void loadSystemColors(int systemColors[])
This method is called by the method updateSystemColors
in the SystemColor
class.
public abstract Dimension getScreenSize()
public abstract int getScreenResolution()
public abstract ColorModel getColorModel()
ColorModel
is an abstract class that
encapsulates the ability to translate between the
pixel values of an image and its red, green, blue,
and alpha components.
This toolkit method is called by the
getColorModel
method
of the Component
class.
public abstract String[] getFontList()
For 1.1, the following font names are deprecated (the replacement name follows):
The ZapfDingbats font is also deprecated in 1.1, but only as a separate fontname. Unicode defines the ZapfDingbat characters starting at ?, and as of 1.1 Java supports those characters.
public abstract FontMetrics getFontMetrics(Font font)
public abstract void sync()
This method ensures that the display is up-to-date. It is useful for animation.
public static synchronized Toolkit getDefaultToolkit()
If there is a system property named "awt.toolkit"
,
that property is treated as the name of a class that is a subclass
of Toolkit
.
If the system property does not exist, then the default toolkit
used is the class named "sun.awt.motif.MToolkit"
,
which is a motif implementation of the Abstract Window Toolkit.
public abstract Image getImage(String filename)
public abstract Image getImage(URL url)
public abstract boolean prepareImage(Image image,
int width,
int height,
ImageObserver observer)
If the values of the width and height arguments are both
-1
, this method prepares the image for rendering
on the default screen; otherwise, this method prepares an image
for rendering on the default screen at the specified width and height.
The image data is downloaded asynchronously in another thread, and an appropriately scaled screen representation of the image is generated.
This method is called by components prepareImage
methods.
Information on the flags returned by this method can be found
with the definition of the ImageObserver
interface.
-1
.
-1
.
ImageObserver
object to be notified as the
image is being prepared.
true
if the image has already been
fully prepared; false
otherwise.
public abstract int checkImage(Image image,
int width,
int height,
ImageObserver observer)
If the values of the width and height arguments are both
-1
, this method returns the construction status of
a screen representation of the specified image in this toolkit.
Otherwise, this method returns the construction status of a
scaled representation of the image at the specified width
and height.
This method does not cause the image to begin loading.
An application must call prepareImage
to force
the loading of an image.
This method is called by the component's checkImage
methods.
Information on the flags returned by this method can be found
with the definition of the ImageObserver
interface.
-1
.
-1
.
ImageObserver
object to be
notified as the image is being prepared.
ImageObserver
flags for the
image data that is currently available.
public abstract Image createImage(ImageProducer producer)
public Image createImage(byte imagedata[])
The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.
public abstract Image createImage(byte imagedata[],
int imageoffset,
int imagelength)
public abstract PrintJob getPrintJob(Frame frame,
String jobtitle,
Properties props)
PrintJob
object which is the result
of initiating a print operation on the toolkit's platform.
PrintJob
object, or
null
if the user
cancelled the print job.
public abstract void beep()
public abstract Clipboard getSystemClipboard()
This clipboard enables data transfer between Java programs and native applications which use native clipboard facilities.
public int getMenuShortcutKeyMask()
Menu shortcuts, which are embodied in the
MenuShortcut
class, are handled by the
MenuBar
class.
By default, this method returns Event.CTRL_MASK
.
Toolkit implementations should override this method if the
Control key isn't the correct key for accelerators.
Event
class
that is used for menu shortcuts on this toolkit.
protected static Container getNativeContainer(Component c)
public static String getProperty(String key,
String defaultValue)
public final EventQueue getSystemEventQueue()
protected abstract EventQueue getSystemEventQueueImpl()
All Packages Class Hierarchy This Package Previous Next Index