Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » awt » [javadoc | source]
java.awt
abstract public class: Toolkit [javadoc | source]
java.lang.Object
   java.awt.Toolkit

Direct Known Subclasses:
    HeadlessToolkit, ToolkitImpl

Nested Class Summary:
final class  Toolkit.ComponentInternalsImpl   
final class  Toolkit.AWTEventsManager   
static final class  Toolkit.AutoNumber   
static final class  Toolkit.WindowList  Thread-safe collection of Window objects 
Field Summary
 Dispatcher dispatcher     
 EventDispatchThread dispatchThread     
 NativeEventThread nativeThread     
protected  AWTEventsManager awtEventsManager     
final  Object awtTreeLock     
final  ShutdownWatchdog shutdownWatchdog     
final  Theme theme     
final  AutoNumber autoNumber     
final  EventTypeLookup eventTypeLookup     
final  AllFrames allFrames     
 KeyboardFocusManager currentKeyboardFocusManager     
 MouseEventPreprocessor mouseEventPreprocessor     
 NativeClipboard systemClipboard     
protected final  Map<String, Object> desktopProperties     
protected final  PropertyChangeSupport desktopPropsSupport     
final  WindowList windows     
 DTK dtk     
Constructor:
 public Toolkit() 
Method from java.awt.Toolkit Summary:
addAWTEventListener,   addPropertyChangeListener,   beep,   checkHeadless,   checkImage,   createButton,   createCanvas,   createCheckbox,   createCheckboxMenuItem,   createChoice,   createComponent,   createCustomCursor,   createCustomNativeCursor,   createDialog,   createDragGestureRecognizer,   createDragSourceContextPeer,   createEmbeddedNativeWindow,   createFileDialog,   createFocusProxyNativeWindow,   createFrame,   createImage,   createImage,   createImage,   createImage,   createImage,   createLabel,   createList,   createMenu,   createMenuBar,   createMenuItem,   createNativeCursor,   createNativeWindow,   createPanel,   createPopupMenu,   createPopupNativeWindow,   createScrollPane,   createScrollbar,   createTextArea,   createTextField,   createWindow,   dispatchAWTEvent,   getAWTEventListeners,   getAWTEventListeners,   getBestCursorSize,   getColorModel,   getComponentById,   getDefaultFont,   getDefaultToolkit,   getDesktopProperty,   getEventMonitor,   getFocusProxyOwnerById,   getFontList,   getFontMetrics,   getFontPeer,   getGraphicsFactory,   getImage,   getImage,   getLockingKeyState,   getMaximumCursorColors,   getMenuShortcutKeyMask,   getMouseInfoPeer,   getNativeContainer,   getNativeEventQueue,   getNativeMouseInfo,   getPopupBoxById,   getPrintJob,   getPrintJob,   getProperty,   getPropertyChangeListeners,   getPropertyChangeListeners,   getScreenInsets,   getScreenResolution,   getScreenSize,   getSynchronizer,   getSystemClipboard,   getSystemEventQueue,   getSystemEventQueueCore,   getSystemEventQueueImpl,   getSystemSelection,   getWTK,   getWindowFactory,   init,   initializeDesktopProperties,   isDynamicLayoutActive,   isDynamicLayoutSet,   isFrameStateSupported,   lazilyLoadDesktopProperty,   loadSystemColors,   lockAWT,   mapInputMethodHighlight,   mapInputMethodHighlightImpl,   nativeWindowCreated,   onQueueEmpty,   onWindowCreated,   prepareImage,   removeAWTEventListener,   removeFocusProxyNativeWindow,   removeNativeWindow,   removePopupNativeWindow,   removePropertyChangeListener,   setDesktopProperty,   setDynamicLayout,   setLockingKeyState,   setSystemEventQueueCore,   staticLockAWT,   staticUnlockAWT,   sync,   unlockAWT,   unsafeInvokeAndWait
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.Toolkit Detail:
 public  void addAWTEventListener(AWTEventListener listener,
    long eventMask) 
 public  void addPropertyChangeListener(String propName,
    PropertyChangeListener l) 
 abstract public  void beep()
 static  void checkHeadless() throws HeadlessException 
 abstract public int checkImage(Image a0,
    int a1,
    int a2,
    ImageObserver a3)
 abstract protected ButtonPeer createButton(Button a0) throws HeadlessException
 abstract protected CanvasPeer createCanvas(Canvas a0)
 abstract protected CheckboxPeer createCheckbox(Checkbox a0) throws HeadlessException
 abstract protected CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem a0) throws HeadlessException
 abstract protected ChoicePeer createChoice(Choice a0) throws HeadlessException
 protected LightweightPeer createComponent(Component a0) throws NotImplementedException 
 public Cursor createCustomCursor(Image img,
    Point hotSpot,
    String name) throws IndexOutOfBoundsException, HeadlessException 
 NativeCursor createCustomNativeCursor(Image img,
    Point hotSpot,
    String name) 
    Returns a shared instance of implementation of org.apache.harmony.awt.wtk.NativeCursor for current platform for custom cursor
 abstract protected DialogPeer createDialog(Dialog a0) throws HeadlessException
 public T createDragGestureRecognizer(Class<T> recognizerAbstractClass,
    DragSource ds,
    Component c,
    int srcActions,
    DragGestureListener dgl) 
 abstract public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent a0) throws InvalidDnDOperationException
 NativeWindow createEmbeddedNativeWindow(EmbeddedWindow ew) 
 abstract protected FileDialogPeer createFileDialog(FileDialog a0) throws HeadlessException
 NativeWindow createFocusProxyNativeWindow(Window owner) 
 abstract protected FramePeer createFrame(Frame a0) throws HeadlessException
 abstract public Image createImage(ImageProducer a0)
 abstract public Image createImage(URL a0)
 abstract public Image createImage(String a0)
 public Image createImage(byte[] imagedata) 
 abstract public Image createImage(byte[] a0,
    int a1,
    int a2)
 abstract protected LabelPeer createLabel(Label a0) throws HeadlessException
 abstract protected ListPeer createList(List a0) throws HeadlessException
 abstract protected MenuPeer createMenu(Menu a0) throws HeadlessException
 abstract protected MenuBarPeer createMenuBar(MenuBar a0) throws HeadlessException
 abstract protected MenuItemPeer createMenuItem(MenuItem a0) throws HeadlessException
 NativeCursor createNativeCursor(int type) 
    Returns a shared instance of implementation of org.apache.harmony.awt.wtk.NativeCursor for current platform for
 NativeWindow createNativeWindow(Component c) 
 abstract protected PanelPeer createPanel(Panel a0)
 abstract protected PopupMenuPeer createPopupMenu(PopupMenu a0) throws HeadlessException
 NativeWindow createPopupNativeWindow(PopupBox popup) 
 abstract protected ScrollPanePeer createScrollPane(ScrollPane a0) throws HeadlessException
 abstract protected ScrollbarPeer createScrollbar(Scrollbar a0) throws HeadlessException
 abstract protected TextAreaPeer createTextArea(TextArea a0) throws HeadlessException
 abstract protected TextFieldPeer createTextField(TextField a0) throws HeadlessException
 abstract protected WindowPeer createWindow(Window a0) throws HeadlessException
  void dispatchAWTEvent(AWTEvent event) 
 public AWTEventListener[] getAWTEventListeners() 
 public AWTEventListener[] getAWTEventListeners(long eventMask) 
 public Dimension getBestCursorSize(int prefWidth,
    int prefHeight) throws HeadlessException 
 abstract public ColorModel getColorModel() throws HeadlessException
 Component getComponentById(long id) 
 Font getDefaultFont() 
 public static Toolkit getDefaultToolkit() 
 public final Object getDesktopProperty(String propName) 
 Object getEventMonitor() 
 Window getFocusProxyOwnerById(long id) 
 abstract public String[] getFontList()Deprecated! 
 abstract public FontMetrics getFontMetrics(Font font)Deprecated! 
 abstract protected FontPeer getFontPeer(String a0,
    int a1)Deprecated! 
 GraphicsFactory getGraphicsFactory() 
 abstract public Image getImage(String a0)
 abstract public Image getImage(URL a0)
 public boolean getLockingKeyState(int keyCode) throws UnsupportedOperationException 
 public int getMaximumCursorColors() throws HeadlessException 
 public int getMenuShortcutKeyMask() throws HeadlessException 
 protected MouseInfoPeer getMouseInfoPeer() 
 protected static Container getNativeContainer(Component c) 
 NativeEventQueue getNativeEventQueue() 
 NativeMouseInfo getNativeMouseInfo() 
    Returns implementation of org.apache.harmony.awt.wtk.NativeMouseInfo for current platform.
 PopupBox getPopupBoxById(long id) 
 abstract public PrintJob getPrintJob(Frame a0,
    String a1,
    Properties a2)
 public PrintJob getPrintJob(Frame a0,
    String a1,
    JobAttributes a2,
    PageAttributes a3) throws NotImplementedException 
 public static String getProperty(String propName,
    String defVal) 
 public PropertyChangeListener[] getPropertyChangeListeners() 
 public PropertyChangeListener[] getPropertyChangeListeners(String propName) 
 public Insets getScreenInsets(GraphicsConfiguration gc) throws HeadlessException 
 abstract public int getScreenResolution() throws HeadlessException
 abstract public Dimension getScreenSize() throws HeadlessException
 final Synchronizer getSynchronizer() 
 abstract public Clipboard getSystemClipboard() throws HeadlessException
 public final EventQueue getSystemEventQueue() 
 EventQueueCore getSystemEventQueueCore() 
 abstract protected EventQueue getSystemEventQueueImpl()
 public Clipboard getSystemSelection() throws HeadlessException 
 final WTK getWTK() 
 WindowFactory getWindowFactory() 
  void init() 
 protected  void initializeDesktopProperties() 
 public boolean isDynamicLayoutActive() throws HeadlessException 
 protected boolean isDynamicLayoutSet() throws HeadlessException 
 public boolean isFrameStateSupported(int state) throws HeadlessException 
 protected Object lazilyLoadDesktopProperty(String propName) 
 protected  void loadSystemColors(int[] colors) throws HeadlessException 
 final  void lockAWT() 
 abstract public Map<TextAttribute, ?> mapInputMethodHighlight(InputMethodHighlight highlight) throws HeadlessException
 Map<TextAttribute, ?> mapInputMethodHighlightImpl(InputMethodHighlight highlight) throws HeadlessException 
  void nativeWindowCreated(NativeWindow win) 
    Connect the component to its native window This method is called after the synchronous window creation, and also in the window creation callback if it exists (WM_CREATE on Windows) Calling this method twice is OK because in second time it just does nothing. This is done this way because on Windows the native window gets a series of native events before windowFactory.CreateWindow() returns, and the WinWindow object should be created to process them. The WM_CREATE message is guaranteed to be first in the series, so that the the WM_CREATE handler creates the WinWindow object and calls nativeWindowCreated() for it.
  void onQueueEmpty() 
 boolean onWindowCreated(long winId) 
    Connect the component to its native window
 abstract public boolean prepareImage(Image a0,
    int a1,
    int a2,
    ImageObserver a3)
 public  void removeAWTEventListener(AWTEventListener listener) 
  void removeFocusProxyNativeWindow(NativeWindow w) 
  void removeNativeWindow(NativeWindow w) 
  void removePopupNativeWindow(NativeWindow w) 
 public  void removePropertyChangeListener(String propName,
    PropertyChangeListener l) 
 protected final  void setDesktopProperty(String propName,
    Object value) 
 public  void setDynamicLayout(boolean dynamic) throws HeadlessException 
 public  void setLockingKeyState(int keyCode,
    boolean on) throws UnsupportedOperationException 
  void setSystemEventQueueCore(EventQueueCore core) 
 static final  void staticLockAWT() 
 static final  void staticUnlockAWT() 
 abstract public  void sync()
 final  void unlockAWT() 
 final  void unsafeInvokeAndWait(Runnable runnable) throws InterruptedException, InvocationTargetException 
    InvokeAndWait under AWT lock. W/o this method system can hang up. Added to support modality (Dialog.show() & PopupMenu.show()) from not event dispatch thread. Use in other cases is not recommended. Still can be called only for whole API methods that cannot be called from other classes API methods. Examples: show() for modal dialogs - correct, only user can call it, directly or through setVisible(true) setBounds() for components - incorrect, setBounds() can be called from layoutContainer() for layout managers