Class java.awt.Toolkit
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.
- Toolkit()
- 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.
- createButton(Button)
- Uses the specified Peer interface to create a new Button.
- createCanvas(Canvas)
- Uses the specified Peer interface to create a new Canvas.
- createCheckbox(Checkbox)
- Uses the specified Peer interface to create a new Checkbox.
- createCheckboxMenuItem(CheckboxMenuItem)
- Uses the specified Peer interface to create a new CheckboxMenuItem.
- createChoice(Choice)
- Uses the specified Peer interface to create a new Choice.
- createDialog(Dialog)
- Uses the specified Peer interface to create a new Dialog.
- createFileDialog(FileDialog)
- Uses the specified Peer interface to create a new FileDialog.
- createFrame(Frame)
- Uses the specified Peer interface to create a new Frame.
- createImage(ImageProducer)
- Creates an image with the specified image producer.
- createLabel(Label)
- Uses the specified Peer interface to create a new Label.
- createList(List)
- Uses the specified Peer interface to create a new List.
- createMenu(Menu)
- Uses the specified Peer interface to create a new Menu.
- createMenuBar(MenuBar)
- Uses the specified Peer interface to create a new MenuBar.
- createMenuItem(MenuItem)
- Uses the specified Peer interface to create a new MenuItem.
- createPanel(Panel)
- Uses the specified Peer interface to create a new Panel.
- createScrollbar(Scrollbar)
- Uses the specified Peer interface to create a new Scrollbar.
- createTextArea(TextArea)
- Uses the specified Peer interface to create a new TextArea.
- createTextField(TextField)
- Uses the specified Peer interface to create a new TextField.
- createWindow(Window)
- Uses the specified Peer interface to create a new Window.
- getColorModel()
- Returns the ColorModel of the screen.
- getDefaultToolkit()
- Returns the default toolkit.
- getFontList()
- Returns the names of the available fonts.
- getFontMetrics(Font)
- Returns the screen metrics of the font.
- getImage(String)
- Returns an image which gets pixel data from the specified file.
- getImage(URL)
- Returns an image which gets pixel data from the specified URL.
- getScreenResolution()
- Returns the screen resolution in dots-per-inch.
- getScreenSize()
- Gets the size of the screen.
- prepareImage(Image, int, int, ImageObserver)
- Prepares an image for rendering on the default screen at the
specified width and height.
- sync()
- Syncs the graphics state; useful when doing animation.
Toolkit
public Toolkit()
createButton
protected abstract ButtonPeer createButton(Button target)
- Uses the specified Peer interface to create a new Button.
- Parameters:
- target - the Button to be created
createTextField
protected abstract TextFieldPeer createTextField(TextField target)
- Uses the specified Peer interface to create a new TextField.
- Parameters:
- target - the TextField to be created
createLabel
protected abstract LabelPeer createLabel(Label target)
- Uses the specified Peer interface to create a new Label.
- Parameters:
- target - the Label to be created
createList
protected abstract ListPeer createList(List target)
- Uses the specified Peer interface to create a new List.
- Parameters:
- target - the List to be created
createCheckbox
protected abstract CheckboxPeer createCheckbox(Checkbox target)
- Uses the specified Peer interface to create a new Checkbox.
- Parameters:
- target - the Checkbox to be created
createScrollbar
protected abstract ScrollbarPeer createScrollbar(Scrollbar target)
- Uses the specified Peer interface to create a new Scrollbar.
- Parameters:
- target - the Scrollbar to be created
createTextArea
protected abstract TextAreaPeer createTextArea(TextArea target)
- Uses the specified Peer interface to create a new TextArea.
- Parameters:
- target - the TextArea to be created
createChoice
protected abstract ChoicePeer createChoice(Choice target)
- Uses the specified Peer interface to create a new Choice.
- Parameters:
- target - the Choice to be created
createFrame
protected abstract FramePeer createFrame(Frame target)
- Uses the specified Peer interface to create a new Frame.
- Parameters:
- target - the Frame to be created
createCanvas
protected abstract CanvasPeer createCanvas(Canvas target)
- Uses the specified Peer interface to create a new Canvas.
- Parameters:
- target - the Canvas to be created
createPanel
protected abstract PanelPeer createPanel(Panel target)
- Uses the specified Peer interface to create a new Panel.
- Parameters:
- target - the Panel to be created
createWindow
protected abstract WindowPeer createWindow(Window target)
- Uses the specified Peer interface to create a new Window.
- Parameters:
- target - the Window to be created
createDialog
protected abstract DialogPeer createDialog(Dialog target)
- Uses the specified Peer interface to create a new Dialog.
- Parameters:
- target - the Dialog to be created
createMenuBar
protected abstract MenuBarPeer createMenuBar(MenuBar target)
- Uses the specified Peer interface to create a new MenuBar.
- Parameters:
- target - the MenuBar to be created
createMenu
protected abstract MenuPeer createMenu(Menu target)
- Uses the specified Peer interface to create a new Menu.
- Parameters:
- target - the Menu to be created
createMenuItem
protected abstract MenuItemPeer createMenuItem(MenuItem target)
- Uses the specified Peer interface to create a new MenuItem.
- Parameters:
- target - the MenuItem to be created
createFileDialog
protected abstract FileDialogPeer createFileDialog(FileDialog target)
- Uses the specified Peer interface to create a new FileDialog.
- Parameters:
- target - the FileDialog to be created
createCheckboxMenuItem
protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
- Uses the specified Peer interface to create a new CheckboxMenuItem.
- Parameters:
- target - the CheckboxMenuItem to be created
getScreenSize
public abstract Dimension getScreenSize()
- Gets the size of the screen.
getScreenResolution
public abstract int getScreenResolution()
- Returns the screen resolution in dots-per-inch.
getColorModel
public abstract ColorModel getColorModel()
- Returns the ColorModel of the screen.
getFontList
public abstract String[] getFontList()
- Returns the names of the available fonts.
getFontMetrics
public abstract FontMetrics getFontMetrics(Font font)
- Returns the screen metrics of the font.
sync
public abstract void sync()
- Syncs the graphics state; useful when doing animation.
getDefaultToolkit
public static synchronized Toolkit getDefaultToolkit()
- Returns the default toolkit. This is controlled by the
"awt.toolkit" property.
- Throws: AWTError
- Toolkit not found or could not be instantiated.
getImage
public abstract Image getImage(String filename)
- 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
getImage
public abstract Image getImage(URL url)
- Returns an image which gets pixel data from the specified URL.
- Parameters:
- url - the URL to use in fetching the pixel data
prepareImage
public abstract boolean prepareImage(Image image,
int width,
int height,
ImageObserver observer)
- Prepares an image for rendering on the default screen at the
specified width and height.
checkImage
public abstract int checkImage(Image image,
int width,
int height,
ImageObserver observer)
- Returns the status of the construction of the indicated method
at the indicated width and height for the default screen.
createImage
public abstract Image createImage(ImageProducer producer)
- Creates an image with the specified image producer.
- Parameters:
- producer - the image producer to be used
All Packages Class Hierarchy This Package Previous Next Index