com.creamtec.ajaxswing.gui

## Class AjaxSwingToolkit

- java.lang.Object
- - java.awt.Toolkit
  - - sun.awt.SunToolkit
    - - com.creamtec.ajaxswing.gui.AjaxSwingToolkit

- All Implemented Interfaces:
    sun.awt.ComponentFactory, sun.awt.InputMethodSupport, sun.awt.KeyboardFocusManagerPeerProvider, sun.awt.WindowClosingListener, sun.awt.WindowClosingSupport
  Direct Known Subclasses:
    AjaxSwingToolkit130

      public abstract class AjaxSwingToolkit
      extends sun.awt.SunToolkit

  AjaxSwing's implementation of AWT Toolkit is provided to override instantiation of peers and control other platform specific operations such as image loading. The peers created are AjaxSwing's peers, which do not have any GUI. This allows to run the client as a console application, while still keeping track of window operations such as show and hide.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class sun.awt.SunToolkit

      `sun.awt.SunToolkit.IllegalThreadException, sun.awt.SunToolkit.InfiniteLoop, sun.awt.SunToolkit.OperationTimedOut`

  - ### Field Summary

    - ### Fields inherited from class sun.awt.SunToolkit

      `DEFAULT_WAIT_TIME, DESKTOPFONTHINTS, GRAB_EVENT_MASK, MAX_BUTTONS_SUPPORTED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AjaxSwingToolkit()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `areExtraMouseButtonsEnabled()`
    `void` | `beep()`
    `int` | `checkImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)`
    `java.awt.peer.ButtonPeer` | `createButton(java.awt.Button target)`
    `java.awt.peer.CanvasPeer` | `createCanvas(java.awt.Canvas target)`
    `java.awt.peer.CheckboxPeer` | `createCheckbox(java.awt.Checkbox target)`
    `java.awt.peer.CheckboxMenuItemPeer` | `createCheckboxMenuItem(java.awt.CheckboxMenuItem target)`
    `java.awt.peer.ChoicePeer` | `createChoice(java.awt.Choice target)`
    `java.awt.peer.DialogPeer` | `createDialog(java.awt.Dialog target)`
    `<T extends java.awt.dnd.DragGestureRecognizer> T` | `createDragGestureRecognizer(java.lang.Class<T> abstractRecognizerClass, java.awt.dnd.DragSource ds, java.awt.Component c, int srcActions, java.awt.dnd.DragGestureListener dgl)`
    `java.awt.dnd.peer.DragSourceContextPeer` | `createDragSourceContextPeer(java.awt.dnd.DragGestureEvent dge)`
    `java.awt.peer.FileDialogPeer` | `createFileDialog(java.awt.FileDialog parm1)`
    `java.awt.peer.FramePeer` | `createFrame(java.awt.Frame target)`
    `java.awt.Image` | `createImage(java.awt.image.ImageProducer producer)` Uses as a wrapper around sun.awt.image.Image to capture the creation and loading of all images.
    `java.awt.Image` | `createImage(java.lang.String fileName)`
    `java.awt.Image` | `createImage(java.net.URL url)`
    `java.awt.peer.LabelPeer` | `createLabel(java.awt.Label target)`
    `java.awt.peer.ListPeer` | `createList(java.awt.List target)`
    `java.awt.peer.MenuPeer` | `createMenu(java.awt.Menu target)`
    `java.awt.peer.MenuBarPeer` | `createMenuBar(java.awt.MenuBar target)`
    `java.awt.peer.MenuItemPeer` | `createMenuItem(java.awt.MenuItem target)`
    `java.awt.peer.PanelPeer` | `createPanel(java.awt.Panel target)`
    `java.awt.peer.PopupMenuPeer` | `createPopupMenu(java.awt.PopupMenu target)`
    `java.awt.peer.RobotPeer` | `createRobot(java.awt.Robot arg0, java.awt.GraphicsDevice arg1)`
    `java.awt.peer.ScrollbarPeer` | `createScrollbar(java.awt.Scrollbar target)`
    `java.awt.peer.ScrollPanePeer` | `createScrollPane(java.awt.ScrollPane target)`
    `java.awt.peer.TextAreaPeer` | `createTextArea(java.awt.TextArea target)`
    `java.awt.peer.TextFieldPeer` | `createTextField(java.awt.TextField target)`
    `java.awt.peer.WindowPeer` | `createWindow(java.awt.Window target)`
    `java.awt.image.ColorModel` | `getColorModel()`
    `java.awt.FontMetrics` | `getFontMetrics(java.awt.Font font)`
    `java.awt.peer.FontPeer` | `getFontPeer(java.lang.String name, int style)`
    `static java.lang.String` | `getIconFileName(javax.swing.Icon icon, java.awt.Component component)`
    `java.awt.Image` | `getImage(java.lang.String fileName)`
    `java.awt.Image` | `getImage(java.net.URL url)`
    `static java.lang.String` | `getImageFileName(java.awt.Image image)`
    `static java.lang.String` | `getImageUrl(java.awt.Image image)`
    `java.awt.im.spi.InputMethodDescriptor` | `getInputMethodAdapterDescriptor()`
    `java.awt.PrintJob` | `getPrintJob(java.awt.Frame frame, java.lang.String jobtitle, java.util.Properties props)`
    `int` | `getScreenResolution()`
    `java.awt.datatransfer.Clipboard` | `getSystemClipboard()`
    `boolean` | `isFrameStateSupported(int state)`
    `boolean` | `isUndecorated(java.awt.Container window)` Returns true if the window does not have a title bar.
    `static boolean` | `isWindowUndecorated(java.awt.Container window)`
    `java.util.Map` | `mapInputMethodHighlight(java.awt.im.InputMethodHighlight highlight)`
    `boolean` | `prepareImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)`
    `static void` | `registerIcon(javax.swing.Icon icon, java.lang.String fileName)`
    `static void` | `registerImage(java.awt.Image image, java.lang.String fileName)`
    `static void` | `registerImage(java.awt.Image image, java.net.URL url)`
    `static void` | `registerStandardImages(java.awt.Component component)`
    `static void` | `setDelegateToolkitClassName(java.lang.String name)` Ignored because delegates are not used anymore (inheritance used instead)
    `void` | `sync()`

    - ### Methods inherited from class sun.awt.SunToolkit

      `addModalityListener, awtLock, awtLockNotify, awtLockNotifyAll, awtLockWait, awtLockWait, awtTryLock, awtUnlock, canPopupOverlapTaskBar, checkAndSetPolicy, closeSplashScreen, consumeNextKeyTyped, createImage, createInputMethodWindow, createNewAppContext, createSystemTray, createTrayIcon, disableBackgroundErase, disableBackgroundErase, enableInputMethodsForTextComponent, executeOnEDTAndWait, executeOnEventHandlerThread, executeOnEventHandlerThread, executeOnEventHandlerThread, flushPendingEvents, flushPendingEvents, getContainingWindow, getDataTransfererClassName, getDefaultKeyboardLocale, getDesktopFontHints, getFocusAcceleratorKeyMask, getFontList, getHeavyweightComponent, getKeyboardFocusManagerPeer, getNativeContainer, getNumberOfButtons, getScaledIconData, getScaledIconImage, getScreenSize, getStartupLocale, getSunAwtDisableMixing, getSunAwtErasebackgroundonresize, getSunAwtNoerasebackground, getSystemEventQueueImplPP, getWindowClosingListener, getWindowDeactivationTime, grab, insertTargetMapping, invokeLaterOnAppContext, isAWTLockHeldByCurrentThread, isContainingTopLevelOpaque, isContainingTopLevelTranslucent, isDesktopSupported, isDispatchThreadForAppContext, isInstanceOf, isLightweightOrUnknown, isModalExcluded, isModalExcludedSupported, isModalExclusionTypeSupported, isModalityTypeSupported, isNativeGTKAvailable, isPostEventQueueEmpty, isPrintableCharacterModifiersMask, isSwingBackbufferTranslucencySupported, isSystemGenerated, isTranslucencyCapable, isTraySupported, isWindowOpacitySupported, isWindowShapingSupported, isWindowTranslucencySupported, needsXEmbed, needUpdateWindow, notifyModalityPopped, notifyModalityPushed, postEvent, postPriorityEvent, realSync, realSync, removeModalityListener, setAAFontSettingsCondition, setLWRequestStatus, setModalExcluded, setSystemGenerated, setWindowClosingListener, setWindowDeactivationTime, targetToAppContext, ungrab, useBufferPerWindow, windowClosingDelivered, windowClosingNotify`

    - ### Methods inherited from class java.awt.Toolkit

      `addAWTEventListener, addPropertyChangeListener, createCustomCursor, createImage, getAWTEventListeners, getAWTEventListeners, getBestCursorSize, getDefaultToolkit, getDesktopProperty, getLockingKeyState, getMaximumCursorColors, getMenuShortcutKeyMask, getPrintJob, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getScreenInsets, getSystemEventQueue, getSystemSelection, isAlwaysOnTopSupported, isDynamicLayoutActive, removeAWTEventListener, removePropertyChangeListener, setDynamicLayout, setLockingKeyState`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AjaxSwingToolkit

          public AjaxSwingToolkit()

  - ### Method Detail

    - #### getImage

          public java.awt.Image getImage(java.lang.String fileName)

      Overrides:
        `getImage` in class `sun.awt.SunToolkit`

    - #### getImage

          public java.awt.Image getImage(java.net.URL url)

      Overrides:
        `getImage` in class `sun.awt.SunToolkit`

    - #### createImage

          public java.awt.Image createImage(java.lang.String fileName)

      Overrides:
        `createImage` in class `sun.awt.SunToolkit`

    - #### createImage

          public java.awt.Image createImage(java.net.URL url)

      Overrides:
        `createImage` in class `sun.awt.SunToolkit`

    - #### createImage

          public java.awt.Image createImage(java.awt.image.ImageProducer producer)

      Uses as a wrapper around sun.awt.image.Image to capture the creation and loading of all images. The created images are stored in a map in AjaxSwingToolkit to maintain association between the image object and the file that was used to load it.
      Overrides:
        `createImage` in class `sun.awt.SunToolkit`

    - #### checkImage

          public final int checkImage(java.awt.Image image,
                       int width,
                       int height,
                       java.awt.image.ImageObserver observer)

      Overrides:
        `checkImage` in class `sun.awt.SunToolkit`

    - #### prepareImage

          public final boolean prepareImage(java.awt.Image image,
                             int width,
                             int height,
                             java.awt.image.ImageObserver observer)

      Overrides:
        `prepareImage` in class `sun.awt.SunToolkit`

    - #### getScreenResolution

          public int getScreenResolution()

      Specified by:
        `getScreenResolution` in class `java.awt.Toolkit`

    - #### isFrameStateSupported

          public boolean isFrameStateSupported(int state)
                                        throws java.awt.HeadlessException

      Overrides:
        `isFrameStateSupported` in class `java.awt.Toolkit`
      Throws:
        `java.awt.HeadlessException`

    - #### getColorModel

          public java.awt.image.ColorModel getColorModel()

      Specified by:
        `getColorModel` in class `java.awt.Toolkit`

    - #### getFontMetrics

          public java.awt.FontMetrics getFontMetrics(java.awt.Font font)

      Overrides:
        `getFontMetrics` in class `sun.awt.SunToolkit`

    - #### sync

          public void sync()

      Specified by:
        `sync` in class `java.awt.Toolkit`

    - #### getPrintJob

          public java.awt.PrintJob getPrintJob(java.awt.Frame frame,
                                      java.lang.String jobtitle,
                                      java.util.Properties props)

      Specified by:
        `getPrintJob` in class `java.awt.Toolkit`

    - #### beep

          public void beep()

      Specified by:
        `beep` in class `java.awt.Toolkit`

    - #### getSystemClipboard

          public java.awt.datatransfer.Clipboard getSystemClipboard()

      Specified by:
        `getSystemClipboard` in class `java.awt.Toolkit`

    - #### createDragSourceContextPeer

          public java.awt.dnd.peer.DragSourceContextPeer createDragSourceContextPeer(java.awt.dnd.DragGestureEvent dge)
                                                                              throws java.awt.dnd.InvalidDnDOperationException

      Specified by:
        `createDragSourceContextPeer` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createDragSourceContextPeer` in class `sun.awt.SunToolkit`
      Throws:
        `java.awt.dnd.InvalidDnDOperationException`

    - #### registerImage

          public static void registerImage(java.awt.Image image,
                           java.lang.String fileName)

    - #### registerImage

          public static void registerImage(java.awt.Image image,
                           java.net.URL url)

    - #### registerIcon

          public static void registerIcon(javax.swing.Icon icon,
                          java.lang.String fileName)

    - #### getImageUrl

          public static java.lang.String getImageUrl(java.awt.Image image)

    - #### getImageFileName

          public static java.lang.String getImageFileName(java.awt.Image image)

    - #### getIconFileName

          public static java.lang.String getIconFileName(javax.swing.Icon icon,
                                         java.awt.Component component)

    - #### registerStandardImages

          public static void registerStandardImages(java.awt.Component component)

    - #### createWindow

          public java.awt.peer.WindowPeer createWindow(java.awt.Window target)

      Specified by:
        `createWindow` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createWindow` in class `sun.awt.SunToolkit`

    - #### createDialog

          public java.awt.peer.DialogPeer createDialog(java.awt.Dialog target)

      Specified by:
        `createDialog` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createDialog` in class `sun.awt.SunToolkit`

    - #### createFrame

          public java.awt.peer.FramePeer createFrame(java.awt.Frame target)

      Specified by:
        `createFrame` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createFrame` in class `sun.awt.SunToolkit`

    - #### createCanvas

          public java.awt.peer.CanvasPeer createCanvas(java.awt.Canvas target)

      Specified by:
        `createCanvas` in interface `sun.awt.ComponentFactory`
      Overrides:
        `createCanvas` in class `sun.awt.SunToolkit`

    - #### createButton

          public java.awt.peer.ButtonPeer createButton(java.awt.Button target)

      Specified by:
        `createButton` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createButton` in class `sun.awt.SunToolkit`

    - #### createCheckbox

          public java.awt.peer.CheckboxPeer createCheckbox(java.awt.Checkbox target)

      Specified by:
        `createCheckbox` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createCheckbox` in class `sun.awt.SunToolkit`

    - #### createCheckboxMenuItem

          public java.awt.peer.CheckboxMenuItemPeer createCheckboxMenuItem(java.awt.CheckboxMenuItem target)

      Specified by:
        `createCheckboxMenuItem` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createCheckboxMenuItem` in class `sun.awt.SunToolkit`

    - #### createChoice

          public java.awt.peer.ChoicePeer createChoice(java.awt.Choice target)

      Specified by:
        `createChoice` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createChoice` in class `sun.awt.SunToolkit`

    - #### createFileDialog

          public java.awt.peer.FileDialogPeer createFileDialog(java.awt.FileDialog parm1)

      Specified by:
        `createFileDialog` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createFileDialog` in class `sun.awt.SunToolkit`

    - #### createLabel

          public java.awt.peer.LabelPeer createLabel(java.awt.Label target)

      Specified by:
        `createLabel` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createLabel` in class `sun.awt.SunToolkit`

    - #### createList

          public java.awt.peer.ListPeer createList(java.awt.List target)

      Specified by:
        `createList` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createList` in class `sun.awt.SunToolkit`

    - #### createMenu

          public java.awt.peer.MenuPeer createMenu(java.awt.Menu target)

      Specified by:
        `createMenu` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createMenu` in class `sun.awt.SunToolkit`

    - #### createMenuBar

          public java.awt.peer.MenuBarPeer createMenuBar(java.awt.MenuBar target)

      Specified by:
        `createMenuBar` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createMenuBar` in class `sun.awt.SunToolkit`

    - #### createMenuItem

          public java.awt.peer.MenuItemPeer createMenuItem(java.awt.MenuItem target)

      Specified by:
        `createMenuItem` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createMenuItem` in class `sun.awt.SunToolkit`

    - #### createPanel

          public java.awt.peer.PanelPeer createPanel(java.awt.Panel target)

      Specified by:
        `createPanel` in interface `sun.awt.ComponentFactory`
      Overrides:
        `createPanel` in class `sun.awt.SunToolkit`

    - #### createPopupMenu

          public java.awt.peer.PopupMenuPeer createPopupMenu(java.awt.PopupMenu target)

      Specified by:
        `createPopupMenu` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createPopupMenu` in class `sun.awt.SunToolkit`

    - #### createScrollPane

          public java.awt.peer.ScrollPanePeer createScrollPane(java.awt.ScrollPane target)

      Specified by:
        `createScrollPane` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createScrollPane` in class `sun.awt.SunToolkit`

    - #### createScrollbar

          public java.awt.peer.ScrollbarPeer createScrollbar(java.awt.Scrollbar target)

      Specified by:
        `createScrollbar` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createScrollbar` in class `sun.awt.SunToolkit`

    - #### createTextArea

          public java.awt.peer.TextAreaPeer createTextArea(java.awt.TextArea target)

      Specified by:
        `createTextArea` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createTextArea` in class `sun.awt.SunToolkit`

    - #### createTextField

          public java.awt.peer.TextFieldPeer createTextField(java.awt.TextField target)

      Specified by:
        `createTextField` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createTextField` in class `sun.awt.SunToolkit`

    - #### getFontPeer

          public java.awt.peer.FontPeer getFontPeer(java.lang.String name,
                                           int style)

      Specified by:
        `getFontPeer` in interface `sun.awt.ComponentFactory`
      Specified by:
        `getFontPeer` in class `sun.awt.SunToolkit`

    - #### setDelegateToolkitClassName

          public static void setDelegateToolkitClassName(java.lang.String name)

      Ignored because delegates are not used anymore (inheritance used instead)

    - #### isUndecorated

          public boolean isUndecorated(java.awt.Container window)

      Returns true if the window does not have a title bar. Available in JDK 1.4 or later
      Parameters:
        `window` - Window
      Returns:
        boolean

    - #### isWindowUndecorated

          public static boolean isWindowUndecorated(java.awt.Container window)

    - #### createRobot

          public java.awt.peer.RobotPeer createRobot(java.awt.Robot arg0,
                                            java.awt.GraphicsDevice arg1)
                                              throws java.awt.AWTException

      Specified by:
        `createRobot` in interface `sun.awt.ComponentFactory`
      Specified by:
        `createRobot` in class `sun.awt.SunToolkit`
      Throws:
        `java.awt.AWTException`

    - #### mapInputMethodHighlight

          public java.util.Map mapInputMethodHighlight(java.awt.im.InputMethodHighlight highlight)
                                                throws java.awt.HeadlessException

      Specified by:
        `mapInputMethodHighlight` in class `java.awt.Toolkit`
      Throws:
        `java.awt.HeadlessException`

    - #### getInputMethodAdapterDescriptor

          public java.awt.im.spi.InputMethodDescriptor getInputMethodAdapterDescriptor()
                                                                                throws java.awt.AWTException

      Throws:
        `java.awt.AWTException`

    - #### createDragGestureRecognizer

          public <T extends java.awt.dnd.DragGestureRecognizer> T createDragGestureRecognizer(java.lang.Class<T> abstractRecognizerClass,
                                                                                     java.awt.dnd.DragSource ds,
                                                                                     java.awt.Component c,
                                                                                     int srcActions,
                                                                                     java.awt.dnd.DragGestureListener dgl)

      Overrides:
        `createDragGestureRecognizer` in class `java.awt.Toolkit`

    - #### areExtraMouseButtonsEnabled

          public boolean areExtraMouseButtonsEnabled()
                                              throws java.awt.HeadlessException

      Overrides:
        `areExtraMouseButtonsEnabled` in class `java.awt.Toolkit`
      Throws:
        `java.awt.HeadlessException`

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.