ToolkitNameToolkit
DescriptionThe abstract Toolkit class provides access to platform-specific details like window size and available fonts. It also deals with creating all the components' peer objects when you call addNotify(). Class Definition
public abstract class java.awt.Toolkit extends java.lang.Object { // Class Methods public static synchronized Toolkit getDefaultToolkit(); protected static Container getNativeContainer (Component c); public static String getProperty (String key, String defaultValue); // Instance Methods public abstract void beep(); public abstract int checkImage (Image image, int width, int height, ImageObserver observer); public abstract Image createImage (ImageProducer producer); public Image createImage (byte[] imagedata); public abstract Image createImage (byte[ ] imagedata, int imageoffset, int imagelength); public abstract ColorModel getColorModel(); public abstract String[] getFontList(); public abstract FontMetrics getFontMetrics (Font font); public abstract Image getImage (String filename); public abstract Image getImage (URL url); public int getMenuShortcutKeyMask(); public abstract PrintJob getPrintJob (Frame frame, String jobtitle, Properties props); public abstract int getScreenResolution(); public abstract Dimension getScreenSize(); public abstract Clipboard getSystemClipboard(); public final EventQueue getSystemEventQueue(); public abstract boolean prepareImage (Image image, int width, int height, ImageObserver observer); public abstract void sync(); // Protected Instance Methods protected abstract ButtonPeer createButton (Button b); protected abstract CanvasPeer createCanvas (Canvas c); protected abstract CheckboxPeer createCheckbox (Checkbox cb); protected abstract CheckboxMenuItemPeer createCheckboxMenuItem (CheckboxMenuItem cmi); protected abstract ChoicePeer createChoice (Choice c); protected LightweightPeer createComponent(Component target); protected abstract DialogPeer createDialog (Dialog d); protected abstract FileDialogPeer createFileDialog (FileDialog fd); protected abstract FramePeer createFrame (Frame f); protected abstract LabelPeer createLabel (Label l); protected abstract ListPeer createList (List l); protected abstract MenuPeer createMenu (Menu m); protected abstract MenuBarPeer createMenuBar (MenuBar mb); protected abstract MenuItemPeer createMenuItem (MenuItem mi); protected abstract PanelPeer createPanel (Panel p); protected abstract PopupMenuPeer createPopupMenu (PopupMenu target); protected abstract ScrollPanePeer createScrollPane (ScrollPane target); protected abstract ScrollbarPeer createScrollbar (Scrollbar sb); protected abstract TextAreaPeer createTextArea (TextArea ta); protected abstract TextFieldPeer createTextField (TextField tf); protected abstract WindowPeer createWindow (Window w); protected abstract FontPeer getFontPeer (String name, int style); protected abstract EventQueue getSystemEventQueueImpl(); protected void loadSystemColors (int[] systemColors); } Class MethodsgetDefaultToolkitpublic static synchronized Toolkit getDefaultToolkit()
getNativeContainerprotected static Container getNativeContainer (Component c)
getPropertypublic static String getProperty (String key, String defaultValue)
Instance Methodsbeeppublic abstract void beep()
checkImagepublic abstract int checkImage (Image image, int width, int height, ImageObserver observer)
createImagepublic abstract Image createImage (ImageProducer producer)
public abstract Image createImage (byte[] imagedata)
public abstract Image createImage (byte[] imagedata, int imageoffset, int imagelength)
getColorModelpublic abstract ColorModel getColorModel()
getFontListpublic abstract String[] getFontList()
getFontMetricspublic abstract FontMetrics getFontMetrics (Font font)
getImagepublic abstract Image getImage (String filename)
public abstract Image getImage (URL url)
getMenuShortcutKeyMaskpublic int getMenuShortcutKeyMask()
getPrintJobpublic abstract PrintJob getPrintJob (Frame frame, String jobtitle, Properties props)
getScreenResolutionpublic abstract int getScreenResolution()
getScreenSizepublic abstract Dimension getScreenSize()
getSystemClipboardpublic abstract Clipboard getSystemClipboard()
getSystemEventQueuepublic final EventQueue getSystemEventQueue()
prepareImagepublic abstract boolean prepareImage (Image image, int width, int height, ImageObserver observer)
syncpublic abstract void sync()
Protected Instance MethodscreateButtonprotected abstract ButtonPeer createButton (Button b)
createCanvasprotected abstract CanvasPeer createCanvas (Canvas c)
createCheckboxprotected abstract CheckboxPeer createCheckbox (Checkbox cb)
createCheckboxMenuItemprotected abstract CheckboxMenuItemPeer createCheckboxMenuItem (CheckboxMenuItem cmi)
createChoiceprotected abstract ChoicePeer createChoice (Choice c)
createComponentprotected LightweightPeer createComponent (Component target)
createDialogprotected abstract DialogPeer createDialog (Dialog d)
createFileDialogprotected abstract FileDialogPeer createFileDialog (FileDialog fd)
createFrameprotected abstract FramePeer createFrame (Frame f)
createLabelprotected abstract LabelPeer createLabel (Label l)
createListprotected abstract ListPeer createList (List l)
createMenuprotected abstract MenuPeer createMenu (Menu m)
createMenuBarprotected abstract MenuBarPeer createMenuBar (MenuBar mb)
createMenuItemprotected abstract MenuItemPeer createMenuItem (MenuItem mi)
createPanelprotected abstract PanelPeer createPanel (Panel p)
createPopupMenuprotected abstract PopupMenuPeer createPopupMenu (PopupMenu target)
createScrollPaneprotected abstract ScrollPanePeer createScrollPane (ScrollPane target)
createScrollbarprotected abstract ScrollbarPeer createScrollbar (Scrollbar sb)
createTextAreaprotected abstract TextAreaPeer createTextArea (TextArea ta)
createTextFieldprotected abstract TextFieldPeer createTextField (TextField tf)
createWindowprotected abstract WindowPeer createWindow (Window w)
getFontPeerprotected abstract FontPeer getFontPeer (String name, int style)
getSystemEventQueueImplprotected abstract getSystemEventQueueImpl()
loadSystemColorsprotected abstract void loadSystemColors (int[] systemColors)
See AlsoButton, ButtonPeer, Canvas, CanvasPeer, Checkbox, CheckboxMenuItem, CheckboxMenuItemPeer, CheckboxPeer, Choice, ChoicePeer, Clipboard, ColorModel, Component, Container, Dialog, DialogPeer, Dimension, FileDialog, FileDialogPeer, Font, FontMetrics, FontPeer, Frame, FramePeer, Image, ImageObserver, ImageProducer, Label, LabelPeer, LightweightPeer, List, ListPeer, Menu, MenuBar, MenuBarPeer, MenuItem, MenuItemPeer, MenuPeer, Panel, PanelPeer, PrintJob, Scrollbar, ScrollbarPeer, ScrollPane, ScrollPanePeer, String, TextArea, TextAreaPeer, TextField, TextFieldPeer, Window, WindowPeer |
|