Save This Page
Home » openjdk-7 » sun » awt » windows » [javadoc | source]
sun.awt.windows
public class: WToolkit [javadoc | source]
java.lang.Object
   java.awt.Toolkit
      sun.awt.SunToolkit
         sun.awt.windows.WToolkit

All Implemented Interfaces:
    Runnable, ComponentFactory, InputMethodSupport, WindowClosingListener, WindowClosingSupport, KeyboardFocusManagerPeerProvider

Nested Class Summary:
static class  WToolkit.ToolkitDisposer   
Field Summary
static  GraphicsConfiguration config     
 WClipboard clipboard     
protected  boolean dynamicLayoutSetting     
public static final  String DATA_TRANSFERER_CLASS_NAME     
static  ColorModel screenmodel     
Fields inherited from sun.awt.SunToolkit:
GRAB_EVENT_MASK,  numberOfButtons,  MAX_BUTTONS_SUPPORTED,  imgCache,  DEFAULT_WAIT_TIME,  eqNoEvents,  DESKTOPFONTHINTS
Fields inherited from java.awt.Toolkit:
desktopProperties,  desktopPropsSupport,  $assertionsDisabled
Constructor:
 public WToolkit() 
Method from sun.awt.windows.WToolkit Summary:
addPropertyChangeListener,   areExtraMouseButtonsEnabled,   beep,   createButton,   createCanvas,   createCheckbox,   createCheckboxMenuItem,   createChoice,   createCustomCursor,   createDesktopPeer,   createDialog,   createDragGestureRecognizer,   createDragSourceContextPeer,   createEmbeddedFrame,   createFileDialog,   createFrame,   createKeyboardFocusManagerPeer,   createLabel,   createList,   createMenu,   createMenuBar,   createMenuItem,   createPanel,   createPopupMenu,   createRobot,   createScrollPane,   createScrollbar,   createSystemTray,   createTextArea,   createTextField,   createTrayIcon,   createWPageDialog,   createWPrintDialog,   createWindow,   disableBackgroundErase,   displayChanged,   embeddedDispose,   embeddedEventLoopIdleProcessing,   embeddedInit,   enableInputMethodsForTextComponent,   getBestCursorSize,   getColorModel,   getDefaultKeyboardLocale,   getDesktopAAHints,   getFontMetrics,   getFontPeer,   getInputMethodAdapterDescriptor,   getLockingKeyState,   getLockingKeyStateNative,   getMaximumCursorColors,   getNumberOfButtons,   getPrintJob,   getPrintJob,   getScreenHeight,   getScreenInsets,   getScreenInsets,   getScreenResolution,   getScreenWidth,   getStaticColorModel,   getSystemClipboard,   getWToolkit,   grab,   initializeDesktopProperties,   isDesktopSupported,   isDynamicLayoutActive,   isDynamicLayoutSet,   isDynamicLayoutSupportedNative,   isFrameStateSupported,   isModalExclusionTypeSupported,   isModalityTypeSupported,   isTranslucencyCapable,   isTraySupported,   isWindowOpacitySupported,   isWindowShapingSupported,   isWindowTranslucencySupported,   lazilyLoadDesktopProperty,   loadLibraries,   loadSystemColors,   makeColorModel,   mapInputMethodHighlight,   needUpdateWindow,   paletteChanged,   quitSecondaryEventLoop,   resetGC,   run,   setDynamicLayout,   setDynamicLayoutNative,   setExtraMouseButtonsEnabledNative,   setLockingKeyState,   setLockingKeyStateNative,   startSecondaryEventLoop,   sync,   syncNativeQueue,   targetDisposedPeer,   targetToPeer,   ungrab,   useBufferPerWindow
Methods from sun.awt.SunToolkit:
addModalityListener,   awtLock,   awtLockNotify,   awtLockNotifyAll,   awtLockWait,   awtLockWait,   awtTryLock,   awtUnlock,   checkAndSetPolicy,   checkImage,   closeSplashScreen,   consumeNextKeyTyped,   createButton,   createCanvas,   createCheckbox,   createCheckboxMenuItem,   createChoice,   createDialog,   createDragSourceContextPeer,   createFileDialog,   createFrame,   createImage,   createImage,   createImage,   createImage,   createInputMethodWindow,   createKeyboardFocusManagerPeer,   createLabel,   createList,   createMenu,   createMenuBar,   createMenuItem,   createNewAppContext,   createPanel,   createPopupMenu,   createRobot,   createScrollPane,   createScrollbar,   createSystemTray,   createTextArea,   createTextField,   createTrayIcon,   createWindow,   disableBackgroundErase,   disableBackgroundErase,   dumpPeers,   enableInputMethodsForTextComponent,   executeOnEDTAndWait,   executeOnEventHandlerThread,   executeOnEventHandlerThread,   executeOnEventHandlerThread,   flushPendingEvents,   getBooleanSystemProperty,   getContainingWindow,   getDataTransfererClassName,   getDefaultKeyboardLocale,   getDesktopAAHints,   getDesktopFontHints,   getField,   getFontList,   getFontMetrics,   getFontPeer,   getHeavyweightComponent,   getImage,   getImage,   getImageFromHash,   getImageFromHash,   getMethod,   getMouseInfoPeer,   getNativeContainer,   getNumberOfButtons,   getScaledIconData,   getScaledIconImage,   getScreenHeight,   getScreenSize,   getScreenWidth,   getStartupLocale,   getSunAwtDisableMixing,   getSunAwtErasebackgroundonresize,   getSunAwtNoerasebackground,   getSystemEventQueueImpl,   getSystemEventQueueImplPP,   getSystemEventQueueImplPP,   getSystemProperty,   getWindowClosingListener,   grab,   insertTargetMapping,   invokeLaterOnAppContext,   isAWTLockHeldByCurrentThread,   isContainingTopLevelOpaque,   isContainingTopLevelTranslucent,   isDesktopSupported,   isDispatchThreadForAppContext,   isInstanceOf,   isLightweightOrUnknown,   isModalExcluded,   isModalExcludedSupported,   isModalExcludedSupportedImpl,   isModalExclusionTypeSupported,   isModalityTypeSupported,   isNativeGTKAvailable,   isPostEventQueueEmpty,   isSystemGenerated,   isTranslucencyCapable,   isTraySupported,   isWindowOpacitySupported,   isWindowShapingSupported,   isWindowTranslucencySupported,   isXEmbedServerRequested,   needUpdateWindow,   needsXEmbed,   needsXEmbedImpl,   notifyModalityChange,   notifyModalityPopped,   notifyModalityPushed,   postEvent,   postPriorityEvent,   prepareImage,   realSync,   realSync,   removeModalityListener,   setAAFontSettingsCondition,   setDataTransfererClassName,   setLWRequestStatus,   setModalExcluded,   setSystemGenerated,   setWindowClosingListener,   syncNativeQueue,   targetCreatedPeer,   targetDisposedPeer,   targetToAppContext,   targetToPeer,   ungrab,   useBufferPerWindow,   waitForIdle,   wakeupEventQueue,   windowClosingDelivered,   windowClosingNotify
Methods from java.awt.Toolkit:
access$000,   access$002,   access$102,   addAWTEventListener,   addPropertyChangeListener,   beep,   checkImage,   countAWTEventListeners,   createButton,   createCanvas,   createCheckbox,   createCheckboxMenuItem,   createChoice,   createComponent,   createCustomCursor,   createDesktopPeer,   createDialog,   createDragGestureRecognizer,   createDragSourceContextPeer,   createFileDialog,   createFrame,   createImage,   createImage,   createImage,   createImage,   createImage,   createLabel,   createList,   createMenu,   createMenuBar,   createMenuItem,   createPanel,   createPopupMenu,   createScrollPane,   createScrollbar,   createTextArea,   createTextField,   createWindow,   enabledOnToolkit,   getAWTEventListeners,   getAWTEventListeners,   getBestCursorSize,   getColorModel,   getDefaultToolkit,   getDesktopProperty,   getEventQueue,   getFontList,   getFontMetrics,   getFontPeer,   getImage,   getImage,   getLockingKeyState,   getMaximumCursorColors,   getMenuShortcutKeyMask,   getMouseInfoPeer,   getNativeContainer,   getPrintJob,   getPrintJob,   getProperty,   getPropertyChangeListeners,   getPropertyChangeListeners,   getScreenInsets,   getScreenResolution,   getScreenSize,   getSystemClipboard,   getSystemEventQueue,   getSystemEventQueueImpl,   getSystemSelection,   initializeDesktopProperties,   isAlwaysOnTopSupported,   isDynamicLayoutActive,   isDynamicLayoutSet,   isFrameStateSupported,   isModalExclusionTypeSupported,   isModalityTypeSupported,   lazilyLoadDesktopProperty,   loadLibraries,   loadSystemColors,   mapInputMethodHighlight,   notifyAWTEventListeners,   prepareImage,   removeAWTEventListener,   removePropertyChangeListener,   setDesktopProperty,   setDynamicLayout,   setLockingKeyState,   sync
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.awt.windows.WToolkit Detail:
 public synchronized  void addPropertyChangeListener(String name,
    PropertyChangeListener pcl) 
 public boolean areExtraMouseButtonsEnabled() throws HeadlessException 
 public native  void beep()
 public ButtonPeer createButton(Button target) 
 public CanvasPeer createCanvas(Canvas target) 
 public CheckboxPeer createCheckbox(Checkbox target) 
 public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target) 
 public ChoicePeer createChoice(Choice target) 
 public Cursor createCustomCursor(Image cursor,
    Point hotSpot,
    String name) throws IndexOutOfBoundsException 
    Returns a new custom cursor.
 public DesktopPeer createDesktopPeer(Desktop target) 
 public DialogPeer createDialog(Dialog target) 
 public T createDragGestureRecognizer(Class<T> abstractRecognizerClass,
    DragSource ds,
    Component c,
    int srcActions,
    DragGestureListener dgl) 
 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException 
    create the peer for a DragSourceContext
 public WEmbeddedFramePeer createEmbeddedFrame(WEmbeddedFrame target) 
 public FileDialogPeer createFileDialog(FileDialog target) 
 public FramePeer createFrame(Frame target) 
 public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager manager) throws HeadlessException 
 public LabelPeer createLabel(Label target) 
 public ListPeer createList(List target) 
 public MenuPeer createMenu(Menu target) 
 public MenuBarPeer createMenuBar(MenuBar target) 
 public MenuItemPeer createMenuItem(MenuItem target) 
 public PanelPeer createPanel(Panel target) 
 public PopupMenuPeer createPopupMenu(PopupMenu target) 
 public RobotPeer createRobot(Robot target,
    GraphicsDevice screen) 
 public ScrollPanePeer createScrollPane(ScrollPane target) 
 public ScrollbarPeer createScrollbar(Scrollbar target) 
 public SystemTrayPeer createSystemTray(SystemTray target) 
 public TextAreaPeer createTextArea(TextArea target) 
 public TextFieldPeer createTextField(TextField target) 
 public TrayIconPeer createTrayIcon(TrayIcon target) 
 WPageDialogPeer createWPageDialog(WPageDialog target) 
 WPrintDialogPeer createWPrintDialog(WPrintDialog target) 
 public WindowPeer createWindow(Window target) 
 public  void disableBackgroundErase(Canvas canvas) 
 public static  void displayChanged() 
 public static native boolean embeddedDispose()
    Disposes the Toolkit in an embedded environment. This method should not be called on exit unless the Toolkit was constructed with embeddedInit.
 public native  void embeddedEventLoopIdleProcessing()
    To be called after processing the event queue by users of the above embeddedInit() function. The reason for this additional call is that there are some operations performed during idle time in the AwtToolkit event loop which should also be performed during idle time in any other native event loop. Failure to do so could result in deadlocks. This method was added at the last minute of the jdk1.4 release to work around a specific customer problem. As with the above embedded*() class, this method is non-public and should not be used by external applications. See bug #4526587 for more information.
 public static native boolean embeddedInit()
    Initializes the Toolkit for use in an embedded environment.
 public boolean enableInputMethodsForTextComponent() 
    Returns whether enableInputMethods should be set to true for peered TextComponent instances on this platform.
 public Dimension getBestCursorSize(int preferredWidth,
    int preferredHeight) 
    Returns the supported cursor size (Win32 only has one).
 public ColorModel getColorModel() 
 public Locale getDefaultKeyboardLocale() 
    Returns the default keyboard locale of the underlying operating system
 protected synchronized RenderingHints getDesktopAAHints() 
 public FontMetrics getFontMetrics(Font font) 
 public FontPeer getFontPeer(String name,
    int style) 
 public InputMethodDescriptor getInputMethodAdapterDescriptor() 
    Returns a new input method adapter descriptor for native input methods.
 public boolean getLockingKeyState(int key) 
 public native boolean getLockingKeyStateNative(int key)
 public native int getMaximumCursorColors()
 public int getNumberOfButtons() 
 public PrintJob getPrintJob(Frame frame,
    String doctitle,
    Properties props) 
 public PrintJob getPrintJob(Frame frame,
    String doctitle,
    JobAttributes jobAttributes,
    PageAttributes pageAttributes) 
 protected native int getScreenHeight()
 public Insets getScreenInsets(GraphicsConfiguration gc) 
 protected native Insets getScreenInsets(int screen)
 public int getScreenResolution() 
 protected native int getScreenWidth()
 static ColorModel getStaticColorModel() 
 public Clipboard getSystemClipboard() 
 public static WToolkit getWToolkit() 
 public  void grab(Window w) 
 protected synchronized  void initializeDesktopProperties() 
 public boolean isDesktopSupported() 
 public boolean isDynamicLayoutActive() 
 protected boolean isDynamicLayoutSet() 
 protected native boolean isDynamicLayoutSupportedNative()
 public boolean isFrameStateSupported(int state) 
    Returns true if this frame state is supported.
 public boolean isModalExclusionTypeSupported(ModalExclusionType exclusionType) 
 public boolean isModalityTypeSupported(ModalityType modalityType) 
 public boolean isTranslucencyCapable(GraphicsConfiguration gc) 
 public boolean isTraySupported() 
 public boolean isWindowOpacitySupported() 
 public boolean isWindowShapingSupported() 
 public boolean isWindowTranslucencySupported() 
 protected Object lazilyLoadDesktopProperty(String name) 
 public static  void loadLibraries() 
 protected native  void loadSystemColors(int[] systemColors)
 static native ColorModel makeColorModel()
 public Map mapInputMethodHighlight(InputMethodHighlight highlight) 
    Returns a style map for the input method highlight.
 public boolean needUpdateWindow() 
 static  void paletteChanged() 
 public static native  void quitSecondaryEventLoop()
 public static  void resetGC() 
 public  void run() 
 public  void setDynamicLayout(boolean b) 
 protected native  void setDynamicLayoutNative(boolean b)
 public static native  void setExtraMouseButtonsEnabledNative(boolean enable)
 public  void setLockingKeyState(int key,
    boolean on) 
 public native  void setLockingKeyStateNative(int key,
    boolean on)
 public static native  void startSecondaryEventLoop()
 public  void sync() 
 public native boolean syncNativeQueue(long timeout)
 public static final  void targetDisposedPeer(Object target,
    Object peer) 
 public static final Object targetToPeer(Object target) 
 public  void ungrab(Window w) 
 public boolean useBufferPerWindow() 
    There are two reasons why we don't use buffer per window when Vista's DWM (aka Aero) is enabled: - since with DWM all windows are already double-buffered, the application doesn't get expose events so we don't get to use our true back-buffer, wasting memory and performance (this is valid for both d3d and gdi pipelines) - in some cases with buffer per window enabled it is possible for the paint manager to redirect rendering to the screen for some operations (like copyArea), and since bpw uses its own BufferStrategy the d3d onscreen rendering support is disabled and rendering goes through GDI. This doesn't work well with Vista's DWM since one can not perform GDI and D3D operations on the same surface (see 6630702 for more info) Note: even though DWM composition state can change during the lifetime of the application it is a rare event, and it is more often that it is temporarily disabled (because of some app) than it is getting permanently enabled so we can live with this approach without the complexity of dwm state listeners and such. This can be revisited if proved otherwise.