APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.X11

pack-priv Class XWindow

extends XBaseWindow
implements X11ComponentPeer
Class Inheritance
All Implemented Interfaces
sun.awt.X11ComponentPeer
Known Direct Subclasses
sun.awt.X11.XBaseMenuWindow, sun.awt.X11.XChoicePeer.UnfurledChoice, sun.awt.X11.XComponentPeer, sun.awt.X11.XContentWindow, sun.awt.X11.XScrollPanePeer.XScrollPaneContentWindow
Imports
java.awt.AWTEvent, .AWTKeyStroke, .Color, .Component, .Container, .Cursor, .EventQueue, .Font, .FontMetrics, .Graphics, .GraphicsConfiguration, .Point, .Rectangle, .SystemColor, .Toolkit, .Window, java.awt.event.ComponentEvent, .FocusEvent, .InputEvent, .KeyEvent, .MouseEvent, .MouseWheelEvent, .PaintEvent, java.awt.image.ColorModel, java.awt.peer.ComponentPeer, java.lang.ref.WeakReference, sun.awt.AWTAccessor, .AWTAccessor.ComponentAccessor, .PaintEventDispatcher, .PeerEvent, .SunToolkit, .X11ComponentPeer, .X11GraphicsConfig, sun.java2d.SunGraphics2D, .SurfaceData, sun.util.logging.PlatformLogger

Field Summary

Modifier and TypeField and Description
private static final int
pack-priv Color
pack-priv static int
private static Font
private int
private static PlatformLogger
private static final PlatformLogger
private boolean
fullScreenExclusiveModeState

Indicates if the window is currently in the FSEM.

protected X11GraphicsConfig
protected AwtGraphicsConfigData
private static PlatformLogger
private static int
private static int
private static int
private static int
private static PlatformLogger
pack-priv static long
pack-priv static long
pack-priv static WeakReference<XWindow>
pack-priv static int
pack-priv static int
private static PlatformLogger
private boolean
private int
protected PropMwmHints
pack-priv int
pack-priv int
pack-priv XRepaintArea
pack-priv XWindow
private boolean
public static final String
private int
private boolean
pack-priv SurfaceData
pack-priv Component
public static final String
pack-priv XWindowAttributesData
protected static XAtom
protected static XAtom
protected static XAtom
Inherited from sun.awt.X11.XBaseWindow:
BACKGROUND_PIXMAPBACKING_STOREBIT_GRAVITYBORDER_PIXELBOUNDSchildrenCOLORMAPDEF_LOCATIONDELAYEDDEPTHEMBEDDEDembeddedEVENT_MASKheightmappedmaxBoundsMIN_SIZEOVERRIDE_REDIRECTPARENTPARENT_WINDOWparentWindowSAVE_UNDERstate_lockVALUE_MASKVISIBLEvisibleVISUALVISUAL_CLASSwidthwindowxy

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv
XWindow(long parentWindow, Rectangle bounds)

pack-priv
XWindow(Component target, long parentWindow, Rectangle bounds)

pack-priv
XWindow(Component target, long parentWindow)

pack-priv
pack-priv
XWindow(Object target)

pack-priv
XWindow(long parentWindow)

Method Summary

Modifier and TypeMethod and Description
public void
protected boolean
public void
doLayout(int x, int y, int width, int height)

pack-priv final void
private void
protected void
enterNotify(long window)

protected void
pack-priv static native int
public ColorModel
getColorModel(int transparency)

public ColorModel
pack-priv static synchronized Font
public Component
public FontMetrics
pack-priv Graphics
getGraphics(SurfaceData surfData, Color afore, Color aback, Font afont)

public Graphics
public GraphicsConfiguration
public AwtGraphicsConfigData
pack-priv static native int
public Point
pack-priv static int
getModifiers(int state, int button, int keyCode)

private static int
getModifiers(int state, int button, int keyCode, boolean isWheelMouse)

pack-priv static int
public PropMwmHints
pack-priv static long
pack-priv static XWindow
protected int
getScale()

Overrides sun.awt.X11.XBaseWindow.getScale.

Returns scale factor of the window.

public SurfaceData
public Object
public Rectangle
pack-priv static int
getWheelModifiers(int state, int button)

public Color
protected String[]
protected XAtomList
getWMProtocols()

Returns list of protocols which should be installed on this window.

pack-priv int
pack-priv static int
public void
handleButtonPressRelease(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleButtonPressRelease.

Activate automatic grab on first ButtonPress, deactivate on full mouse release

public void
public void
public void
pack-priv final void
public void
private void
public void
public void
public void
public void
public void
private native boolean
protected void
private static native void
protected final void
private boolean
isDeadKey(long keysym)

public boolean
public final boolean
pack-priv boolean
public boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv static boolean
isWheel(int button)

pack-priv int
keyEventType2Id(int xEventType)

pack-priv int
keysymToUnicode(long keysym, int state)

Return unicode character or 0 if no correspondent character found.

public void
protected void
leaveNotify(long window)

pack-priv void
public void
paint(final Graphics g)

pack-priv void
pack-priv void
pack-priv static void
public void
pack-priv void
postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XBaseWindow.postInit.

Called after window creation, descendants should override to initialize Window with class-specific values and perform post-initialization actions.

public void
postKeyEvent(int id, int keyCode, int keyChar, int keyLocation, int state, long event, int eventSize, long rawCode, int unicodeFromPrimaryKeysym, int extendedKeyCode)

public void
postPaintEvent(Component target, int x, int y, int w, int h)

pack-priv void
preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XBaseWindow.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

pack-priv boolean
prePostEvent(AWTEvent e)

Returns true if the event has been handled and should not be posted to Java.

private static int
public final void
repaint(int x, int y, int width, int height)

pack-priv void
public void
public void
reshape(int x, int y, int width, int height)

protected int
protected int
pack-priv static void
public void
pack-priv static void
setBData(KeyEvent e, byte[] data)

public void
protected void
setMouseAbove(boolean above)

public void
pack-priv void
setReparented(boolean newValue)

protected void
stateChanged(long time, int oldState, int newState)

Override this methods to get notifications when top-level window state changes.

pack-priv void
pack-priv void
updateSizeHints(int x, int y, int width, int height)

pack-priv void
updateSizeHints(int x, int y)

pack-priv void
pack-priv void
private native boolean
x11inputMethodLookupString(long event, long[] keysymArray)

private static long
private long
public final void
Inherited from sun.awt.X11.XBaseWindow:
awtLockawtLockNotifyAllawtLockWaitawtUnlockcheckInitialisedcheckParamscontainscontainsGlobaldestroydispatchEventdispatchToWindowgetAbsoluteXgetAbsoluteYgetBoundsgetChildrengetContentWindowgetContentXWindowgetDelayedParamsgetHeightgetHintsgetParentWindowgetScreengetScreenNumbergetScreenOfWindowgetSizegetStateLockgetToplevelXWindowgetWidthgetWindowgetWMHintsgetWMNamegetXgetXAWTRootWindowgetYgrabInputhandleClientMessagehandleCreateNotifyhandleDestroyNotifyhandleReparentNotifyEventhandleVisibilityEventinitinitinitClientLeaderinstantPreInitisDisposedisEventDisabledisFullReleaseisGrabbedEventisMappedisMinSizeSetisVisiblepostInitpreInitsetDisposedsetSizeHintssetWMClasssetWMHintstoFronttoGlobaltoGlobaltoGlobaltoLocaltoLocaltoOtherWindowtoStringungrabInputungrabInputImplupdateWMNamexGetInputFocusxRequestFocusxRequestFocusxSetBoundsxSetBoundsxSetVisible

Field Detail

AWT_MULTICLICK_SMUDGEback to summary
private static final int AWT_MULTICLICK_SMUDGE
backgroundColorback to summary
pack-priv Color backgroundColor
clickCountback to summary
pack-priv static int clickCount
defaultFontback to summary
private static Font defaultFont
drawStateback to summary
private int drawState
eventLogback to summary
private static PlatformLogger eventLog

Hides sun.awt.X11.XBaseWindow.eventLog.

focusLogback to summary
private static final PlatformLogger focusLog

Hides sun.awt.X11.XBaseWindow.focusLog.

fullScreenExclusiveModeStateback to summary
private boolean fullScreenExclusiveModeState

Indicates if the window is currently in the FSEM.

Synchronization

state lock.

graphicsConfigback to summary
protected X11GraphicsConfig graphicsConfig
graphicsConfigDataback to summary
protected AwtGraphicsConfigData graphicsConfigData
insLogback to summary
private static PlatformLogger insLog

Hides sun.awt.X11.XBaseWindow.insLog.

JAWT_LOCK_BOUNDS_CHANGEDback to summary
private static int JAWT_LOCK_BOUNDS_CHANGED
JAWT_LOCK_CLIP_CHANGEDback to summary
private static int JAWT_LOCK_CLIP_CHANGED
JAWT_LOCK_ERRORback to summary
private static int JAWT_LOCK_ERROR
JAWT_LOCK_SURFACE_CHANGEDback to summary
private static int JAWT_LOCK_SURFACE_CHANGED
keyEventLogback to summary
private static PlatformLogger keyEventLog
lastButtonback to summary
pack-priv static long lastButton
lastTimeback to summary
pack-priv static long lastTime
lastWindowRefback to summary
pack-priv static WeakReference<XWindow> lastWindowRef
lastXback to summary
pack-priv static int lastX
lastYback to summary
pack-priv static int lastY
logback to summary
private static PlatformLogger log

Hides sun.awt.X11.XBaseWindow.log.

mouseAboveMeback to summary
private boolean mouseAboveMe
mouseButtonClickAllowedback to summary
private int mouseButtonClickAllowed
mwm_hintsback to summary
protected PropMwmHints mwm_hints
oldHeightback to summary
pack-priv int oldHeight
oldWidthback to summary
pack-priv int oldWidth
paintAreaback to summary
pack-priv XRepaintArea paintArea
parentback to summary
pack-priv XWindow parent
reparentedback to summary
private boolean reparented
REPARENTEDback to summary
public static final String REPARENTED
savedStateback to summary
private int savedState
stateChangedback to summary
private boolean stateChanged
surfaceDataback to summary
pack-priv SurfaceData surfaceData
targetback to summary
pack-priv Component target
TARGETback to summary
public static final String TARGET
winAttrback to summary
pack-priv XWindowAttributesData winAttr
wm_delete_windowback to summary
protected static XAtom wm_delete_window
wm_protocolsback to summary
protected static XAtom wm_protocols
wm_take_focusback to summary
protected static XAtom wm_take_focus

Constructor Detail

XWindowback to summary
pack-priv XWindow(XCreateWindowParams params)
XWindowback to summary
pack-priv XWindow()
XWindowback to summary
pack-priv XWindow(long parentWindow, Rectangle bounds)
XWindowback to summary
pack-priv XWindow(Component target, long parentWindow, Rectangle bounds)
XWindowback to summary
pack-priv XWindow(Component target, long parentWindow)
XWindowback to summary
pack-priv XWindow(Component target)
XWindowback to summary
pack-priv XWindow(Object target)
XWindowback to summary
pack-priv XWindow(long parentWindow)

Method Detail

disposeback to summary
public void dispose()
doEraseBackgroundback to summary
protected boolean doEraseBackground()
doLayoutback to summary
public void doLayout(int x, int y, int width, int height)
doValidateSurfaceback to summary
pack-priv final void doValidateSurface()
dumpKeysymArrayback to summary
private void dumpKeysymArray(XKeyEvent ev)
enterNotifyback to summary
protected void enterNotify(long window)
flushback to summary
protected void flush()

Overrides sun.awt.X11.XBaseWindow.flush.

Annotations
@Override
getAWTKeyCodeForKeySymback to summary
pack-priv static native int getAWTKeyCodeForKeySym(int keysym)
getColorModelback to summary
public ColorModel getColorModel(int transparency)
getColorModelback to summary
public ColorModel getColorModel()

Implements sun.awt.X11ComponentPeer.getColorModel.

Annotations
@Override
getDefaultFontback to summary
pack-priv static synchronized Font getDefaultFont()
getEventSourceback to summary
public Component getEventSource()
getFontMetricsback to summary
public FontMetrics getFontMetrics(Font font)
Annotations
@SuppressWarnings:deprecation
getGraphicsback to summary
pack-priv Graphics getGraphics(SurfaceData surfData, Color afore, Color aback, Font afont)
getGraphicsback to summary
public Graphics getGraphics()

Implements sun.awt.X11ComponentPeer.getGraphics.

Annotations
@Override
getGraphicsConfigurationback to summary
public GraphicsConfiguration getGraphicsConfiguration()

Implements sun.awt.X11ComponentPeer.getGraphicsConfiguration.

Annotations
@Override
getGraphicsConfigurationDataback to summary
public AwtGraphicsConfigData getGraphicsConfigurationData()
getKeySymForAWTKeyCodeback to summary
pack-priv static native int getKeySymForAWTKeyCode(int keycode)
getLocationOnScreenback to summary
public Point getLocationOnScreen()
getModifiersback to summary
pack-priv static int getModifiers(int state, int button, int keyCode)
getModifiersback to summary
private static int getModifiers(int state, int button, int keyCode, boolean isWheelMouse)
getMouseMovementSmudgeback to summary
pack-priv static int getMouseMovementSmudge()
getMWMHintsback to summary
public PropMwmHints getMWMHints()
getParentWindowIDback to summary
pack-priv static long getParentWindowID(Component target)
getParentXWindowObjectback to summary
pack-priv static XWindow getParentXWindowObject(Component target)
getScaleback to summary
protected int getScale()

Overrides sun.awt.X11.XBaseWindow.getScale.

Doc from sun.awt.X11.XBaseWindow.getScale.

Returns scale factor of the window. It is used to convert native coordinates to local and vice verse.

Annotations
@Override
getSurfaceDataback to summary
public SurfaceData getSurfaceData()

Implements sun.awt.X11ComponentPeer.getSurfaceData.

Annotations
@Override
getTargetback to summary
public Object getTarget()

Implements sun.awt.X11ComponentPeer.getTarget.

Annotations
@Override
getTargetBoundsback to summary
public Rectangle getTargetBounds()
getWheelModifiersback to summary
pack-priv static int getWheelModifiers(int state, int button)
getWinBackgroundback to summary
public Color getWinBackground()
getWMClassback to summary
protected String[] getWMClass()
getWMProtocolsback to summary
protected XAtomList getWMProtocols()

Returns list of protocols which should be installed on this window. Descendants can override this method to add class-specific protocols

getWMStateback to summary
pack-priv int getWMState()
getXModifiersback to summary
pack-priv static int getXModifiers(AWTKeyStroke stroke)
Annotations
@SuppressWarnings:deprecation
handleButtonPressReleaseback to summary
public void handleButtonPressRelease(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleButtonPressRelease.

Doc from sun.awt.X11.XBaseWindow.handleButtonPressRelease.

Activate automatic grab on first ButtonPress, deactivate on full mouse release

Annotations
@Override
handleConfigureNotifyEventback to summary
public void handleConfigureNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleConfigureNotifyEvent.

Annotations
@Override
handleExposeEventback to summary
public void handleExposeEvent(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleExposeEvent.

Annotations
@Override
handleKeyPressback to summary
public void handleKeyPress(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleKeyPress.

Annotations
@Override
handleKeyPressback to summary
pack-priv final void handleKeyPress(XKeyEvent ev)
handleKeyReleaseback to summary
public void handleKeyRelease(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleKeyRelease.

Annotations
@Override
handleKeyReleaseback to summary
private void handleKeyRelease(XKeyEvent ev)
handleMapNotifyEventback to summary
public void handleMapNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleMapNotifyEvent.

Annotations
@Override
handleMotionNotifyback to summary
public void handleMotionNotify(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleMotionNotify.

Annotations
@Override
handlePropertyNotifyback to summary
public void handlePropertyNotify(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handlePropertyNotify.

Annotations
@Override
handleUnmapNotifyEventback to summary
public void handleUnmapNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleUnmapNotifyEvent.

Annotations
@Override
handleXCrossingEventback to summary
public void handleXCrossingEvent(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleXCrossingEvent.

Annotations
@Override
haveCurrentX11InputMethodInstanceback to summary
private native boolean haveCurrentX11InputMethodInstance()
initGraphicsConfigurationback to summary
protected void initGraphicsConfiguration()
initIDsback to summary
private static native void initIDs()
initWMProtocolsback to summary
protected final void initWMProtocols()
isDeadKeyback to summary
private boolean isDeadKey(long keysym)
isEmbeddedback to summary
public boolean isEmbedded()
isFullScreenExclusiveModeback to summary
public final boolean isFullScreenExclusiveMode()
isLocationByPlatformback to summary
pack-priv boolean isLocationByPlatform()
isMouseAboveback to summary
public boolean isMouseAbove()
isParentOfback to summary
pack-priv boolean isParentOf(XWindow win)
isReparentedback to summary
pack-priv boolean isReparented()
isResizableback to summary
pack-priv boolean isResizable()
isShowingback to summary
pack-priv boolean isShowing()
isWheelback to summary
pack-priv static boolean isWheel(int button)
keyEventType2Idback to summary
pack-priv int keyEventType2Id(int xEventType)
keysymToUnicodeback to summary
pack-priv int keysymToUnicode(long keysym, int state)

Return unicode character or 0 if no correspondent character found. Parameter is a keysym basically from keysymdef.h XXX: how about vendor keys? Is there some with Unicode value and not in the list?

layoutback to summary
public void layout()
leaveNotifyback to summary
protected void leaveNotify(long window)
logIncomingKeyEventback to summary
pack-priv void logIncomingKeyEvent(XKeyEvent ev)
paintback to summary
public void paint(final Graphics g)
paintPeerback to summary
pack-priv void paintPeer(final Graphics g)
postEventback to summary
pack-priv void postEvent(AWTEvent event)
postEventStaticback to summary
pack-priv static void postEventStatic(AWTEvent event)
postEventToEventQueueback to summary
public void postEventToEventQueue(final AWTEvent event)
postInitback to summary
pack-priv void postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XBaseWindow.postInit.

Doc from sun.awt.X11.XBaseWindow.postInit.

Called after window creation, descendants should override to initialize Window with class-specific values and perform post-initialization actions.

Annotations
@Override
postKeyEventback to summary
public void postKeyEvent(int id, int keyCode, int keyChar, int keyLocation, int state, long event, int eventSize, long rawCode, int unicodeFromPrimaryKeysym, int extendedKeyCode)
postPaintEventback to summary
public void postPaintEvent(Component target, int x, int y, int w, int h)
preInitback to summary
pack-priv void preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XBaseWindow.preInit.

Doc from sun.awt.X11.XBaseWindow.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

Annotations
@Override
prePostEventback to summary
pack-priv boolean prePostEvent(AWTEvent e)

Returns true if the event has been handled and should not be posted to Java.

primaryUnicode2JavaKeycodeback to summary
private static int primaryUnicode2JavaKeycode(int uni)
repaintback to summary
public final void repaint(int x, int y, int width, int height)
repaintback to summary
pack-priv void repaint()
reshapeback to summary
public void reshape(Rectangle bounds)
reshapeback to summary
public void reshape(int x, int y, int width, int height)
scaleDownback to summary
protected int scaleDown(int x)

Overrides sun.awt.X11.XBaseWindow.scaleDown.

Annotations
@Override
scaleUpback to summary
protected int scaleUp(int x)

Overrides sun.awt.X11.XBaseWindow.scaleUp.

Annotations
@Override
sendEventback to summary
pack-priv static void sendEvent(final AWTEvent e)
setBackgroundback to summary
public void setBackground(Color c)
setBDataback to summary
pack-priv static void setBData(KeyEvent e, byte[] data)
setFullScreenExclusiveModeStateback to summary
public void setFullScreenExclusiveModeState(boolean state)

Implements sun.awt.X11ComponentPeer.setFullScreenExclusiveModeState.

Annotations
@Override
setMouseAboveback to summary
protected void setMouseAbove(boolean above)
setMWMHintsback to summary
public void setMWMHints(PropMwmHints hints)
setReparentedback to summary
pack-priv void setReparented(boolean newValue)
stateChangedback to summary
protected void stateChanged(long time, int oldState, int newState)

Override this methods to get notifications when top-level window state changes. The state is meant in terms of ICCCM: WithdrawnState, IconicState, NormalState

updateSizeHintsback to summary
pack-priv void updateSizeHints()
updateSizeHintsback to summary
pack-priv void updateSizeHints(int x, int y, int width, int height)
updateSizeHintsback to summary
pack-priv void updateSizeHints(int x, int y)
validateSurfaceback to summary
pack-priv void validateSurface()
winBackgroundback to summary
pack-priv void winBackground(Color c)
x11inputMethodLookupStringback to summary
private native boolean x11inputMethodLookupString(long event, long[] keysymArray)
xkeycodeToKeysymback to summary
private static long xkeycodeToKeysym(XKeyEvent ev)
xkeycodeToPrimaryKeysymback to summary
private long xkeycodeToPrimaryKeysym(XKeyEvent ev)
xSetBackgroundback to summary
public final void xSetBackground(Color c)