All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Toolkit

java.lang.Object
   |
   +----java.awt.Toolkit

public class Toolkit
extends Object
An AWT toolkit. It is used to bind the abstract AWT classes to a particular native toolkit implementation.


Constructor Index

 o Toolkit()

Method Index

 o beep()
Emits an audio beep.
 o checkImage(Image, int, int, ImageObserver)
Returns the status of the construction of the indicated method at the indicated width and height for the default screen.
 o createButton(Button)
Uses the specified Peer interface to create a new Button.
 o createCanvas(Canvas)
Uses the specified Peer interface to create a new Canvas.
 o createCheckbox(Checkbox)
Uses the specified Peer interface to create a new Checkbox.
 o createCheckboxMenuItem(CheckboxMenuItem)
Uses the specified Peer interface to create a new CheckboxMenuItem.
 o createChoice(Choice)
Uses the specified Peer interface to create a new Choice.
 o createComponent(Component)
Creates a peer for a component or container.
 o createDialog(Dialog)
Uses the specified Peer interface to create a new Dialog.
 o createFileDialog(FileDialog)
Uses the specified Peer interface to create a new FileDialog.
 o createFrame(Frame)
Uses the specified Peer interface to create a new Frame.
 o createImage(byte[])
Creates an image which decodes the image stored in the specified byte array.
 o createImage(byte[], int, int)
Creates an image which decodes the image stored in the specified byte array at the specified offset and length.
 o createImage(ImageProducer)
Creates an image with the specified image producer.
 o createLabel(Label)
Uses the specified Peer interface to create a new Label.
 o createList(List)
Uses the specified Peer interface to create a new List.
 o createMenu(Menu)
Uses the specified Peer interface to create a new Menu.
 o createMenuBar(MenuBar)
Uses the specified Peer interface to create a new MenuBar.
 o createMenuItem(MenuItem)
Uses the specified Peer interface to create a new MenuItem.
 o createPanel(Panel)
Uses the specified Peer interface to create a new Panel.
 o createPopupMenu(PopupMenu)
Uses the specified Peer interface to create a new PopupMenu.
 o createScrollbar(Scrollbar)
Uses the specified Peer interface to create a new Scrollbar.
 o createScrollPane(ScrollPane)
Uses the specified Peer interface to create a new scrolling container.
 o createTextArea(TextArea)
Uses the specified Peer interface to create a new TextArea.
 o createTextField(TextField)
Uses the specified Peer interface to create a new TextField.
 o createWindow(Window)
Uses the specified Peer interface to create a new Window.
 o getColorModel()
Returns the ColorModel of the screen.
 o getDefaultToolkit()
Returns the default toolkit.
 o getFontList()
Returns the names of the available fonts.

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.

 o getFontMetrics(Font)
Returns the screen metrics of the font.
 o getFontPeer(String, int)
Uses the specified Peer interface to create a new Font.
 o getImage(String)
Returns an image which gets pixel data from the specified file.
 o getImage(URL)
Returns an image which gets pixel data from the specified URL.
 o getMenuShortcutKeyMask()
Return the Event modifier mask appropriate for shortcuts.
 o getNativeContainer(Component)
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
 o getPrintJob(Frame, String, Properties)
Returns a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
 o getProperty(String, String)
Gets a property with the specified key and default.
 o getScreenResolution()
Returns the screen resolution in dots-per-inch.
 o getScreenSize()
Gets the size of the screen.
 o getSystemClipboard()
Returns an instance of the "system" clipboard which interfaces with the clipboard facilities on the native platform.
 o getSystemEventQueue()
Get the application's or applet's EventQueue instance.
 o getSystemEventQueueImpl()
 o loadSystemColors(int[])
Fills in the provided int array with the current system color values
 o prepareImage(Image, int, int, ImageObserver)
Prepares an image for rendering on the default screen at the specified width and height.
 o sync()
Syncs the graphics state; useful when doing animation.

Constructors

 o Toolkit
    method Toolkit() public 

Methods

 o createButton
    method createButton(target=Button) returns ButtonPeer Inheritable abstract    
Uses the specified Peer interface to create a new Button.

Parameters:
target - the Button to be created
 o createTextField
    method createTextField(target=TextField) returns TextFieldPeer Inheritable abstract    
Uses the specified Peer interface to create a new TextField.

Parameters:
target - the TextField to be created
 o createLabel
    method createLabel(target=Label) returns LabelPeer Inheritable abstract    
Uses the specified Peer interface to create a new Label.

Parameters:
target - the Label to be created
 o createList
    method createList(target=List) returns ListPeer Inheritable abstract    
Uses the specified Peer interface to create a new List.

Parameters:
target - the List to be created
 o createCheckbox
    method createCheckbox(target=Checkbox) returns CheckboxPeer Inheritable abstract    
Uses the specified Peer interface to create a new Checkbox.

Parameters:
target - the Checkbox to be created
 o createScrollbar
    method createScrollbar(target=Scrollbar) returns ScrollbarPeer Inheritable abstract    
Uses the specified Peer interface to create a new Scrollbar.

Parameters:
target - the Scrollbar to be created
 o createScrollPane
    method createScrollPane(target=ScrollPane) returns ScrollPanePeer Inheritable abstract    
Uses the specified Peer interface to create a new scrolling container.

Parameters:
target - the ScrollPane to be created
 o createTextArea
    method createTextArea(target=TextArea) returns TextAreaPeer Inheritable abstract    
Uses the specified Peer interface to create a new TextArea.

Parameters:
target - the TextArea to be created
 o createChoice
    method createChoice(target=Choice) returns ChoicePeer Inheritable abstract    
Uses the specified Peer interface to create a new Choice.

Parameters:
target - the Choice to be created
 o createFrame
    method createFrame(target=Frame) returns FramePeer Inheritable abstract    
Uses the specified Peer interface to create a new Frame.

Parameters:
target - the Frame to be created
 o createCanvas
    method createCanvas(target=Canvas) returns CanvasPeer Inheritable abstract    
Uses the specified Peer interface to create a new Canvas.

Parameters:
target - the Canvas to be created
 o createPanel
    method createPanel(target=Panel) returns PanelPeer Inheritable abstract    
Uses the specified Peer interface to create a new Panel.

Parameters:
target - the Panel to be created
 o createWindow
    method createWindow(target=Window) returns WindowPeer Inheritable abstract    
Uses the specified Peer interface to create a new Window.

Parameters:
target - the Window to be created
 o createDialog
    method createDialog(target=Dialog) returns DialogPeer Inheritable abstract    
Uses the specified Peer interface to create a new Dialog.

Parameters:
target - the Dialog to be created
 o createMenuBar
    method createMenuBar(target=MenuBar) returns MenuBarPeer Inheritable abstract    
Uses the specified Peer interface to create a new MenuBar.

Parameters:
target - the MenuBar to be created
 o createMenu
    method createMenu(target=Menu) returns MenuPeer Inheritable abstract    
Uses the specified Peer interface to create a new Menu.

Parameters:
target - the Menu to be created
 o createPopupMenu
    method createPopupMenu(target=PopupMenu) returns PopupMenuPeer Inheritable abstract    
Uses the specified Peer interface to create a new PopupMenu.

Parameters:
target - the PopupMenu to be created
 o createMenuItem
    method createMenuItem(target=MenuItem) returns MenuItemPeer Inheritable abstract    
Uses the specified Peer interface to create a new MenuItem.

Parameters:
target - the MenuItem to be created
 o createFileDialog
    method createFileDialog(target=FileDialog) returns FileDialogPeer Inheritable abstract    
Uses the specified Peer interface to create a new FileDialog.

Parameters:
target - the FileDialog to be created
 o createCheckboxMenuItem
    method createCheckboxMenuItem(target=CheckboxMenuItem) returns CheckboxMenuItemPeer Inheritable abstract    
Uses the specified Peer interface to create a new CheckboxMenuItem.

Parameters:
target - the CheckboxMenuItem to be created
 o createComponent
    method createComponent(target=Component) returns LightweightPeer Inheritable     
Creates a peer for a component or container. This peer is windowless and allows the Component and Container classes to be extended directly to create windowless components that are defined entirely in java.

Parameters:
target - The Component to be created.
 o getFontPeer
    method getFontPeer(name=String, -
                       style=int) returns FontPeer Inheritable abstract    
Uses the specified Peer interface to create a new Font.

Parameters:
name - the font name
style - style the constant style used
 o loadSystemColors
    method loadSystemColors(systemColors=int[])  Inheritable     
Fills in the provided int array with the current system color values

 o getScreenSize
    method getScreenSize() returns Dimension public abstract    
Gets the size of the screen.

 o getScreenResolution
    method getScreenResolution() returns int public abstract    
Returns the screen resolution in dots-per-inch.

 o getColorModel
    method getColorModel() returns ColorModel public abstract    
Returns the ColorModel of the screen.

 o getFontList
    method getFontList() returns String[] public abstract    
Returns the names of the available fonts.

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.

 o getFontMetrics
    method getFontMetrics(font=Font) returns FontMetrics public abstract    
Returns the screen metrics of the font.

 o sync
    method sync()  public abstract    
Syncs the graphics state; useful when doing animation.

 o getDefaultToolkit
    method getDefaultToolkit() returns Toolkit public  static  protect 
Returns the default toolkit. This is controlled by the "awt.toolkit" property.

Throws: AWTError
Toolkit not found or could not be instantiated.
 o getImage
    method getImage(filename=String) returns Image public abstract    
Returns an image which gets pixel data from the specified file.

Parameters:
filename - the file containing the pixel data in one of the recognized file formats
 o getImage
    method getImage(url=URL) returns Image public abstract    
Returns an image which gets pixel data from the specified URL.

Parameters:
url - the URL to use in fetching the pixel data
 o prepareImage
    method prepareImage(image=Image, -
                        width=int, -
                        height=int, -
                        observer=ImageObserver) returns boolean public abstract    
Prepares an image for rendering on the default screen at the specified width and height.

 o checkImage
    method checkImage(image=Image, -
                      width=int, -
                      height=int, -
                      observer=ImageObserver) returns int public abstract    
Returns the status of the construction of the indicated method at the indicated width and height for the default screen.

 o createImage
    method createImage(producer=ImageProducer) returns Image public abstract    
Creates an image with the specified image producer.

Parameters:
producer - the image producer to be used
 o createImage
    method createImage(imagedata=byte[]) returns Image public     
Creates an image which decodes the image stored in the specified byte array. The data must be in some image format supported by the toolkit (such as GIF or JPEG).

Parameters:
imagedata - the array of image data in a supported image format
 o createImage
    method createImage(imagedata=byte[], -
                       imageoffset=int, -
                       imagelength=int) returns Image public abstract    
Creates an image which decodes the image stored in the specified byte array at the specified offset and length. The data must be in some image format supported by the toolkit (such as GIF or JPEG).

Parameters:
imagedata - the array of image data in a supported image format
imageoffset - the offset of the start of the data in the array
imagelength - the length of the data in the array
 o getPrintJob
    method getPrintJob(frame=Frame, -
                       jobtitle=String, -
                       props=Properties) returns PrintJob public abstract    
Returns a PrintJob object which is the result of initiating a print operation on the toolkit's platform. Returns null if the user cancelled print job.

 o beep
    method beep()  public abstract    
Emits an audio beep.

 o getSystemClipboard
    method getSystemClipboard() returns Clipboard public abstract    
Returns an instance of the "system" clipboard which interfaces with the clipboard facilities on the native platform. This clipboard enables data transfer between java programs and native platform applications which use these native clipboard facilities.

 o getMenuShortcutKeyMask
    method getMenuShortcutKeyMask() returns int public     
Return the Event modifier mask appropriate for shortcuts. Toolkit implementation should override this method if the CONTROL key isn't the correct key for accelerators.

 o getNativeContainer
    method getNativeContainer(c=Component) returns Container Inheritable  static   
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).

 o getProperty
    method getProperty(key=String, -
                       defaultValue=String) returns String public  static   
Gets a property with the specified key and default. This method returns defaultValue if the property is not found.

 o getSystemEventQueue
    method getSystemEventQueue() returns EventQueue public   final  
Get the application's or applet's EventQueue instance. Depending on the Toolkit implementation, different EventQueues may be returned for different applets. Applets should therefore not assume that the EventQueue instance returned by this method will be shared by other applets or the system.

 o getSystemEventQueueImpl
    method getSystemEventQueueImpl() returns EventQueue Inheritable abstract    

All Packages  Class Hierarchy  This Package  Previous  Next  Index