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

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

Nested Class Summary:
public interface  XToolkit.XEventListener   
Field Summary
static final  boolean PRIMARY_LOOP     
static final  boolean SECONDARY_LOOP     
 XClipboard clipboard     
 XClipboard selection     
protected static  boolean dynamicLayoutSetting     
static  int arrowCursor     
static  TreeMap winMap     
static  HashMap specialPeerMap     
static  HashMap winToDispatcher     
static  UIDefaults uidefaults     
static  X11GraphicsEnvironment localEnv     
static  X11GraphicsDevice device     
static final  X11GraphicsConfig config     
static  int awt_multiclick_time     
static  boolean securityWarningEnabled     
static  long awt_defaultFg     
static volatile  XErrorEvent saved_error     
static  Thread toolkitThread     
static  Object displayLock     
static final  String DATA_TRANSFERER_CLASS_NAME     
static  ColorModel screenmodel     
static  int altMask     
static  int metaMask     
static  int numLockMask     
static  int modeSwitchMask     
static  int modLockIsShiftLock     
static  long reset_time_utc     
static final  long WRAP_TIME_MILLIS     
static final  int XSUN_KP_BEHAVIOR     
static final  int XORG_KP_BEHAVIOR     
static final  int IS_SUN_KEYBOARD     
static final  int IS_NONSUN_KEYBOARD     
static final  int IS_KANA_KEYBOARD     
static final  int IS_NONKANA_KEYBOARD     
static  int awt_IsXsunKPBehavior     
static  boolean awt_UseXKB     
static  boolean awt_UseXKB_Calls     
static  int awt_XKBBaseEventCode     
static  int awt_XKBEffectiveGroup     
static  long awt_XKBDescPtr     
static  int sunOrNotKeyboard     
static  int kanaOrNotKeyboard     
Fields inherited from sun.awt.UNIXToolkit:
GTK_LOCK,  FONTCONFIGAAHINT
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 XToolkit() 
Method from sun.awt.X11.XToolkit Summary:
RESTORE_XERROR_HANDLER,   SAVED_ERROR_HANDLER,   WITH_XERROR_HANDLER,   XSync,   addEventDispatcher,   addPropertyChangeListener,   addToWinMap,   addXEventListener,   areExtraMouseButtonsEnabled,   awtFUnlock,   awt_output_flush,   awt_toolkit_init,   beep,   canUseXKBCalls,   createButton,   createCanvas,   createCheckbox,   createCheckboxMenuItem,   createChoice,   createCustomCursor,   createDesktopPeer,   createDialog,   createDragGestureRecognizer,   createDragSourceContextPeer,   createEmbedProxy,   createEmbeddedFrame,   createFileDialog,   createFrame,   createKeyboardFocusManagerPeer,   createLabel,   createList,   createMenu,   createMenuBar,   createMenuItem,   createPanel,   createPopupMenu,   createRobot,   createScrollPane,   createScrollbar,   createSystemTray,   createTextArea,   createTextField,   createTrayIcon,   createWindow,   dumpPeers,   freeXKB,   getAWTAppClassName,   getAwtDefaultFg,   getBackingStoreType,   getBestCursorSize,   getColorModel,   getCorrectXIDString,   getCurrentServerTime,   getDefaultRootWindow,   getDefaultScreenData,   getDefaultScreenHeight,   getDefaultScreenWidth,   getDefaultXColormap,   getDisplay,   getEnv,   getEventNumber,   getEventQueue,   getFontPeer,   getInputMethodAdapterDescriptor,   getLastCursorPos,   getLockingKeyState,   getMaximumCursorColors,   getModifierState,   getMouseInfoPeer,   getMultiClickTime,   getNumberOfButtons,   getPrintJob,   getPrintJob,   getScreenHeight,   getScreenInsets,   getScreenResolution,   getScreenWidth,   getStaticColorModel,   getSunAwtDisableGrab,   getSunAwtDisableGtkFileDialogs,   getSystemClipboard,   getSystemSelection,   getTrayIconDisplayTimeout,   getUIDefaults,   getXKBBaseEventCode,   getXKBEffectiveGroup,   getXKBKbdDesc,   grab,   init,   initSecurityWarning,   initUIDefaults,   initializeDesktopProperties,   initializeMultiClickTime,   isAlwaysOnTopSupported,   isDesktopSupported,   isDynamicLayoutActive,   isDynamicLayoutSet,   isDynamicLayoutSupported,   isFrameStateSupported,   isKanaKeyboard,   isLeftMouseButton,   isModalExclusionTypeSupported,   isModalityTypeSupported,   isRightMouseButton,   isSecurityWarningEnabled,   isSunKeyboard,   isToolkitThread,   isTranslucencyCapable,   isTraySupported,   isWindowOpacitySupported,   isWindowShapingSupported,   isWindowTranslucencySupported,   isXKBenabled,   isXsunKPBehavior,   keysymToPrimaryKeycode,   lazilyLoadDesktopProperty,   loadSystemColors,   mapInputMethodHighlight,   nativeLoadSystemColors,   needsXEmbedImpl,   nowMillisUTC_offset,   parseXSettings,   processException,   remove,   removeEventDispatcher,   removeFromWinMap,   removeSourceEvents,   resetKeyboardSniffer,   run,   run,   schedule,   setDynamicLayout,   setupModifierMap,   syncNativeQueue,   targetDisposedPeer,   targetToPeer,   tryXKB,   ungrab,   useBufferPerWindow,   waitForEvents,   wakeup_poll,   windowToXWindow
Methods from sun.awt.UNIXToolkit:
checkGtkVersion,   getDatatransferTimeout,   getDesktopAAHints,   getGTKIcon,   getStockIcon,   isNativeGTKAvailable,   lazilyLoadDesktopProperty,   lazilyLoadGTKIcon,   loadGTK,   loadIconCallback,   sync
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.X11.XToolkit Detail:
 public static  void RESTORE_XERROR_HANDLER() 
 public static int SAVED_ERROR_HANDLER(long display,
    XErrorEvent error) 
 public static  void WITH_XERROR_HANDLER(XErrorHandler handler) 
 static  void XSync() 
 static  void addEventDispatcher(long window,
    XEventDispatcher dispatcher) 
 public synchronized  void addPropertyChangeListener(String name,
    PropertyChangeListener pcl) 
 static  void addToWinMap(long window,
    XBaseWindow xwin) 
 public  void addXEventListener(XEventListener listener) 
 public boolean areExtraMouseButtonsEnabled() throws HeadlessException 
 static final  void awtFUnlock() 
 static native  void awt_output_flush()
 static native  void awt_toolkit_init()
 public  void beep() 
 static boolean canUseXKBCalls() 
 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> recognizerClass,
    DragSource ds,
    Component c,
    int srcActions,
    DragGestureListener dgl) 
 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException 
 XEmbedChildProxyPeer createEmbedProxy(XEmbedChildProxy target) 
 public XEmbeddedFramePeer createEmbeddedFrame(XEmbeddedFrame 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) throws HeadlessException 
 public TextAreaPeer createTextArea(TextArea target) 
 public TextFieldPeer createTextField(TextField target) 
 public TrayIconPeer createTrayIcon(TrayIcon target) throws HeadlessException, AWTException 
 public WindowPeer createWindow(Window target) 
 static  void dumpPeers() 
  void freeXKB() 
 static String getAWTAppClassName() 
 static long getAwtDefaultFg() 
 static int getBackingStoreType() 
    Returns one of XConstants: NotUseful, WhenMapped or Always. If backing store is not available on at least one screen, or java2d uses DGA(which conflicts with backing store) on at least one screen, or the string system property "sun.awt.backingStore" is neither "Always" nor "WhenMapped", then the method returns XConstants.NotUseful. Otherwise, if the system property "sun.awt.backingStore" is "WhenMapped", then the method returns XConstants.WhenMapped. Otherwise (i.e., if the system property "sun.awt.backingStore" is "Always"), the method returns XConstants.Always.
 public Dimension getBestCursorSize(int preferredWidth,
    int preferredHeight) 
    Returns the supported cursor size
 public ColorModel getColorModel() 
 static String getCorrectXIDString(String val) 
 static long getCurrentServerTime() 
 public static long getDefaultRootWindow() 
 static native long getDefaultScreenData()
 static int getDefaultScreenHeight() 
 static int getDefaultScreenWidth() 
 static native long getDefaultXColormap()
 public static long getDisplay() 
 static native String getEnv(String key)
 public static long getEventNumber() 
 static EventQueue getEventQueue(Object target) 
 public FontPeer getFontPeer(String name,
    int style) 
 public InputMethodDescriptor getInputMethodAdapterDescriptor() throws AWTException 
    Returns a new input method adapter descriptor for native input methods.
 boolean getLastCursorPos(Point p) 
    Returns whether there is last remembered cursor position. The position is remembered from X mouse events on our peers. The position is stored in p.
 public boolean getLockingKeyState(int key) 
 public int getMaximumCursorColors() 
 static boolean getModifierState(int jkc) 
 public synchronized MouseInfoPeer getMouseInfoPeer() 
 static int getMultiClickTime() 
 public int getNumberOfButtons() 
 public PrintJob getPrintJob(Frame frame,
    String doctitle,
    Properties props) 
 public PrintJob getPrintJob(Frame frame,
    String doctitle,
    JobAttributes jobAttributes,
    PageAttributes pageAttributes) 
 protected int getScreenHeight() 
 public Insets getScreenInsets(GraphicsConfiguration gc) 
 public int getScreenResolution() 
 protected int getScreenWidth() 
 static ColorModel getStaticColorModel() 
 public static boolean getSunAwtDisableGrab() 
    Returns the value of "sun.awt.disablegrab" property. Default value is {@code false}.
 public static synchronized boolean getSunAwtDisableGtkFileDialogs() 
    Returns the value of "sun.awt.disableGtkFileDialogs" property. Default value is {@code false}.
 public Clipboard getSystemClipboard() 
 public Clipboard getSystemSelection() 
 static native long getTrayIconDisplayTimeout()
 static UIDefaults getUIDefaults() 
 static int getXKBBaseEventCode() 
 static int getXKBEffectiveGroup() 
 static long getXKBKbdDesc() 
 public  void grab(Window w) 
  void init() 
 static  void initSecurityWarning() 
 static  void initUIDefaults() 
 protected  void initializeDesktopProperties() 
 static  void initializeMultiClickTime() 
 public boolean isAlwaysOnTopSupported() 
 public boolean isDesktopSupported() 
    Returns if the java.awt.Desktop class is supported on the current desktop.

    The methods of java.awt.Desktop class are supported on the Gnome desktop. Check if the running desktop is Gnome by checking the window manager.

 public boolean isDynamicLayoutActive() 
 protected boolean isDynamicLayoutSet() 
 protected boolean isDynamicLayoutSupported() 
 public boolean isFrameStateSupported(int state) throws HeadlessException 
 static boolean isKanaKeyboard() 
 static boolean isLeftMouseButton(MouseEvent me) 
 public boolean isModalExclusionTypeSupported(ModalExclusionType exclusionType) 
 public boolean isModalityTypeSupported(ModalityType modalityType) 
 static boolean isRightMouseButton(MouseEvent me) 
 static boolean isSecurityWarningEnabled() 
 static boolean isSunKeyboard() 
 static boolean isToolkitThread() 
 public boolean isTranslucencyCapable(GraphicsConfiguration gc) 
 public boolean isTraySupported() 
 public boolean isWindowOpacitySupported() 
 public boolean isWindowShapingSupported() 
 public boolean isWindowTranslucencySupported() 
 static boolean isXKBenabled() 
 static boolean isXsunKPBehavior() 
    Check for Xsun convention regarding numpad keys. Xsun and some other servers (i.e. derived from Xsun) under certain conditions process numpad keys unlike Xorg.
 static int keysymToPrimaryKeycode(long sym) 
 protected Object lazilyLoadDesktopProperty(String name) 
 public  void loadSystemColors(int[] systemColors) 
 public Map mapInputMethodHighlight(InputMethodHighlight highlight) 
 public native  void nativeLoadSystemColors(int[] systemColors)
 protected boolean needsXEmbedImpl() 
 static long nowMillisUTC_offset(long server_offset) 
  void parseXSettings(int screen_XXX_ignored,
    Map updatedSettings) 
    Callback from the native side indicating some, or all, of the desktop properties have changed and need to be reloaded. data is the byte array directly from the x server and may be in little endian format.

    NB: This could be called from any thread if triggered by loadXSettings. It is called from the System EDT if triggered by an XSETTINGS change.

 static  void processException(Throwable thr) 
 static  void remove(Runnable task) 
    Removed the task from the list of waiting-to-be called tasks. If the task has been scheduled several times removes only first one.
 static  void removeEventDispatcher(long window,
    XEventDispatcher dispatcher) 
 static  void removeFromWinMap(long window,
    XBaseWindow xwin) 
 static  void removeSourceEvents(EventQueue queue,
    Object source,
    boolean removeAllEvents) 
 static  void resetKeyboardSniffer() 
 public  void run() 
 public  void run(boolean loop) 
 static  void schedule(Runnable task,
    long interval) 
    Registers a Runnable which run() method will be called once on the toolkit thread when a specified interval of time elapses.
 public  void setDynamicLayout(boolean b) 
 static  void setupModifierMap() 
 protected boolean syncNativeQueue(long timeout) 
 protected static final  void targetDisposedPeer(Object target,
    Object peer) 
 protected static final Object targetToPeer(Object target) 
 static boolean tryXKB() 
    Query XKEYBOARD extension. If possible, initialize xkb library.
 public  void ungrab(Window w) 
 public boolean useBufferPerWindow() 
 static native  void waitForEvents(long nextTaskTime)
 static native  void wakeup_poll()
 static XBaseWindow windowToXWindow(long window)