java.awt
Class Toolkit

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Toolkit

public abstract class Toolkit
extends Object sample code for java.lang.Object definition code for java.lang.Object

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:

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.

Since:
JDK1.0

Field Summary
protected  Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Object sample code for java.lang.Object definition code for java.lang.Object > desktopProperties sample code for java.awt.Toolkit.desktopProperties definition code for java.awt.Toolkit.desktopProperties
           
protected  PropertyChangeSupport sample code for java.beans.PropertyChangeSupport definition code for java.beans.PropertyChangeSupport desktopPropsSupport sample code for java.awt.Toolkit.desktopPropsSupport definition code for java.awt.Toolkit.desktopPropsSupport
           
 
Constructor Summary
Toolkit sample code for java.awt.Toolkit.Toolkit() definition code for java.awt.Toolkit.Toolkit() ()
           
 
Method Summary
 void addAWTEventListener sample code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) definition code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) (AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener  listener, long eventMask)
          Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.
 void addPropertyChangeListener sample code for java.awt.Toolkit.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Toolkit.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  name, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  pcl)
          Adds the specified property change listener for the named desktop property.
abstract  void beep sample code for java.awt.Toolkit.beep() definition code for java.awt.Toolkit.beep() ()
          Emits an audio beep.
abstract  int checkImage sample code for java.awt.Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) (Image sample code for java.awt.Image definition code for java.awt.Image  image, int width, int height, ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver  observer)
          Indicates the construction status of a specified image that is being prepared for display.
protected abstract  ButtonPeer sample code for java.awt.peer.ButtonPeer definition code for java.awt.peer.ButtonPeer createButton sample code for java.awt.Toolkit.createButton(java.awt.Button) definition code for java.awt.Toolkit.createButton(java.awt.Button) (Button sample code for java.awt.Button definition code for java.awt.Button  target)
          Creates this toolkit's implementation of Button using the specified peer interface.
protected abstract  CanvasPeer sample code for java.awt.peer.CanvasPeer definition code for java.awt.peer.CanvasPeer createCanvas sample code for java.awt.Toolkit.createCanvas(java.awt.Canvas) definition code for java.awt.Toolkit.createCanvas(java.awt.Canvas) (Canvas sample code for java.awt.Canvas definition code for java.awt.Canvas  target)
          Creates this toolkit's implementation of Canvas using the specified peer interface.
protected abstract  CheckboxPeer sample code for java.awt.peer.CheckboxPeer definition code for java.awt.peer.CheckboxPeer createCheckbox sample code for java.awt.Toolkit.createCheckbox(java.awt.Checkbox) definition code for java.awt.Toolkit.createCheckbox(java.awt.Checkbox) (Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox  target)
          Creates this toolkit's implementation of Checkbox using the specified peer interface.
protected abstract  CheckboxMenuItemPeer sample code for java.awt.peer.CheckboxMenuItemPeer definition code for java.awt.peer.CheckboxMenuItemPeer createCheckboxMenuItem sample code for java.awt.Toolkit.createCheckboxMenuItem(java.awt.CheckboxMenuItem) definition code for java.awt.Toolkit.createCheckboxMenuItem(java.awt.CheckboxMenuItem) (CheckboxMenuItem sample code for java.awt.CheckboxMenuItem definition code for java.awt.CheckboxMenuItem  target)
          Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.
protected abstract  ChoicePeer sample code for java.awt.peer.ChoicePeer definition code for java.awt.peer.ChoicePeer createChoice sample code for java.awt.Toolkit.createChoice(java.awt.Choice) definition code for java.awt.Toolkit.createChoice(java.awt.Choice) (Choice sample code for java.awt.Choice definition code for java.awt.Choice  target)
          Creates this toolkit's implementation of Choice using the specified peer interface.
protected  LightweightPeer sample code for java.awt.peer.LightweightPeer definition code for java.awt.peer.LightweightPeer createComponent sample code for java.awt.Toolkit.createComponent(java.awt.Component) definition code for java.awt.Toolkit.createComponent(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  target)
          Creates a peer for a component or container.
 Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor createCustomCursor sample code for java.awt.Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String) definition code for java.awt.Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String) (Image sample code for java.awt.Image definition code for java.awt.Image  cursor, Point sample code for java.awt.Point definition code for java.awt.Point  hotSpot, String sample code for java.lang.String definition code for java.lang.String  name)
          Creates a new custom cursor object.
protected abstract  DialogPeer sample code for java.awt.peer.DialogPeer definition code for java.awt.peer.DialogPeer createDialog sample code for java.awt.Toolkit.createDialog(java.awt.Dialog) definition code for java.awt.Toolkit.createDialog(java.awt.Dialog) (Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog  target)
          Creates this toolkit's implementation of Dialog using the specified peer interface.
<T extends DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer >
T
createDragGestureRecognizer sample code for java.awt.Toolkit.createDragGestureRecognizer(java.lang.Class, java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) definition code for java.awt.Toolkit.createDragGestureRecognizer(java.lang.Class, java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) (Class sample code for java.lang.Class definition code for java.lang.Class <T> abstractRecognizerClass, DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds, Component sample code for java.awt.Component definition code for java.awt.Component  c, int srcActions, DragGestureListener sample code for java.awt.dnd.DragGestureListener definition code for java.awt.dnd.DragGestureListener  dgl)
          Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified.
abstract  DragSourceContextPeer sample code for java.awt.dnd.peer.DragSourceContextPeer definition code for java.awt.dnd.peer.DragSourceContextPeer createDragSourceContextPeer sample code for java.awt.Toolkit.createDragSourceContextPeer(java.awt.dnd.DragGestureEvent) definition code for java.awt.Toolkit.createDragSourceContextPeer(java.awt.dnd.DragGestureEvent) (DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent  dge)
          Creates the peer for a DragSourceContext.
protected abstract  FileDialogPeer sample code for java.awt.peer.FileDialogPeer definition code for java.awt.peer.FileDialogPeer createFileDialog sample code for java.awt.Toolkit.createFileDialog(java.awt.FileDialog) definition code for java.awt.Toolkit.createFileDialog(java.awt.FileDialog) (FileDialog sample code for java.awt.FileDialog definition code for java.awt.FileDialog  target)
          Creates this toolkit's implementation of FileDialog using the specified peer interface.
protected abstract  FramePeer sample code for java.awt.peer.FramePeer definition code for java.awt.peer.FramePeer createFrame sample code for java.awt.Toolkit.createFrame(java.awt.Frame) definition code for java.awt.Toolkit.createFrame(java.awt.Frame) (Frame sample code for java.awt.Frame definition code for java.awt.Frame  target)
          Creates this toolkit's implementation of Frame using the specified peer interface.
 Image sample code for java.awt.Image definition code for java.awt.Image createImage sample code for java.awt.Toolkit.createImage(byte[]) definition code for java.awt.Toolkit.createImage(byte[]) (byte[] imagedata)
          Creates an image which decodes the image stored in the specified byte array.
abstract  Image sample code for java.awt.Image definition code for java.awt.Image createImage sample code for java.awt.Toolkit.createImage(byte[], int, int) definition code for java.awt.Toolkit.createImage(byte[], int, int) (byte[] imagedata, int imageoffset, int imagelength)
          Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
abstract  Image sample code for java.awt.Image definition code for java.awt.Image createImage sample code for java.awt.Toolkit.createImage(java.awt.image.ImageProducer) definition code for java.awt.Toolkit.createImage(java.awt.image.ImageProducer) (ImageProducer sample code for java.awt.image.ImageProducer definition code for java.awt.image.ImageProducer  producer)
          Creates an image with the specified image producer.
abstract  Image sample code for java.awt.Image definition code for java.awt.Image createImage sample code for java.awt.Toolkit.createImage(java.lang.String) definition code for java.awt.Toolkit.createImage(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  filename)
          Returns an image which gets pixel data from the specified file.
abstract  Image sample code for java.awt.Image definition code for java.awt.Image createImage sample code for java.awt.Toolkit.createImage(java.net.URL) definition code for java.awt.Toolkit.createImage(java.net.URL) (URL sample code for java.net.URL definition code for java.net.URL  url)
          Returns an image which gets pixel data from the specified URL.
protected abstract  LabelPeer sample code for java.awt.peer.LabelPeer definition code for java.awt.peer.LabelPeer createLabel sample code for java.awt.Toolkit.createLabel(java.awt.Label) definition code for java.awt.Toolkit.createLabel(java.awt.Label) (Label sample code for java.awt.Label definition code for java.awt.Label  target)
          Creates this toolkit's implementation of Label using the specified peer interface.
protected abstract  ListPeer sample code for java.awt.peer.ListPeer definition code for java.awt.peer.ListPeer createList sample code for java.awt.Toolkit.createList(java.awt.List) definition code for java.awt.Toolkit.createList(java.awt.List) (List sample code for java.awt.List definition code for java.awt.List  target)
          Creates this toolkit's implementation of List using the specified peer interface.
protected abstract  MenuPeer sample code for java.awt.peer.MenuPeer definition code for java.awt.peer.MenuPeer createMenu sample code for java.awt.Toolkit.createMenu(java.awt.Menu) definition code for java.awt.Toolkit.createMenu(java.awt.Menu) (Menu sample code for java.awt.Menu definition code for java.awt.Menu  target)
          Creates this toolkit's implementation of Menu using the specified peer interface.
protected abstract  MenuBarPeer sample code for java.awt.peer.MenuBarPeer definition code for java.awt.peer.MenuBarPeer createMenuBar sample code for java.awt.Toolkit.createMenuBar(java.awt.MenuBar) definition code for java.awt.Toolkit.createMenuBar(java.awt.MenuBar) (MenuBar sample code for java.awt.MenuBar definition code for java.awt.MenuBar  target)
          Creates this toolkit's implementation of MenuBar using the specified peer interface.
protected abstract  MenuItemPeer sample code for java.awt.peer.MenuItemPeer definition code for java.awt.peer.MenuItemPeer createMenuItem sample code for java.awt.Toolkit.createMenuItem(java.awt.MenuItem) definition code for java.awt.Toolkit.createMenuItem(java.awt.MenuItem) (MenuItem sample code for java.awt.MenuItem definition code for java.awt.MenuItem  target)
          Creates this toolkit's implementation of MenuItem using the specified peer interface.
protected abstract  PanelPeer sample code for java.awt.peer.PanelPeer definition code for java.awt.peer.PanelPeer createPanel sample code for java.awt.Toolkit.createPanel(java.awt.Panel) definition code for java.awt.Toolkit.createPanel(java.awt.Panel) (Panel sample code for java.awt.Panel definition code for java.awt.Panel  target)
          Creates this toolkit's implementation of Panel using the specified peer interface.
protected abstract  PopupMenuPeer sample code for java.awt.peer.PopupMenuPeer definition code for java.awt.peer.PopupMenuPeer createPopupMenu sample code for java.awt.Toolkit.createPopupMenu(java.awt.PopupMenu) definition code for java.awt.Toolkit.createPopupMenu(java.awt.PopupMenu) (PopupMenu sample code for java.awt.PopupMenu definition code for java.awt.PopupMenu  target)
          Creates this toolkit's implementation of PopupMenu using the specified peer interface.
protected abstract  ScrollbarPeer sample code for java.awt.peer.ScrollbarPeer definition code for java.awt.peer.ScrollbarPeer createScrollbar sample code for java.awt.Toolkit.createScrollbar(java.awt.Scrollbar) definition code for java.awt.Toolkit.createScrollbar(java.awt.Scrollbar) (Scrollbar sample code for java.awt.Scrollbar definition code for java.awt.Scrollbar  target)
          Creates this toolkit's implementation of Scrollbar using the specified peer interface.
protected abstract  ScrollPanePeer sample code for java.awt.peer.ScrollPanePeer definition code for java.awt.peer.ScrollPanePeer createScrollPane sample code for java.awt.Toolkit.createScrollPane(java.awt.ScrollPane) definition code for java.awt.Toolkit.createScrollPane(java.awt.ScrollPane) (ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane  target)
          Creates this toolkit's implementation of ScrollPane using the specified peer interface.
protected abstract  TextAreaPeer sample code for java.awt.peer.TextAreaPeer definition code for java.awt.peer.TextAreaPeer createTextArea sample code for java.awt.Toolkit.createTextArea(java.awt.TextArea) definition code for java.awt.Toolkit.createTextArea(java.awt.TextArea) (TextArea sample code for java.awt.TextArea definition code for java.awt.TextArea  target)
          Creates this toolkit's implementation of TextArea using the specified peer interface.
protected abstract  TextFieldPeer sample code for java.awt.peer.TextFieldPeer definition code for java.awt.peer.TextFieldPeer createTextField sample code for java.awt.Toolkit.createTextField(java.awt.TextField) definition code for java.awt.Toolkit.createTextField(java.awt.TextField) (TextField sample code for java.awt.TextField definition code for java.awt.TextField  target)
          Creates this toolkit's implementation of TextField using the specified peer interface.
protected abstract  WindowPeer sample code for java.awt.peer.WindowPeer definition code for java.awt.peer.WindowPeer createWindow sample code for java.awt.Toolkit.createWindow(java.awt.Window) definition code for java.awt.Toolkit.createWindow(java.awt.Window) (Window sample code for java.awt.Window definition code for java.awt.Window  target)
          Creates this toolkit's implementation of Window using the specified peer interface.
 AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener [] getAWTEventListeners sample code for java.awt.Toolkit.getAWTEventListeners() definition code for java.awt.Toolkit.getAWTEventListeners() ()
          Returns an array of all the AWTEventListeners registered on this toolkit.
 AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener [] getAWTEventListeners sample code for java.awt.Toolkit.getAWTEventListeners(long) definition code for java.awt.Toolkit.getAWTEventListeners(long) (long eventMask)
          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 sample code for java.awt.Dimension definition code for java.awt.Dimension getBestCursorSize sample code for java.awt.Toolkit.getBestCursorSize(int, int) definition code for java.awt.Toolkit.getBestCursorSize(int, int) (int preferredWidth, int preferredHeight)
          Returns the supported cursor dimension which is closest to the desired sizes.
abstract  ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel getColorModel sample code for java.awt.Toolkit.getColorModel() definition code for java.awt.Toolkit.getColorModel() ()
          Determines the color model of this toolkit's screen.
static Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit getDefaultToolkit sample code for java.awt.Toolkit.getDefaultToolkit() definition code for java.awt.Toolkit.getDefaultToolkit() ()
          Gets the default toolkit.
 Object sample code for java.lang.Object definition code for java.lang.Object getDesktopProperty sample code for java.awt.Toolkit.getDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.getDesktopProperty(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  propertyName)
          Obtains a value for the specified desktop property.
abstract  String sample code for java.lang.String definition code for java.lang.String [] getFontList sample code for java.awt.Toolkit.getFontList() definition code for java.awt.Toolkit.getFontList() ()
          Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames() sample code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames() definition code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames()
abstract  FontMetrics sample code for java.awt.FontMetrics definition code for java.awt.FontMetrics getFontMetrics sample code for java.awt.Toolkit.getFontMetrics(java.awt.Font) definition code for java.awt.Toolkit.getFontMetrics(java.awt.Font) (Font sample code for java.awt.Font definition code for java.awt.Font  font)
          Deprecated. As of JDK version 1.2, replaced by the Font method getLineMetrics.
protected abstract  FontPeer sample code for java.awt.peer.FontPeer definition code for java.awt.peer.FontPeer getFontPeer sample code for java.awt.Toolkit.getFontPeer(java.lang.String, int) definition code for java.awt.Toolkit.getFontPeer(java.lang.String, int) (String sample code for java.lang.String definition code for java.lang.String  name, int style)
          Deprecated. see java.awt.GraphicsEnvironment#getAllFonts
abstract  Image sample code for java.awt.Image definition code for java.awt.Image getImage sample code for java.awt.Toolkit.getImage(java.lang.String) definition code for java.awt.Toolkit.getImage(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  filename)
          Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
abstract  Image sample code for java.awt.Image definition code for java.awt.Image getImage sample code for java.awt.Toolkit.getImage(java.net.URL) definition code for java.awt.Toolkit.getImage(java.net.URL) (URL sample code for java.net.URL definition code for java.net.URL  url)
          Returns an image which gets pixel data from the specified URL.
 boolean getLockingKeyState sample code for java.awt.Toolkit.getLockingKeyState(int) definition code for java.awt.Toolkit.getLockingKeyState(int) (int keyCode)
          Returns whether the given locking key on the keyboard is currently in its "on" state.
 int getMaximumCursorColors sample code for java.awt.Toolkit.getMaximumCursorColors() definition code for java.awt.Toolkit.getMaximumCursorColors() ()
          Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
 int getMenuShortcutKeyMask sample code for java.awt.Toolkit.getMenuShortcutKeyMask() definition code for java.awt.Toolkit.getMenuShortcutKeyMask() ()
          Determines which modifier key is the appropriate accelerator key for menu shortcuts.
protected  MouseInfoPeer sample code for java.awt.peer.MouseInfoPeer definition code for java.awt.peer.MouseInfoPeer getMouseInfoPeer sample code for java.awt.Toolkit.getMouseInfoPeer() definition code for java.awt.Toolkit.getMouseInfoPeer() ()
          Obtains this toolkit's implementation of helper class for MouseInfo operations.
protected static Container sample code for java.awt.Container definition code for java.awt.Container getNativeContainer sample code for java.awt.Toolkit.getNativeContainer(java.awt.Component) definition code for java.awt.Toolkit.getNativeContainer(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
 PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob getPrintJob sample code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.awt.JobAttributes, java.awt.PageAttributes) definition code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.awt.JobAttributes, java.awt.PageAttributes) (Frame sample code for java.awt.Frame definition code for java.awt.Frame  frame, String sample code for java.lang.String definition code for java.lang.String  jobtitle, JobAttributes sample code for java.awt.JobAttributes definition code for java.awt.JobAttributes  jobAttributes, PageAttributes sample code for java.awt.PageAttributes definition code for java.awt.PageAttributes  pageAttributes)
          Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
abstract  PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob getPrintJob sample code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties) definition code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties) (Frame sample code for java.awt.Frame definition code for java.awt.Frame  frame, String sample code for java.lang.String definition code for java.lang.String  jobtitle, Properties sample code for java.util.Properties definition code for java.util.Properties  props)
          Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
static String sample code for java.lang.String definition code for java.lang.String getProperty sample code for java.awt.Toolkit.getProperty(java.lang.String, java.lang.String) definition code for java.awt.Toolkit.getProperty(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  key, String sample code for java.lang.String definition code for java.lang.String  defaultValue)
          Gets a property with the specified key and default.
 PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners sample code for java.awt.Toolkit.getPropertyChangeListeners() definition code for java.awt.Toolkit.getPropertyChangeListeners() ()
          Returns an array of all the property change listeners registered on this toolkit.
 PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners sample code for java.awt.Toolkit.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Toolkit.getPropertyChangeListeners(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  propertyName)
          Returns an array of all the PropertyChangeListeners associated with the named property.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getScreenInsets sample code for java.awt.Toolkit.getScreenInsets(java.awt.GraphicsConfiguration) definition code for java.awt.Toolkit.getScreenInsets(java.awt.GraphicsConfiguration) (GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration  gc)
          Gets the insets of the screen.
abstract  int getScreenResolution sample code for java.awt.Toolkit.getScreenResolution() definition code for java.awt.Toolkit.getScreenResolution() ()
          Returns the screen resolution in dots-per-inch.
abstract  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getScreenSize sample code for java.awt.Toolkit.getScreenSize() definition code for java.awt.Toolkit.getScreenSize() ()
          Gets the size of the screen.
abstract  Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard getSystemClipboard sample code for java.awt.Toolkit.getSystemClipboard() definition code for java.awt.Toolkit.getSystemClipboard() ()
          Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.
 EventQueue sample code for java.awt.EventQueue definition code for java.awt.EventQueue getSystemEventQueue sample code for java.awt.Toolkit.getSystemEventQueue() definition code for java.awt.Toolkit.getSystemEventQueue() ()
          Get the application's or applet's EventQueue instance.
protected abstract  EventQueue sample code for java.awt.EventQueue definition code for java.awt.EventQueue getSystemEventQueueImpl sample code for java.awt.Toolkit.getSystemEventQueueImpl() definition code for java.awt.Toolkit.getSystemEventQueueImpl() ()
          Gets the application's or applet's EventQueue instance, without checking access.
 Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard getSystemSelection sample code for java.awt.Toolkit.getSystemSelection() definition code for java.awt.Toolkit.getSystemSelection() ()
          Gets the singleton instance of the system selection as a Clipboard object.
protected  void initializeDesktopProperties sample code for java.awt.Toolkit.initializeDesktopProperties() definition code for java.awt.Toolkit.initializeDesktopProperties() ()
          initializeDesktopProperties
 boolean isDynamicLayoutActive sample code for java.awt.Toolkit.isDynamicLayoutActive() definition code for java.awt.Toolkit.isDynamicLayoutActive() ()
          Returns whether dynamic layout of Containers on resize is currently active (both set programmatically, and supported by the underlying operating system and/or window manager).
protected  boolean isDynamicLayoutSet sample code for java.awt.Toolkit.isDynamicLayoutSet() definition code for java.awt.Toolkit.isDynamicLayoutSet() ()
          Returns whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete.
 boolean isFrameStateSupported sample code for java.awt.Toolkit.isFrameStateSupported(int) definition code for java.awt.Toolkit.isFrameStateSupported(int) (int state)
          Returns whether Toolkit supports this state for Frames.
protected  Object sample code for java.lang.Object definition code for java.lang.Object lazilyLoadDesktopProperty sample code for java.awt.Toolkit.lazilyLoadDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.lazilyLoadDesktopProperty(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          an opportunity to lazily evaluate desktop property values.
protected  void loadSystemColors sample code for java.awt.Toolkit.loadSystemColors(int[]) definition code for java.awt.Toolkit.loadSystemColors(int[]) (int[] systemColors)
          Fills in the integer array that is supplied as an argument with the current system color values.
abstract  Map sample code for java.util.Map definition code for java.util.Map <TextAttribute sample code for java.awt.font.TextAttribute definition code for java.awt.font.TextAttribute ,?> mapInputMethodHighlight sample code for java.awt.Toolkit.mapInputMethodHighlight(java.awt.im.InputMethodHighlight) definition code for java.awt.Toolkit.mapInputMethodHighlight(java.awt.im.InputMethodHighlight) (InputMethodHighlight sample code for java.awt.im.InputMethodHighlight definition code for java.awt.im.InputMethodHighlight  highlight)
          Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.
abstract  boolean prepareImage sample code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) (Image sample code for java.awt.Image definition code for java.awt.Image  image, int width, int height, ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver  observer)
          Prepares an image for rendering.
 void removeAWTEventListener sample code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) definition code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) (AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener  listener)
          Removes an AWTEventListener from receiving dispatched AWTEvents.
 void removePropertyChangeListener sample code for java.awt.Toolkit.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Toolkit.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  name, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  pcl)
          Removes the specified property change listener for the named desktop property.
protected  void setDesktopProperty sample code for java.awt.Toolkit.setDesktopProperty(java.lang.String, java.lang.Object) definition code for java.awt.Toolkit.setDesktopProperty(java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  name, Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
          Sets the named desktop property to the specified value and fires a property change event to notify any listeners that the value has changed.
 void setDynamicLayout sample code for java.awt.Toolkit.setDynamicLayout(boolean) definition code for java.awt.Toolkit.setDynamicLayout(boolean) (boolean dynamic)
          Controls whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete.
 void setLockingKeyState sample code for java.awt.Toolkit.setLockingKeyState(int, boolean) definition code for java.awt.Toolkit.setLockingKeyState(int, boolean) (int keyCode, boolean on)
          Sets the state of the given locking key on the keyboard.
abstract  void sync sample code for java.awt.Toolkit.sync() definition code for java.awt.Toolkit.sync() ()
          Synchronizes this toolkit's graphics state.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

desktopProperties sample code for java.awt.Toolkit.desktopProperties

protected final Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Object sample code for java.lang.Object definition code for java.lang.Object > desktopProperties

desktopPropsSupport sample code for java.awt.Toolkit.desktopPropsSupport

protected final PropertyChangeSupport sample code for java.beans.PropertyChangeSupport definition code for java.beans.PropertyChangeSupport  desktopPropsSupport
Constructor Detail

Toolkit sample code for java.awt.Toolkit() definition code for java.awt.Toolkit()

public Toolkit()
Method Detail

createButton sample code for java.awt.Toolkit.createButton(java.awt.Button) definition code for java.awt.Toolkit.createButton(java.awt.Button)

protected abstract ButtonPeer sample code for java.awt.peer.ButtonPeer definition code for java.awt.peer.ButtonPeer  createButton(Button sample code for java.awt.Button definition code for java.awt.Button  target)
                                    throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Button using the specified peer interface.

Parameters:
target - the button to be implemented.
Returns:
this toolkit's implementation of Button.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Button sample code for java.awt.Button definition code for java.awt.Button , ButtonPeer sample code for java.awt.peer.ButtonPeer definition code for java.awt.peer.ButtonPeer

createTextField sample code for java.awt.Toolkit.createTextField(java.awt.TextField) definition code for java.awt.Toolkit.createTextField(java.awt.TextField)

protected abstract TextFieldPeer sample code for java.awt.peer.TextFieldPeer definition code for java.awt.peer.TextFieldPeer  createTextField(TextField sample code for java.awt.TextField definition code for java.awt.TextField  target)
                                          throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of TextField using the specified peer interface.

Parameters:
target - the text field to be implemented.
Returns:
this toolkit's implementation of TextField.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , TextField sample code for java.awt.TextField definition code for java.awt.TextField , TextFieldPeer sample code for java.awt.peer.TextFieldPeer definition code for java.awt.peer.TextFieldPeer

createLabel sample code for java.awt.Toolkit.createLabel(java.awt.Label) definition code for java.awt.Toolkit.createLabel(java.awt.Label)

protected abstract LabelPeer sample code for java.awt.peer.LabelPeer definition code for java.awt.peer.LabelPeer  createLabel(Label sample code for java.awt.Label definition code for java.awt.Label  target)
                                  throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Label using the specified peer interface.

Parameters:
target - the label to be implemented.
Returns:
this toolkit's implementation of Label.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Label sample code for java.awt.Label definition code for java.awt.Label , LabelPeer sample code for java.awt.peer.LabelPeer definition code for java.awt.peer.LabelPeer

createList sample code for java.awt.Toolkit.createList(java.awt.List) definition code for java.awt.Toolkit.createList(java.awt.List)

protected abstract ListPeer sample code for java.awt.peer.ListPeer definition code for java.awt.peer.ListPeer  createList(List sample code for java.awt.List definition code for java.awt.List  target)
                                throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of List using the specified peer interface.

Parameters:
target - the list to be implemented.
Returns:
this toolkit's implementation of List.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , List sample code for java.awt.List definition code for java.awt.List , ListPeer sample code for java.awt.peer.ListPeer definition code for java.awt.peer.ListPeer

createCheckbox sample code for java.awt.Toolkit.createCheckbox(java.awt.Checkbox) definition code for java.awt.Toolkit.createCheckbox(java.awt.Checkbox)

protected abstract CheckboxPeer sample code for java.awt.peer.CheckboxPeer definition code for java.awt.peer.CheckboxPeer  createCheckbox(Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox  target)
                                        throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Checkbox using the specified peer interface.

Parameters:
target - the check box to be implemented.
Returns:
this toolkit's implementation of Checkbox.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox , CheckboxPeer sample code for java.awt.peer.CheckboxPeer definition code for java.awt.peer.CheckboxPeer

createScrollbar sample code for java.awt.Toolkit.createScrollbar(java.awt.Scrollbar) definition code for java.awt.Toolkit.createScrollbar(java.awt.Scrollbar)

protected abstract ScrollbarPeer sample code for java.awt.peer.ScrollbarPeer definition code for java.awt.peer.ScrollbarPeer  createScrollbar(Scrollbar sample code for java.awt.Scrollbar definition code for java.awt.Scrollbar  target)
                                          throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Scrollbar using the specified peer interface.

Parameters:
target - the scroll bar to be implemented.
Returns:
this toolkit's implementation of Scrollbar.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Scrollbar sample code for java.awt.Scrollbar definition code for java.awt.Scrollbar , ScrollbarPeer sample code for java.awt.peer.ScrollbarPeer definition code for java.awt.peer.ScrollbarPeer

createScrollPane sample code for java.awt.Toolkit.createScrollPane(java.awt.ScrollPane) definition code for java.awt.Toolkit.createScrollPane(java.awt.ScrollPane)

protected abstract ScrollPanePeer sample code for java.awt.peer.ScrollPanePeer definition code for java.awt.peer.ScrollPanePeer  createScrollPane(ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane  target)
                                            throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of ScrollPane using the specified peer interface.

Parameters:
target - the scroll pane to be implemented.
Returns:
this toolkit's implementation of ScrollPane.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane , ScrollPanePeer sample code for java.awt.peer.ScrollPanePeer definition code for java.awt.peer.ScrollPanePeer

createTextArea sample code for java.awt.Toolkit.createTextArea(java.awt.TextArea) definition code for java.awt.Toolkit.createTextArea(java.awt.TextArea)

protected abstract TextAreaPeer sample code for java.awt.peer.TextAreaPeer definition code for java.awt.peer.TextAreaPeer  createTextArea(TextArea sample code for java.awt.TextArea definition code for java.awt.TextArea  target)
                                        throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of TextArea using the specified peer interface.

Parameters:
target - the text area to be implemented.
Returns:
this toolkit's implementation of TextArea.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , TextArea sample code for java.awt.TextArea definition code for java.awt.TextArea , TextAreaPeer sample code for java.awt.peer.TextAreaPeer definition code for java.awt.peer.TextAreaPeer

createChoice sample code for java.awt.Toolkit.createChoice(java.awt.Choice) definition code for java.awt.Toolkit.createChoice(java.awt.Choice)

protected abstract ChoicePeer sample code for java.awt.peer.ChoicePeer definition code for java.awt.peer.ChoicePeer  createChoice(Choice sample code for java.awt.Choice definition code for java.awt.Choice  target)
                                    throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Choice using the specified peer interface.

Parameters:
target - the choice to be implemented.
Returns:
this toolkit's implementation of Choice.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Choice sample code for java.awt.Choice definition code for java.awt.Choice , ChoicePeer sample code for java.awt.peer.ChoicePeer definition code for java.awt.peer.ChoicePeer

createFrame sample code for java.awt.Toolkit.createFrame(java.awt.Frame) definition code for java.awt.Toolkit.createFrame(java.awt.Frame)

protected abstract FramePeer sample code for java.awt.peer.FramePeer definition code for java.awt.peer.FramePeer  createFrame(Frame sample code for java.awt.Frame definition code for java.awt.Frame  target)
                                  throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Frame using the specified peer interface.

Parameters:
target - the frame to be implemented.
Returns:
this toolkit's implementation of Frame.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Frame sample code for java.awt.Frame definition code for java.awt.Frame , FramePeer sample code for java.awt.peer.FramePeer definition code for java.awt.peer.FramePeer

createCanvas sample code for java.awt.Toolkit.createCanvas(java.awt.Canvas) definition code for java.awt.Toolkit.createCanvas(java.awt.Canvas)

protected abstract CanvasPeer sample code for java.awt.peer.CanvasPeer definition code for java.awt.peer.CanvasPeer  createCanvas(Canvas sample code for java.awt.Canvas definition code for java.awt.Canvas  target)
Creates this toolkit's implementation of Canvas using the specified peer interface.

Parameters:
target - the canvas to be implemented.
Returns:
this toolkit's implementation of Canvas.
See Also:
Canvas sample code for java.awt.Canvas definition code for java.awt.Canvas , CanvasPeer sample code for java.awt.peer.CanvasPeer definition code for java.awt.peer.CanvasPeer

createPanel sample code for java.awt.Toolkit.createPanel(java.awt.Panel) definition code for java.awt.Toolkit.createPanel(java.awt.Panel)

protected abstract PanelPeer sample code for java.awt.peer.PanelPeer definition code for java.awt.peer.PanelPeer  createPanel(Panel sample code for java.awt.Panel definition code for java.awt.Panel  target)
Creates this toolkit's implementation of Panel using the specified peer interface.

Parameters:
target - the panel to be implemented.
Returns:
this toolkit's implementation of Panel.
See Also:
Panel sample code for java.awt.Panel definition code for java.awt.Panel , PanelPeer sample code for java.awt.peer.PanelPeer definition code for java.awt.peer.PanelPeer

createWindow sample code for java.awt.Toolkit.createWindow(java.awt.Window) definition code for java.awt.Toolkit.createWindow(java.awt.Window)

protected abstract WindowPeer sample code for java.awt.peer.WindowPeer definition code for java.awt.peer.WindowPeer  createWindow(Window sample code for java.awt.Window definition code for java.awt.Window  target)
                                    throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Window using the specified peer interface.

Parameters:
target - the window to be implemented.
Returns:
this toolkit's implementation of Window.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Window sample code for java.awt.Window definition code for java.awt.Window , WindowPeer sample code for java.awt.peer.WindowPeer definition code for java.awt.peer.WindowPeer

createDialog sample code for java.awt.Toolkit.createDialog(java.awt.Dialog) definition code for java.awt.Toolkit.createDialog(java.awt.Dialog)

protected abstract DialogPeer sample code for java.awt.peer.DialogPeer definition code for java.awt.peer.DialogPeer  createDialog(Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog  target)
                                    throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Dialog using the specified peer interface.

Parameters:
target - the dialog to be implemented.
Returns:
this toolkit's implementation of Dialog.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog , DialogPeer sample code for java.awt.peer.DialogPeer definition code for java.awt.peer.DialogPeer

createMenuBar sample code for java.awt.Toolkit.createMenuBar(java.awt.MenuBar) definition code for java.awt.Toolkit.createMenuBar(java.awt.MenuBar)

protected abstract MenuBarPeer sample code for java.awt.peer.MenuBarPeer definition code for java.awt.peer.MenuBarPeer  createMenuBar(MenuBar sample code for java.awt.MenuBar definition code for java.awt.MenuBar  target)
                                      throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of MenuBar using the specified peer interface.

Parameters:
target - the menu bar to be implemented.
Returns:
this toolkit's implementation of MenuBar.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , MenuBar sample code for java.awt.MenuBar definition code for java.awt.MenuBar , MenuBarPeer sample code for java.awt.peer.MenuBarPeer definition code for java.awt.peer.MenuBarPeer

createMenu sample code for java.awt.Toolkit.createMenu(java.awt.Menu) definition code for java.awt.Toolkit.createMenu(java.awt.Menu)

protected abstract MenuPeer sample code for java.awt.peer.MenuPeer definition code for java.awt.peer.MenuPeer  createMenu(Menu sample code for java.awt.Menu definition code for java.awt.Menu  target)
                                throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of Menu using the specified peer interface.

Parameters:
target - the menu to be implemented.
Returns:
this toolkit's implementation of Menu.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Menu sample code for java.awt.Menu definition code for java.awt.Menu , MenuPeer sample code for java.awt.peer.MenuPeer definition code for java.awt.peer.MenuPeer

createPopupMenu sample code for java.awt.Toolkit.createPopupMenu(java.awt.PopupMenu) definition code for java.awt.Toolkit.createPopupMenu(java.awt.PopupMenu)

protected abstract PopupMenuPeer sample code for java.awt.peer.PopupMenuPeer definition code for java.awt.peer.PopupMenuPeer  createPopupMenu(PopupMenu sample code for java.awt.PopupMenu definition code for java.awt.PopupMenu  target)
                                          throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of PopupMenu using the specified peer interface.

Parameters:
target - the popup menu to be implemented.
Returns:
this toolkit's implementation of PopupMenu.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , PopupMenu sample code for java.awt.PopupMenu definition code for java.awt.PopupMenu , PopupMenuPeer sample code for java.awt.peer.PopupMenuPeer definition code for java.awt.peer.PopupMenuPeer

createMenuItem sample code for java.awt.Toolkit.createMenuItem(java.awt.MenuItem) definition code for java.awt.Toolkit.createMenuItem(java.awt.MenuItem)

protected abstract MenuItemPeer sample code for java.awt.peer.MenuItemPeer definition code for java.awt.peer.MenuItemPeer  createMenuItem(MenuItem sample code for java.awt.MenuItem definition code for java.awt.MenuItem  target)
                                        throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of MenuItem using the specified peer interface.

Parameters:
target - the menu item to be implemented.
Returns:
this toolkit's implementation of MenuItem.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , MenuItem sample code for java.awt.MenuItem definition code for java.awt.MenuItem , MenuItemPeer sample code for java.awt.peer.MenuItemPeer definition code for java.awt.peer.MenuItemPeer

createFileDialog sample code for java.awt.Toolkit.createFileDialog(java.awt.FileDialog) definition code for java.awt.Toolkit.createFileDialog(java.awt.FileDialog)

protected abstract FileDialogPeer sample code for java.awt.peer.FileDialogPeer definition code for java.awt.peer.FileDialogPeer  createFileDialog(FileDialog sample code for java.awt.FileDialog definition code for java.awt.FileDialog  target)
                                            throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of FileDialog using the specified peer interface.

Parameters:
target - the file dialog to be implemented.
Returns:
this toolkit's implementation of FileDialog.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , FileDialog sample code for java.awt.FileDialog definition code for java.awt.FileDialog , FileDialogPeer sample code for java.awt.peer.FileDialogPeer definition code for java.awt.peer.FileDialogPeer

createCheckboxMenuItem sample code for java.awt.Toolkit.createCheckboxMenuItem(java.awt.CheckboxMenuItem) definition code for java.awt.Toolkit.createCheckboxMenuItem(java.awt.CheckboxMenuItem)

protected abstract CheckboxMenuItemPeer sample code for java.awt.peer.CheckboxMenuItemPeer definition code for java.awt.peer.CheckboxMenuItemPeer  createCheckboxMenuItem(CheckboxMenuItem sample code for java.awt.CheckboxMenuItem definition code for java.awt.CheckboxMenuItem  target)
                                                        throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.

Parameters:
target - the checkbox menu item to be implemented.
Returns:
this toolkit's implementation of CheckboxMenuItem.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , CheckboxMenuItem sample code for java.awt.CheckboxMenuItem definition code for java.awt.CheckboxMenuItem , CheckboxMenuItemPeer sample code for java.awt.peer.CheckboxMenuItemPeer definition code for java.awt.peer.CheckboxMenuItemPeer

getMouseInfoPeer sample code for java.awt.Toolkit.getMouseInfoPeer() definition code for java.awt.Toolkit.getMouseInfoPeer()

protected MouseInfoPeer sample code for java.awt.peer.MouseInfoPeer definition code for java.awt.peer.MouseInfoPeer  getMouseInfoPeer()
Obtains this toolkit's implementation of helper class for MouseInfo operations.

Returns:
this toolkit's implementation of helper for MouseInfo
Throws:
UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException - if this operation is not implemented
See Also:
MouseInfoPeer sample code for java.awt.peer.MouseInfoPeer definition code for java.awt.peer.MouseInfoPeer , MouseInfo sample code for java.awt.MouseInfo definition code for java.awt.MouseInfo

createComponent sample code for java.awt.Toolkit.createComponent(java.awt.Component) definition code for java.awt.Toolkit.createComponent(java.awt.Component)

protected LightweightPeer sample code for java.awt.peer.LightweightPeer definition code for java.awt.peer.LightweightPeer  createComponent(Component sample code for java.awt.Component definition code for java.awt.Component  target)
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.

getFontPeer sample code for java.awt.Toolkit.getFontPeer(java.lang.String, int) definition code for java.awt.Toolkit.getFontPeer(java.lang.String, int)

@Deprecated
protected abstract FontPeer sample code for java.awt.peer.FontPeer definition code for java.awt.peer.FontPeer  getFontPeer(String sample code for java.lang.String definition code for java.lang.String  name,
                                                   int style)
Deprecated. see java.awt.GraphicsEnvironment#getAllFonts

Creates this toolkit's implementation of Font using the specified peer interface.

Parameters:
name - the font to be implemented
style - the style of the font, such as PLAIN, BOLD, ITALIC, or a combination
Returns:
this toolkit's implementation of Font
See Also:
Font sample code for java.awt.Font definition code for java.awt.Font , FontPeer sample code for java.awt.peer.FontPeer definition code for java.awt.peer.FontPeer , GraphicsEnvironment.getAllFonts() sample code for java.awt.GraphicsEnvironment.getAllFonts() definition code for java.awt.GraphicsEnvironment.getAllFonts()

loadSystemColors sample code for java.awt.Toolkit.loadSystemColors(int[]) definition code for java.awt.Toolkit.loadSystemColors(int[])

protected void loadSystemColors(int[] systemColors)
                         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Fills in the integer array that is supplied as an argument with the current system color values.

Parameters:
systemColors - an integer array.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

setDynamicLayout sample code for java.awt.Toolkit.setDynamicLayout(boolean) definition code for java.awt.Toolkit.setDynamicLayout(boolean)

public void setDynamicLayout(boolean dynamic)
                      throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Controls whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete. Note that this feature is not supported on all platforms, and conversely, that this feature cannot be turned off on some platforms. On platforms where dynamic layout during resize is not supported (or is always supported), setting this property has no effect. Note that this feature can be set or unset as a property of the operating system or window manager on some platforms. On such platforms, the dynamic resize property must be set at the operating system or window manager level before this method can take effect. This method does not change the underlying operating system or window manager support or settings. The OS/WM support can be queried using getDesktopProperty("awt.dynamicLayoutSupported").

Parameters:
dynamic - If true, Containers should re-layout their components as the Container is being resized. If false, the layout will be validated after resizing is finished.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.4
See Also:
isDynamicLayoutSet() sample code for java.awt.Toolkit.isDynamicLayoutSet() definition code for java.awt.Toolkit.isDynamicLayoutSet() , isDynamicLayoutActive() sample code for java.awt.Toolkit.isDynamicLayoutActive() definition code for java.awt.Toolkit.isDynamicLayoutActive() , getDesktopProperty(String propertyName) sample code for java.awt.Toolkit.getDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.getDesktopProperty(java.lang.String) , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

isDynamicLayoutSet sample code for java.awt.Toolkit.isDynamicLayoutSet() definition code for java.awt.Toolkit.isDynamicLayoutSet()

protected boolean isDynamicLayoutSet()
                              throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete. Note: this method returns the value that was set programmatically; it does not reflect support at the level of the operating system or window manager for dynamic layout on resizing, or the current operating system or window manager settings. The OS/WM support can be queried using getDesktopProperty("awt.dynamicLayoutSupported").

Returns:
true if validation of Containers is done dynamically, false if validation is done after resizing is finished.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.4
See Also:
setDynamicLayout(boolean dynamic) sample code for java.awt.Toolkit.setDynamicLayout(boolean) definition code for java.awt.Toolkit.setDynamicLayout(boolean) , isDynamicLayoutActive() sample code for java.awt.Toolkit.isDynamicLayoutActive() definition code for java.awt.Toolkit.isDynamicLayoutActive() , getDesktopProperty(String propertyName) sample code for java.awt.Toolkit.getDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.getDesktopProperty(java.lang.String) , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

isDynamicLayoutActive sample code for java.awt.Toolkit.isDynamicLayoutActive() definition code for java.awt.Toolkit.isDynamicLayoutActive()

public boolean isDynamicLayoutActive()
                              throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns whether dynamic layout of Containers on resize is currently active (both set programmatically, and supported by the underlying operating system and/or window manager). The OS/WM support can be queried using getDesktopProperty("awt.dynamicLayoutSupported").

Returns:
true if dynamic layout of Containers on resize is currently active, false otherwise.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.4
See Also:
setDynamicLayout(boolean dynamic) sample code for java.awt.Toolkit.setDynamicLayout(boolean) definition code for java.awt.Toolkit.setDynamicLayout(boolean) , isDynamicLayoutSet() sample code for java.awt.Toolkit.isDynamicLayoutSet() definition code for java.awt.Toolkit.isDynamicLayoutSet() , getDesktopProperty(String propertyName) sample code for java.awt.Toolkit.getDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.getDesktopProperty(java.lang.String) , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getScreenSize sample code for java.awt.Toolkit.getScreenSize() definition code for java.awt.Toolkit.getScreenSize()

public abstract Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getScreenSize()
                                 throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Gets the size of the screen. On systems with multiple displays, the primary display is used. Multi-screen aware display dimensions are available from GraphicsConfiguration and GraphicsDevice.

Returns:
the size of this toolkit's screen, in pixels.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsConfiguration.getBounds() sample code for java.awt.GraphicsConfiguration.getBounds() definition code for java.awt.GraphicsConfiguration.getBounds() , GraphicsDevice.getDisplayMode() sample code for java.awt.GraphicsDevice.getDisplayMode() definition code for java.awt.GraphicsDevice.getDisplayMode() , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getScreenResolution sample code for java.awt.Toolkit.getScreenResolution() definition code for java.awt.Toolkit.getScreenResolution()

public abstract int getScreenResolution()
                                 throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns the screen resolution in dots-per-inch.

Returns:
this toolkit's screen resolution, in dots-per-inch.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getScreenInsets sample code for java.awt.Toolkit.getScreenInsets(java.awt.GraphicsConfiguration) definition code for java.awt.Toolkit.getScreenInsets(java.awt.GraphicsConfiguration)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getScreenInsets(GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration  gc)
                       throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Gets the insets of the screen.

Parameters:
gc - a GraphicsConfiguration
Returns:
the insets of this toolkit's screen, in pixels.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.4
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getColorModel sample code for java.awt.Toolkit.getColorModel() definition code for java.awt.Toolkit.getColorModel()

public abstract ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel  getColorModel()
                                  throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Determines the color model of this toolkit's screen.

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.

Returns:
the color model of this toolkit's screen.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , ColorModel sample code for java.awt.image.ColorModel definition code for java.awt.image.ColorModel , Component.getColorModel() sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel()

getFontList sample code for java.awt.Toolkit.getFontList() definition code for java.awt.Toolkit.getFontList()

@Deprecated
public abstract String sample code for java.lang.String definition code for java.lang.String [] getFontList()
Deprecated. see GraphicsEnvironment.getAvailableFontFamilyNames() sample code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames() definition code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames()

Returns the names of the available fonts in this toolkit.

For 1.1, the following font names are deprecated (the replacement name follows):

The ZapfDingbats fontname is also deprecated in 1.1 but the characters are defined in Unicode starting at 0x2700, and as of 1.1 Java supports those characters.

Returns:
the names of the available fonts in this toolkit.
See Also:
GraphicsEnvironment.getAvailableFontFamilyNames() sample code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames() definition code for java.awt.GraphicsEnvironment.getAvailableFontFamilyNames()

getFontMetrics sample code for java.awt.Toolkit.getFontMetrics(java.awt.Font) definition code for java.awt.Toolkit.getFontMetrics(java.awt.Font)

@Deprecated
public abstract FontMetrics sample code for java.awt.FontMetrics definition code for java.awt.FontMetrics  getFontMetrics(Font sample code for java.awt.Font definition code for java.awt.Font  font)
Deprecated. As of JDK version 1.2, replaced by the Font method getLineMetrics.

Gets the screen device metrics for rendering of the font.

Parameters:
font - a font
Returns:
the screen metrics of the specified font in this toolkit
See Also:
LineMetrics sample code for java.awt.font.LineMetrics definition code for java.awt.font.LineMetrics , Font.getLineMetrics(java.lang.String, java.awt.font.FontRenderContext) sample code for java.awt.Font.getLineMetrics(java.lang.String, java.awt.font.FontRenderContext) definition code for java.awt.Font.getLineMetrics(java.lang.String, java.awt.font.FontRenderContext) , GraphicsEnvironment.getScreenDevices() sample code for java.awt.GraphicsEnvironment.getScreenDevices() definition code for java.awt.GraphicsEnvironment.getScreenDevices()

sync sample code for java.awt.Toolkit.sync() definition code for java.awt.Toolkit.sync()

public abstract void sync()
Synchronizes this toolkit's graphics state. Some window systems may do buffering of graphics events.

This method ensures that the display is up-to-date. It is useful for animation.


getDefaultToolkit sample code for java.awt.Toolkit.getDefaultToolkit() definition code for java.awt.Toolkit.getDefaultToolkit()

public static Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit  getDefaultToolkit()
Gets the default toolkit.

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.

Also loads additional classes into the VM, using the property 'assistive_technologies' specified in the Sun reference implementation by a line in the 'accessibility.properties' file. The form is "assistive_technologies=..." where the "..." is a comma-separated list of assistive technology classes to load. Each class is loaded in the order given and a single instance of each is created using Class.forName(class).newInstance(). This is done just after the AWT toolkit is created. All errors are handled via an AWTError exception.

Returns:
the default toolkit.
Throws:
AWTError sample code for java.awt.AWTError definition code for java.awt.AWTError - if a toolkit could not be found, or if one could not be accessed or instantiated.

getImage sample code for java.awt.Toolkit.getImage(java.lang.String) definition code for java.awt.Toolkit.getImage(java.lang.String)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  getImage(String sample code for java.lang.String definition code for java.lang.String  filename)
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image. Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available.

Parameters:
filename - the name of a file containing pixel data in a recognized file format.
Returns:
an image which gets its pixel data from the specified file.
See Also:
createImage(java.lang.String) sample code for java.awt.Toolkit.createImage(java.lang.String) definition code for java.awt.Toolkit.createImage(java.lang.String)

getImage sample code for java.awt.Toolkit.getImage(java.net.URL) definition code for java.awt.Toolkit.getImage(java.net.URL)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  getImage(URL sample code for java.net.URL definition code for java.net.URL  url)
Returns an image which gets pixel data from the specified URL. The pixel data referenced by the specified URL must be in one of the following formats: GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same URL to the same returned Image. Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available.

Parameters:
url - the URL to use in fetching the pixel data.
Returns:
an image which gets its pixel data from the specified URL.
See Also:
createImage(java.net.URL) sample code for java.awt.Toolkit.createImage(java.net.URL) definition code for java.awt.Toolkit.createImage(java.net.URL)

createImage sample code for java.awt.Toolkit.createImage(java.lang.String) definition code for java.awt.Toolkit.createImage(java.lang.String)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  createImage(String sample code for java.lang.String definition code for java.lang.String  filename)
Returns an image which gets pixel data from the specified file. The returned Image is a new object which will not be shared with any other caller of this method or its getImage variant.

Parameters:
filename - the name of a file containing pixel data in a recognized file format.
Returns:
an image which gets its pixel data from the specified file.
See Also:
getImage(java.lang.String) sample code for java.awt.Toolkit.getImage(java.lang.String) definition code for java.awt.Toolkit.getImage(java.lang.String)

createImage sample code for java.awt.Toolkit.createImage(java.net.URL) definition code for java.awt.Toolkit.createImage(java.net.URL)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  createImage(URL sample code for java.net.URL definition code for java.net.URL  url)
Returns an image which gets pixel data from the specified URL. The returned Image is a new object which will not be shared with any other caller of this method or its getImage variant.

Parameters:
url - the URL to use in fetching the pixel data.
Returns:
an image which gets its pixel data from the specified URL.
See Also:
getImage(java.net.URL) sample code for java.awt.Toolkit.getImage(java.net.URL) definition code for java.awt.Toolkit.getImage(java.net.URL)

prepareImage sample code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)

public abstract boolean prepareImage(Image sample code for java.awt.Image definition code for java.awt.Image  image,
                                     int width,
                                     int height,
                                     ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver  observer)
Prepares an image for rendering.

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.

Parameters:
image - the image for which to prepare a screen representation.
width - the width of the desired screen representation, or -1.
height - the height of the desired screen representation, or -1.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
true if the image has already been fully prepared; false otherwise.
See Also:
Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver

checkImage sample code for java.awt.Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Toolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)

public abstract int checkImage(Image sample code for java.awt.Image definition code for java.awt.Image  image,
                               int width,
                               int height,
                               ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver  observer)
Indicates the construction status of a specified image that is being prepared for display.

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.

Parameters:
image - the image whose status is being checked.
width - the width of the scaled version whose status is being checked, or -1.
height - the height of the scaled version whose status is being checked, or -1.
observer - the ImageObserver object to be notified as the image is being prepared.
Returns:
the bitwise inclusive OR of the ImageObserver flags for the image data that is currently available.
See Also:
prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Toolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver

createImage sample code for java.awt.Toolkit.createImage(java.awt.image.ImageProducer) definition code for java.awt.Toolkit.createImage(java.awt.image.ImageProducer)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  createImage(ImageProducer sample code for java.awt.image.ImageProducer definition code for java.awt.image.ImageProducer  producer)
Creates an image with the specified image producer.

Parameters:
producer - the image producer to be used.
Returns:
an image with the specified image producer.
See Also:
Image sample code for java.awt.Image definition code for java.awt.Image , ImageProducer sample code for java.awt.image.ImageProducer definition code for java.awt.image.ImageProducer , Component.createImage(java.awt.image.ImageProducer) sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer)

createImage sample code for java.awt.Toolkit.createImage(byte[]) definition code for java.awt.Toolkit.createImage(byte[])

public Image sample code for java.awt.Image definition code for java.awt.Image  createImage(byte[] imagedata)
Creates an image which decodes the image stored in the specified byte array.

The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.

Parameters:
imagedata - an array of bytes, representing image data in a supported image format.
Returns:
an image.
Since:
JDK1.1

createImage sample code for java.awt.Toolkit.createImage(byte[], int, int) definition code for java.awt.Toolkit.createImage(byte[], int, int)

public abstract Image sample code for java.awt.Image definition code for java.awt.Image  createImage(byte[] imagedata,
                                  int imageoffset,
                                  int imagelength)
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length. The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.

Parameters:
imagedata - an array of bytes, representing image data in a supported image format.
imageoffset - the offset of the beginning of the data in the array.
imagelength - the length of the data in the array.
Returns:
an image.
Since:
JDK1.1

getPrintJob sample code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties) definition code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.util.Properties)

public abstract PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob  getPrintJob(Frame sample code for java.awt.Frame definition code for java.awt.Frame  frame,
                                     String sample code for java.lang.String definition code for java.lang.String  jobtitle,
                                     Properties sample code for java.util.Properties definition code for java.util.Properties  props)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a RuntimePermission("queuePrintJob") permission.

Parameters:
frame - the parent of the print dialog. May not be null.
jobtitle - the title of the PrintJob. A null title is equivalent to "".
props - a Properties object containing zero or more properties. Properties are not standardized and are not consistent across implementations. Because of this, PrintJobs which require job and page control should use the version of this function which takes JobAttributes and PageAttributes objects. This object may be updated to reflect the user's job choices on exit. May be null.
Returns:
a PrintJob object, or null if the user cancelled the print job.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if frame is null. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true.
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this thread is not allowed to initiate a print job request
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob , RuntimePermission sample code for java.lang.RuntimePermission definition code for java.lang.RuntimePermission

getPrintJob sample code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.awt.JobAttributes, java.awt.PageAttributes) definition code for java.awt.Toolkit.getPrintJob(java.awt.Frame, java.lang.String, java.awt.JobAttributes, java.awt.PageAttributes)

public PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob  getPrintJob(Frame sample code for java.awt.Frame definition code for java.awt.Frame  frame,
                            String sample code for java.lang.String definition code for java.lang.String  jobtitle,
                            JobAttributes sample code for java.awt.JobAttributes definition code for java.awt.JobAttributes  jobAttributes,
                            PageAttributes sample code for java.awt.PageAttributes definition code for java.awt.PageAttributes  pageAttributes)
Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with a RuntimePermission("queuePrintJob") permission.

Parameters:
frame - the parent of the print dialog. May be null if and only if jobAttributes is not null and jobAttributes.getDialog() returns JobAttributes.DialogType.NONE or JobAttributes.DialogType.COMMON.
jobtitle - the title of the PrintJob. A null title is equivalent to "".
jobAttributes - a set of job attributes which will control the PrintJob. The attributes will be updated to reflect the user's choices as outlined in the JobAttributes documentation. May be null.
pageAttributes - a set of page attributes which will control the PrintJob. The attributes will be applied to every page in the job. The attributes will be updated to reflect the user's choices as outlined in the PageAttributes documentation. May be null.
Returns:
a PrintJob object, or null if the user cancelled the print job.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if frame is null and either jobAttributes is null or jobAttributes.getDialog() returns JobAttributes.DialogType.NATIVE.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if pageAttributes specifies differing cross feed and feed resolutions. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true.
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if this thread is not allowed to initiate a print job request, or if jobAttributes specifies print to file, and this thread is not allowed to access the file system
Since:
1.3
See Also:
PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , RuntimePermission sample code for java.lang.RuntimePermission definition code for java.lang.RuntimePermission , JobAttributes sample code for java.awt.JobAttributes definition code for java.awt.JobAttributes , PageAttributes sample code for java.awt.PageAttributes definition code for java.awt.PageAttributes

beep sample code for java.awt.Toolkit.beep() definition code for java.awt.Toolkit.beep()

public abstract void beep()
Emits an audio beep.

Since:
JDK1.1

getSystemClipboard sample code for java.awt.Toolkit.getSystemClipboard() definition code for java.awt.Toolkit.getSystemClipboard()

public abstract Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard  getSystemClipboard()
                                      throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform. This clipboard enables data transfer between Java programs and native applications which use native clipboard facilities.

In addition to any and all formats specified in the flavormap.properties file, or other file specified by the AWT.DnD.flavorMapFileURL Toolkit property, text returned by the system Clipboard's getTransferData() method is available in the following flavors:

As with java.awt.datatransfer.StringSelection, if the requested flavor is DataFlavor.plainTextFlavor, or an equivalent flavor, a Reader is returned. Note: The behavior of the system Clipboard's getTransferData() method for DataFlavor.plainTextFlavor, and equivalent DataFlavors, is inconsistent with the definition of DataFlavor.plainTextFlavor . Because of this, support for DataFlavor.plainTextFlavor, and equivalent flavors, is deprecated.

Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkSystemClipboardAccess method to ensure it's ok to to access the system clipboard. If the default implementation of checkSystemClipboardAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with an AWTPermission("accessClipboard") permission.

Returns:
the system Clipboard
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard , StringSelection sample code for java.awt.datatransfer.StringSelection definition code for java.awt.datatransfer.StringSelection , DataFlavor.stringFlavor sample code for java.awt.datatransfer.DataFlavor.stringFlavor definition code for java.awt.datatransfer.DataFlavor.stringFlavor , DataFlavor.plainTextFlavor sample code for java.awt.datatransfer.DataFlavor.plainTextFlavor definition code for java.awt.datatransfer.DataFlavor.plainTextFlavor , Reader sample code for java.io.Reader definition code for java.io.Reader , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission

getSystemSelection sample code for java.awt.Toolkit.getSystemSelection() definition code for java.awt.Toolkit.getSystemSelection()

public Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard  getSystemSelection()
                             throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Gets the singleton instance of the system selection as a Clipboard object. This allows an application to read and modify the current, system-wide selection.

An application is responsible for updating the system selection whenever the user selects text, using either the mouse or the keyboard. Typically, this is implemented by installing a FocusListener on all Components which support text selection, and, between FOCUS_GAINED and FOCUS_LOST events delivered to that Component, updating the system selection Clipboard when the selection changes inside the Component. Properly updating the system selection ensures that a Java application will interact correctly with native applications and other Java applications running simultaneously on the system. Note that java.awt.TextComponent and javax.swing.text.JTextComponent already adhere to this policy. When using these classes, and their subclasses, developers need not write any additional code.

Some platforms do not support a system selection Clipboard. On those platforms, this method will return null. In such a case, an application is absolved from its responsibility to update the system selection Clipboard as described above.

Each actual implementation of this method should first check if there is a SecurityManager installed. If there is, the method should call the SecurityManager's checkSystemClipboardAccess method to ensure that client code has access the system selection. If the default implementation of checkSystemClipboardAccess is used (that is, if the method is not overridden), then this results in a call to the SecurityManager's checkPermission method with an AWTPermission("accessClipboard") permission.

Returns:
the system selection as a Clipboard, or null if the native platform does not support a system selection Clipboard
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.4
See Also:
Clipboard sample code for java.awt.datatransfer.Clipboard definition code for java.awt.datatransfer.Clipboard , FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener , FocusEvent.FOCUS_GAINED sample code for java.awt.event.FocusEvent.FOCUS_GAINED definition code for java.awt.event.FocusEvent.FOCUS_GAINED , FocusEvent.FOCUS_LOST sample code for java.awt.event.FocusEvent.FOCUS_LOST definition code for java.awt.event.FocusEvent.FOCUS_LOST , TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent , JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission , GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getMenuShortcutKeyMask sample code for java.awt.Toolkit.getMenuShortcutKeyMask() definition code for java.awt.Toolkit.getMenuShortcutKeyMask()

public int getMenuShortcutKeyMask()
                           throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Determines which modifier key is the appropriate accelerator key for menu shortcuts.

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.

Returns:
the modifier mask on the Event class that is used for menu shortcuts on this toolkit.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , MenuBar sample code for java.awt.MenuBar definition code for java.awt.MenuBar , MenuShortcut sample code for java.awt.MenuShortcut definition code for java.awt.MenuShortcut

getLockingKeyState sample code for java.awt.Toolkit.getLockingKeyState(int) definition code for java.awt.Toolkit.getLockingKeyState(int)

public boolean getLockingKeyState(int keyCode)
                           throws UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException 
Returns whether the given locking key on the keyboard is currently in its "on" state. Valid key codes are VK_CAPS_LOCK sample code for java.awt.event.KeyEvent.VK_CAPS_LOCK definition code for java.awt.event.KeyEvent.VK_CAPS_LOCK , VK_NUM_LOCK sample code for java.awt.event.KeyEvent.VK_NUM_LOCK definition code for java.awt.event.KeyEvent.VK_NUM_LOCK , VK_SCROLL_LOCK sample code for java.awt.event.KeyEvent.VK_SCROLL_LOCK definition code for java.awt.event.KeyEvent.VK_SCROLL_LOCK , and VK_KANA_LOCK sample code for java.awt.event.KeyEvent.VK_KANA_LOCK definition code for java.awt.event.KeyEvent.VK_KANA_LOCK .

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if keyCode is not one of the valid key codes
UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException - if the host system doesn't allow getting the state of this key programmatically, or if the keyboard doesn't have this key
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.3
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

setLockingKeyState sample code for java.awt.Toolkit.setLockingKeyState(int, boolean) definition code for java.awt.Toolkit.setLockingKeyState(int, boolean)

public void setLockingKeyState(int keyCode,
                               boolean on)
                        throws UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException 
Sets the state of the given locking key on the keyboard. Valid key codes are VK_CAPS_LOCK sample code for java.awt.event.KeyEvent.VK_CAPS_LOCK definition code for java.awt.event.KeyEvent.VK_CAPS_LOCK , VK_NUM_LOCK sample code for java.awt.event.KeyEvent.VK_NUM_LOCK definition code for java.awt.event.KeyEvent.VK_NUM_LOCK , VK_SCROLL_LOCK sample code for java.awt.event.KeyEvent.VK_SCROLL_LOCK definition code for java.awt.event.KeyEvent.VK_SCROLL_LOCK , and VK_KANA_LOCK sample code for java.awt.event.KeyEvent.VK_KANA_LOCK definition code for java.awt.event.KeyEvent.VK_KANA_LOCK .

Depending on the platform, setting the state of a locking key may involve event processing and therefore may not be immediately observable through getLockingKeyState.

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if keyCode is not one of the valid key codes
UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException - if the host system doesn't allow setting the state of this key programmatically, or if the keyboard doesn't have this key
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.3
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getNativeContainer sample code for java.awt.Toolkit.getNativeContainer(java.awt.Component) definition code for java.awt.Toolkit.getNativeContainer(java.awt.Component)

protected static Container sample code for java.awt.Container definition code for java.awt.Container  getNativeContainer(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).


createCustomCursor sample code for java.awt.Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String) definition code for java.awt.Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)

public Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  createCustomCursor(Image sample code for java.awt.Image definition code for java.awt.Image  cursor,
                                 Point sample code for java.awt.Point definition code for java.awt.Point  hotSpot,
                                 String sample code for java.lang.String definition code for java.lang.String  name)
                          throws IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException ,
                                 HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Creates a new custom cursor object. If the image to display is invalid, the cursor will be hidden (made completely transparent), and the hotspot will be set to (0, 0).

Note that multi-frame images are invalid and may cause this method to hang.

Parameters:
cursor - the image to display when the cursor is actived
hotSpot - the X and Y of the large cursor's hot spot; the hotSpot values must be less than the Dimension returned by getBestCursorSize
name - a localized description of the cursor, for Java Accessibility use
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if the hotSpot values are outside the bounds of the cursor
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.2
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getBestCursorSize sample code for java.awt.Toolkit.getBestCursorSize(int, int) definition code for java.awt.Toolkit.getBestCursorSize(int, int)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getBestCursorSize(int preferredWidth,
                                   int preferredHeight)
                            throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns the supported cursor dimension which is closest to the desired sizes. Systems which only support a single cursor size will return that size regardless of the desired sizes. Systems which don't support custom cursors will return a dimension of 0, 0.

Note: if an image is used whose dimensions don't match a supported size (as returned by this method), the Toolkit implementation will attempt to resize the image to a supported size. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which isn't a supported size. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.

Parameters:
preferredWidth - the preferred cursor width the component would like to use.
preferredHeight - the preferred cursor height the component would like to use.
Returns:
the closest matching supported cursor size, or a dimension of 0,0 if the Toolkit implementation doesn't support custom cursors.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.2
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getMaximumCursorColors sample code for java.awt.Toolkit.getMaximumCursorColors() definition code for java.awt.Toolkit.getMaximumCursorColors()

public int getMaximumCursorColors()
                           throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.

Note: if an image is used which has more colors in its palette than the supported maximum, the Toolkit implementation will attempt to flatten the palette to the maximum. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which has more colors than the system supports. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.

Returns:
the maximum number of colors, or zero if custom cursors are not supported by this Toolkit implementation.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true
Since:
1.2
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

isFrameStateSupported sample code for java.awt.Toolkit.isFrameStateSupported(int) definition code for java.awt.Toolkit.isFrameStateSupported(int)

public boolean isFrameStateSupported(int state)
                              throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns whether Toolkit supports this state for Frames. This method tells whether the UI concept of, say, maximization or iconification is supported. It will always return false for "compound" states like Frame.ICONIFIED|Frame.MAXIMIZED_VERT. In other words, the rule of thumb is that only queries with a single frame state constant as an argument are meaningful.

Parameters:
state - one of named frame state constants.
Returns:
true is this frame state is supported by this Toolkit implementation, false otherwise.
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
Since:
1.4
See Also:
Frame.setExtendedState(int) sample code for java.awt.Frame.setExtendedState(int) definition code for java.awt.Frame.setExtendedState(int)

getProperty sample code for java.awt.Toolkit.getProperty(java.lang.String, java.lang.String) definition code for java.awt.Toolkit.getProperty(java.lang.String, java.lang.String)

public static String sample code for java.lang.String definition code for java.lang.String  getProperty(String sample code for java.lang.String definition code for java.lang.String  key,
                                 String sample code for java.lang.String definition code for java.lang.String  defaultValue)
Gets a property with the specified key and default. This method returns defaultValue if the property is not found.


getSystemEventQueue sample code for java.awt.Toolkit.getSystemEventQueue() definition code for java.awt.Toolkit.getSystemEventQueue()

public final EventQueue sample code for java.awt.EventQueue definition code for java.awt.EventQueue  getSystemEventQueue()
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.

First, if there is a security manager, its checkAwtEventQueueAccess method is called. If the default implementation of checkAwtEventQueueAccess is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission method with an AWTPermission("accessEventQueue") permission.

Returns:
the EventQueue object
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its SecurityManager.checkAwtEventQueueAccess() sample code for java.lang.SecurityManager.checkAwtEventQueueAccess() definition code for java.lang.SecurityManager.checkAwtEventQueueAccess() method denies access to the EventQueue
See Also:
AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission

getSystemEventQueueImpl sample code for java.awt.Toolkit.getSystemEventQueueImpl() definition code for java.awt.Toolkit.getSystemEventQueueImpl()

protected abstract EventQueue sample code for java.awt.EventQueue definition code for java.awt.EventQueue  getSystemEventQueueImpl()
Gets the application's or applet's EventQueue instance, without checking access. For security reasons, this can only be called from a Toolkit subclass.

Returns:
the EventQueue object

createDragSourceContextPeer sample code for java.awt.Toolkit.createDragSourceContextPeer(java.awt.dnd.DragGestureEvent) definition code for java.awt.Toolkit.createDragSourceContextPeer(java.awt.dnd.DragGestureEvent)

public abstract DragSourceContextPeer sample code for java.awt.dnd.peer.DragSourceContextPeer definition code for java.awt.dnd.peer.DragSourceContextPeer  createDragSourceContextPeer(DragGestureEvent sample code for java.awt.dnd.DragGestureEvent definition code for java.awt.dnd.DragGestureEvent  dge)
                                                           throws InvalidDnDOperationException sample code for java.awt.dnd.InvalidDnDOperationException definition code for java.awt.dnd.InvalidDnDOperationException 
Creates the peer for a DragSourceContext. Always throws InvalidDndOperationException if GraphicsEnvironment.isHeadless() returns true.

Throws:
InvalidDnDOperationException sample code for java.awt.dnd.InvalidDnDOperationException definition code for java.awt.dnd.InvalidDnDOperationException
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

createDragGestureRecognizer sample code for java.awt.Toolkit.<T extends java.awt.dnd.DragGestureRecognizer>createDragGestureRecognizer(java.lang.Class<T>, java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener) definition code for java.awt.Toolkit.<T extends java.awt.dnd.DragGestureRecognizer>createDragGestureRecognizer(java.lang.Class<T>, java.awt.dnd.DragSource, java.awt.Component, int, java.awt.dnd.DragGestureListener)

public <T extends DragGestureRecognizer sample code for java.awt.dnd.DragGestureRecognizer definition code for java.awt.dnd.DragGestureRecognizer > T createDragGestureRecognizer(Class sample code for java.lang.Class definition code for java.lang.Class <T> abstractRecognizerClass,
                                                                       DragSource sample code for java.awt.dnd.DragSource definition code for java.awt.dnd.DragSource  ds,
                                                                       Component sample code for java.awt.Component definition code for java.awt.Component  c,
                                                                       int srcActions,
                                                                       DragGestureListener sample code for java.awt.dnd.DragGestureListener definition code for java.awt.dnd.DragGestureListener  dgl)
Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified. subclasses should override this to provide their own implementation

Parameters:
abstractRecognizerClass - The abstract class of the required recognizer
ds - The DragSource
c - The Component target for the DragGestureRecognizer
srcActions - The actions permitted for the gesture
dgl - The DragGestureListener
Returns:
the new object or null. Always returns null if GraphicsEnvironment.isHeadless() returns true.
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

getDesktopProperty sample code for java.awt.Toolkit.getDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.getDesktopProperty(java.lang.String)

public final Object sample code for java.lang.Object definition code for java.lang.Object  getDesktopProperty(String sample code for java.lang.String definition code for java.lang.String  propertyName)
Obtains a value for the specified desktop property. A desktop property is a uniquely named value for a resource that is Toolkit global in nature. Usually it also is an abstract representation for an underlying platform dependent desktop setting.


setDesktopProperty sample code for java.awt.Toolkit.setDesktopProperty(java.lang.String, java.lang.Object) definition code for java.awt.Toolkit.setDesktopProperty(java.lang.String, java.lang.Object)

protected final void setDesktopProperty(String sample code for java.lang.String definition code for java.lang.String  name,
                                        Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
Sets the named desktop property to the specified value and fires a property change event to notify any listeners that the value has changed.


lazilyLoadDesktopProperty sample code for java.awt.Toolkit.lazilyLoadDesktopProperty(java.lang.String) definition code for java.awt.Toolkit.lazilyLoadDesktopProperty(java.lang.String)

protected Object sample code for java.lang.Object definition code for java.lang.Object  lazilyLoadDesktopProperty(String sample code for java.lang.String definition code for java.lang.String  name)
an opportunity to lazily evaluate desktop property values.


initializeDesktopProperties sample code for java.awt.Toolkit.initializeDesktopProperties() definition code for java.awt.Toolkit.initializeDesktopProperties()

protected void initializeDesktopProperties()
initializeDesktopProperties


addPropertyChangeListener sample code for java.awt.Toolkit.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Toolkit.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void addPropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  name,
                                      PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  pcl)
Adds the specified property change listener for the named desktop property. If pcl is null, no exception is thrown and no action is performed.

Parameters:
name - The name of the property to listen for
pcl - The property change listener
Since:
1.2

removePropertyChangeListener sample code for java.awt.Toolkit.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Toolkit.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void removePropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  name,
                                         PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  pcl)
Removes the specified property change listener for the named desktop property. If pcl is null, no exception is thrown and no action is performed.

Parameters:
name - The name of the property to remove
pcl - The property change listener
Since:
1.2

getPropertyChangeListeners sample code for java.awt.Toolkit.getPropertyChangeListeners() definition code for java.awt.Toolkit.getPropertyChangeListeners()

public PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this toolkit.

Returns:
all of this toolkit's PropertyChangeListeners or an empty array if no property change listeners are currently registered
Since:
1.4

getPropertyChangeListeners sample code for java.awt.Toolkit.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Toolkit.getPropertyChangeListeners(java.lang.String)

public PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners(String sample code for java.lang.String definition code for java.lang.String  propertyName)
Returns an array of all the PropertyChangeListeners associated with the named property.

Parameters:
propertyName - the named property
Returns:
all of the PropertyChangeListeners associated with the named property or an empty array if no such listeners have been added
Since:
1.4

addAWTEventListener sample code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) definition code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long)

public void addAWTEventListener(AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener  listener,
                                long eventMask)
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.

First, if there is a security manager, its checkPermission method is called with an AWTPermission("listenToAllAWTEvents") permission. This may result in a SecurityException.

eventMask is a bitmask of event types to receive. It is constructed by bitwise OR-ing together the event masks defined in AWTEvent.

Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the event listener.
eventMask - the bitmask of event types to receive
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.2
See Also:
removeAWTEventListener(java.awt.event.AWTEventListener) sample code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) definition code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) , getAWTEventListeners() sample code for java.awt.Toolkit.getAWTEventListeners() definition code for java.awt.Toolkit.getAWTEventListeners() , SecurityManager.checkPermission(java.security.Permission) sample code for java.lang.SecurityManager.checkPermission(java.security.Permission) definition code for java.lang.SecurityManager.checkPermission(java.security.Permission) , AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission , AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener , AWTEventListenerProxy sample code for java.awt.event.AWTEventListenerProxy definition code for java.awt.event.AWTEventListenerProxy

removeAWTEventListener sample code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) definition code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener)

public void removeAWTEventListener(AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener  listener)
Removes an AWTEventListener from receiving dispatched AWTEvents.

First, if there is a security manager, its checkPermission method is called with an AWTPermission("listenToAllAWTEvents") permission. This may result in a SecurityException.

Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the event listener.
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.2
See Also:
addAWTEventListener(java.awt.event.AWTEventListener, long) sample code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) definition code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) , getAWTEventListeners() sample code for java.awt.Toolkit.getAWTEventListeners() definition code for java.awt.Toolkit.getAWTEventListeners() , SecurityManager.checkPermission(java.security.Permission) sample code for java.lang.SecurityManager.checkPermission(java.security.Permission) definition code for java.lang.SecurityManager.checkPermission(java.security.Permission) , AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission , AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener , AWTEventListenerProxy sample code for java.awt.event.AWTEventListenerProxy definition code for java.awt.event.AWTEventListenerProxy

getAWTEventListeners sample code for java.awt.Toolkit.getAWTEventListeners() definition code for java.awt.Toolkit.getAWTEventListeners()

public AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener [] getAWTEventListeners()
Returns an array of all the AWTEventListeners registered on this toolkit. Listeners can be returned within AWTEventListenerProxy objects, which also contain the event mask for the given listener. Note that listener objects added multiple times appear only once in the returned array.

Returns:
all of the AWTEventListeners or an empty array if no listeners are currently registered
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.4
See Also:
addAWTEventListener(java.awt.event.AWTEventListener, long) sample code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) definition code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) , removeAWTEventListener(java.awt.event.AWTEventListener) sample code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) definition code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) , SecurityManager.checkPermission(java.security.Permission) sample code for java.lang.SecurityManager.checkPermission(java.security.Permission) definition code for java.lang.SecurityManager.checkPermission(java.security.Permission) , AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission , AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener , AWTEventListenerProxy sample code for java.awt.event.AWTEventListenerProxy definition code for java.awt.event.AWTEventListenerProxy

getAWTEventListeners sample code for java.awt.Toolkit.getAWTEventListeners(long) definition code for java.awt.Toolkit.getAWTEventListeners(long)

public AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener [] getAWTEventListeners(long eventMask)
Returns an array of all the AWTEventListeners registered on this toolkit which listen to all of the event types indicates in the eventMask argument. Listeners can be returned within AWTEventListenerProxy objects, which also contain the event mask for the given listener. Note that listener objects added multiple times appear only once in the returned array.

Parameters:
eventMask - the bitmask of event types to listen for
Returns:
all of the AWTEventListeners registered on this toolkit for the specified event types, or an empty array if no such listeners are currently registered
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkPermission method doesn't allow the operation.
Since:
1.4
See Also:
addAWTEventListener(java.awt.event.AWTEventListener, long) sample code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) definition code for java.awt.Toolkit.addAWTEventListener(java.awt.event.AWTEventListener, long) , removeAWTEventListener(java.awt.event.AWTEventListener) sample code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) definition code for java.awt.Toolkit.removeAWTEventListener(java.awt.event.AWTEventListener) , SecurityManager.checkPermission(java.security.Permission) sample code for java.lang.SecurityManager.checkPermission(java.security.Permission) definition code for java.lang.SecurityManager.checkPermission(java.security.Permission) , AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission , AWTEventListener sample code for java.awt.event.AWTEventListener definition code for java.awt.event.AWTEventListener , AWTEventListenerProxy sample code for java.awt.event.AWTEventListenerProxy definition code for java.awt.event.AWTEventListenerProxy

mapInputMethodHighlight sample code for java.awt.Toolkit.mapInputMethodHighlight(java.awt.im.InputMethodHighlight) definition code for java.awt.Toolkit.mapInputMethodHighlight(java.awt.im.InputMethodHighlight)

public abstract Map sample code for java.util.Map definition code for java.util.Map <TextAttribute sample code for java.awt.font.TextAttribute definition code for java.awt.font.TextAttribute ,?> mapInputMethodHighlight(InputMethodHighlight sample code for java.awt.im.InputMethodHighlight definition code for java.awt.im.InputMethodHighlight  highlight)
                                                      throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found. The style field of the input method highlight is ignored. The map returned is unmodifiable.

Parameters:
highlight - input method highlight
Returns:
style attribute map, or null
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
Since:
1.3
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()