java.awt

Class Toolkit

  • java.lang.Object
    • java.awt.Toolkit
  • public abstract class Toolkit extends java.lang.Object
    This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit. Subclasses of the Toolkit class are used to bind the various components to particular native toolkit implementations.

    Many GUI events may be delivered to user asynchronously, if the opposite is not specified explicitly. As well as many GUI operations may be performed asynchronously. This fact means that if the state of a component is set, and then the state immediately queried, the returned value may not yet reflect the requested change. This behavior includes, but is not limited to:

    • Scrolling to a specified position.
      For example, calling ScrollPane.setScrollPosition and then getScrollPosition may return an incorrect value if the original request has not yet been processed.

    • Moving the focus from one component to another.
      For more information, see Timing Focus Transfers, a section in The Swing Tutorial.

    • Making a top-level container visible.
      Calling setVisible(true) on a Window, Frame or Dialog may occur asynchronously.

    • Setting the size or location of a top-level container.
      Calls to setSize, setBounds or setLocation on a Window, Frame or Dialog are forwarded to the underlying window management system and may be ignored or modified. See Window for more information.

    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
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator getDefaultToolkit Reveal DetailHide Detail
      Gets the default toolkit.
      Ordinary member indicator getProperty Reveal DetailHide Detail
      Gets a property with the specified key and default.
    • Constructors 
      Constructor and Description
      Ordinary member indicator Toolkit Reveal DetailHide Detail
       
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator addAWTEventListener Reveal DetailHide Detail
      Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask.
      Ordinary member indicator addPropertyChangeListener Reveal DetailHide Detail
      Adds the specified property change listener for the named desktop property.
      Ordinary member indicator areExtraMouseButtonsEnabled Reveal DetailHide Detail
      Reports whether events from extra mouse buttons are allowed to be processed and posted into EventQueue.
      Ordinary member indicator beep Reveal DetailHide Detail
      Emits an audio beep.
      Ordinary member indicator checkImage Reveal DetailHide Detail
      Indicates the construction status of a specified image that is being prepared for display.
      Ordinary member indicator createCustomCursor Reveal DetailHide Detail
      Creates a new custom cursor object.
      Ordinary member indicator createDragGestureRecognizer Reveal DetailHide Detail
      Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified.
      Ordinary member indicator createDragSourceContextPeer Reveal DetailHide Detail
      Creates the peer for a DragSourceContext.
      Ordinary member indicator createImage Reveal DetailHide Detail
      Creates an image which decodes the image stored in the specified byte array.
      Ordinary member indicator createImage Reveal DetailHide Detail
      Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
      Ordinary member indicator createImage Reveal DetailHide Detail
      Creates an image with the specified image producer.
      Ordinary member indicator createImage Reveal DetailHide Detail
      Returns an image which gets pixel data from the specified file.
      Ordinary member indicator createImage Reveal DetailHide Detail
      Returns an image which gets pixel data from the specified URL.
      Ordinary member indicator getAWTEventListeners Reveal DetailHide Detail
      Returns an array of all the AWTEventListeners registered on this toolkit.
      Ordinary member indicator getAWTEventListeners Reveal DetailHide Detail
      Returns an array of all the AWTEventListeners registered on this toolkit which listen to all of the event types specified in the eventMask argument.
      Ordinary member indicator getBestCursorSize Reveal DetailHide Detail
      Returns the supported cursor dimension which is closest to the desired sizes.
      Ordinary member indicator getColorModel Reveal DetailHide Detail
      Determines the color model of this toolkit's screen.
      Ordinary member indicator getDesktopProperty Reveal DetailHide Detail
      Obtains a value for the specified desktop property.
      Ordinary member indicator getFontList Reveal DetailHide Detail
      Ordinary member indicator getFontMetrics Reveal DetailHide Detail
      Deprecated. As of JDK version 1.2, replaced by the Font method getLineMetrics.
      Ordinary member indicator getImage Reveal DetailHide Detail
      Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
      Ordinary member indicator getImage Reveal DetailHide Detail
      Returns an image which gets pixel data from the specified URL.
      Ordinary member indicator getLockingKeyState Reveal DetailHide Detail
      Returns whether the given locking key on the keyboard is currently in its "on" state.
      Ordinary member indicator getMaximumCursorColors Reveal DetailHide Detail
      Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
      Ordinary member indicator getMenuShortcutKeyMask Reveal DetailHide Detail
      Determines which modifier key is the appropriate accelerator key for menu shortcuts.
      Ordinary member indicator getPrintJob Reveal DetailHide Detail
      Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
      Ordinary member indicator getPrintJob Reveal DetailHide Detail
      Gets a PrintJob object which is the result of initiating a print operation on the toolkit's platform.
      Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
      Returns an array of all the property change listeners registered on this toolkit.
      Ordinary member indicator getPropertyChangeListeners Reveal DetailHide Detail
      Returns an array of all property change listeners associated with the specified name of a desktop property.
      Ordinary member indicator getScreenInsets Reveal DetailHide Detail
      Gets the insets of the screen.
      Ordinary member indicator getScreenResolution Reveal DetailHide Detail
      Returns the screen resolution in dots-per-inch.
      Ordinary member indicator getScreenSize Reveal DetailHide Detail
      Gets the size of the screen.
      Ordinary member indicator getSystemClipboard Reveal DetailHide Detail
      Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.
      Ordinary member indicator getSystemEventQueue Reveal DetailHide Detail
      Get the application's or applet's EventQueue instance.
      Ordinary member indicator getSystemSelection Reveal DetailHide Detail
      Gets the singleton instance of the system selection as a Clipboard object.
      Ordinary member indicator isAlwaysOnTopSupported Reveal DetailHide Detail
      Returns whether the always-on-top mode is supported by this toolkit.
      Ordinary member indicator isDynamicLayoutActive Reveal DetailHide Detail
      Returns whether dynamic layout of Containers on resize is currently active (both set in program ( isDynamicLayoutSet() ) , and supported by the underlying operating system and/or window manager).
      Ordinary member indicator isFrameStateSupported Reveal DetailHide Detail
      Returns whether Toolkit supports this state for Frames.
      Ordinary member indicator isModalExclusionTypeSupported Reveal DetailHide Detail
      Returns whether the given modal exclusion type is supported by this toolkit.
      Ordinary member indicator isModalityTypeSupported Reveal DetailHide Detail
      Returns whether the given modality type is supported by this toolkit.
      Ordinary member indicator mapInputMethodHighlight Reveal DetailHide Detail
      Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.
      Ordinary member indicator prepareImage Reveal DetailHide Detail
      Prepares an image for rendering.
      Ordinary member indicator removeAWTEventListener Reveal DetailHide Detail
      Removes an AWTEventListener from receiving dispatched AWTEvents.
      Ordinary member indicator removePropertyChangeListener Reveal DetailHide Detail
      Removes the specified property change listener for the named desktop property.
      Ordinary member indicator setDynamicLayout Reveal DetailHide Detail
      Controls whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete.
      Ordinary member indicator setLockingKeyState Reveal DetailHide Detail
      Sets the state of the given locking key on the keyboard.
      Ordinary member indicator sync Reveal DetailHide Detail
      Synchronizes this toolkit's graphics state.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge