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

public final Class XEmbedCanvasPeer

extends XCanvasPeer
implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider
Class Inheritance
All Implemented Interfaces
sun.awt.WindowIDProvider, sun.awt.ModalityListener, java.awt.KeyEventPostProcessor, java.awt.event.WindowFocusListener, java.util.EventListener
Imports
java.awt.*, java.awt.dnd.DropTarget, .DropTargetListener, java.awt.event.*, sun.awt.*, .AWTAccessor, sun.util.logging.PlatformLogger, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
private static class
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv Object
pack-priv Map<AWTKeyStroke, Long>
pack-priv Map<Long, AWTKeyStroke>
pack-priv boolean
pack-priv Object
pack-priv Set<XEmbedCanvasPeer.GrabbedKey>
pack-priv XEmbedCanvasPeer.XEmbedServer
private static final PlatformLogger

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
public void
public void
dispose()

Overrides sun.awt.X11.XWindow.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer.

pack-priv void
embedChild(long child)

pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv static byte[]
pack-priv Rectangle
public Dimension
getMinimumSize()

Overrides sun.awt.X11.XComponentPeer.getMinimumSize.

Implements java.awt.peer.ComponentPeer.getMinimumSize.

Determines the minimum size of the component.

public Dimension
getPreferredSize()

Overrides sun.awt.X11.XComponentPeer.getPreferredSize.

Implements java.awt.peer.ComponentPeer.getPreferredSize.

Determines the preferred size of the component.

pack-priv Window
pack-priv void
grabKey(final long keysym, final long modifiers)

Grab/ungrab key functionality is an unofficial API supported by GTK.

public void
public void
handleEvent(AWTEvent e)

Overrides sun.awt.X11.XComponentPeer.handleEvent.

Implements java.awt.peer.ComponentPeer.handleEvent.

Called to let the component peer handle events.

pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv boolean
public boolean
isFocusable()

Overrides sun.awt.X11.XComponentPeer.isFocusable.

Implements java.awt.peer.ComponentPeer.isFocusable.

Returns true when the component takes part in the focus traversal, false otherwise.

pack-priv boolean
public void
modalityPopped(ModalityEvent ev)

Implements sun.awt.ModalityListener.modalityPopped.

Called by AWT when it exits a level of modality

public void
modalityPushed(ModalityEvent ev)

Implements sun.awt.ModalityListener.modalityPushed.

Called by AWT when it enters a new level of modality

pack-priv void
protected void
postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.postInit.

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

public boolean
postProcessKeyEvent(KeyEvent e)

Implements java.awt.KeyEventPostProcessor.postProcessKeyEvent.

This method is called by the current KeyboardFocusManager, requesting that this KeyEventPostProcessor perform any necessary post-processing which should be part of the KeyEvent's final resolution.

protected void
preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XCanvasPeer.preInit.

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

public boolean
processXEmbedDnDEvent(long ctxt, int eventID)

pack-priv void
pack-priv void
pack-priv void
registerAccelerator(final long accel_id, final long keysym, final long modifiers)

public void
pack-priv void
public void
pack-priv void
ungrabKey(final long keysym, final long modifiers)

pack-priv void
unregisterAccelerator(final long accel_id)

public void
windowGainedFocus(WindowEvent e)

Implements java.awt.event.WindowFocusListener.windowGainedFocus.

Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events.

public void
windowLostFocus(WindowEvent e)

Implements java.awt.event.WindowFocusListener.windowLostFocus.

Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents.

Inherited from sun.awt.X11.XCanvasPeer:
disableBackgroundErasedoEraseBackgroundgetAppropriateGraphicsConfigurationshouldFocusOnClick

Field Detail

ACCEL_LOCKback to summary
pack-priv Object ACCEL_LOCK
accel_lookupback to summary
pack-priv Map<AWTKeyStroke, Long> accel_lookup
acceleratorsback to summary
pack-priv Map<Long, AWTKeyStroke> accelerators
applicationActiveback to summary
pack-priv boolean applicationActive
GRAB_LOCKback to summary
pack-priv Object GRAB_LOCK
grabbed_keysback to summary
pack-priv Set<XEmbedCanvasPeer.GrabbedKey> grabbed_keys
xembedback to summary
pack-priv XEmbedCanvasPeer.XEmbedServer xembed
xembedLogback to summary
private static final PlatformLogger xembedLog

Constructor Detail

XEmbedCanvasPeerback to summary
pack-priv XEmbedCanvasPeer()
XEmbedCanvasPeerback to summary
pack-priv XEmbedCanvasPeer(XCreateWindowParams params)
XEmbedCanvasPeerback to summary
pack-priv XEmbedCanvasPeer(Component target)

Method Detail

canvasFocusGainedback to summary
pack-priv void canvasFocusGained(FocusEvent e)
canvasFocusLostback to summary
pack-priv void canvasFocusLost(FocusEvent e)
childDestroyedback to summary
pack-priv void childDestroyed()
childResizedback to summary
pack-priv void childResized()
deinstallAcceleratorListenerback to summary
pack-priv void deinstallAcceleratorListener()
deinstallActivateListenerback to summary
pack-priv void deinstallActivateListener()
deinstallModalityListenerback to summary
pack-priv void deinstallModalityListener()
detachChildback to summary
pack-priv void detachChild()
dispatchEventback to summary
public void dispatchEvent(XEvent ev)

Overrides sun.awt.X11.XBaseWindow.dispatchEvent.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides sun.awt.X11.XWindow.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Doc from java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer. This is called when the component has been disconnected from the component hierarchy and is about to be garbage collected.

Annotations
@Override
embedChildback to summary
pack-priv void embedChild(long child)
endDispatchingback to summary
pack-priv void endDispatching()
focusNextback to summary
pack-priv void focusNext()
focusPrevback to summary
pack-priv void focusPrev()
forwardKeyEventback to summary
pack-priv void forwardKeyEvent(KeyEvent e)
getBDataback to summary
pack-priv static byte[] getBData(KeyEvent e)
getClientBoundsback to summary
pack-priv Rectangle getClientBounds()
getMinimumSizeback to summary
public Dimension getMinimumSize()

Overrides sun.awt.X11.XComponentPeer.getMinimumSize.

Implements java.awt.peer.ComponentPeer.getMinimumSize.

Doc from java.awt.peer.ComponentPeer.getMinimumSize.

Determines the minimum size of the component.

Annotations
@Override
getPreferredSizeback to summary
public Dimension getPreferredSize()

Overrides sun.awt.X11.XComponentPeer.getPreferredSize.

Implements java.awt.peer.ComponentPeer.getPreferredSize.

Doc from java.awt.peer.ComponentPeer.getPreferredSize.

Determines the preferred size of the component.

Annotations
@Override
getTopLevelback to summary
pack-priv Window getTopLevel(Component comp)
grabKeyback to summary
pack-priv void grabKey(final long keysym, final long modifiers)

Grab/ungrab key functionality is an unofficial API supported by GTK. Unfortunately, it doesn't support accelerator API, so, since this is the ONLY shortcut-processing API available, we must support it. See XEmbed.NON_STANDARD_XEMBED_GTK_* messages. The format of these messages is as follows: - request from client: data[1] = NON_STANDARD_XEMBED_GTK_GRAB_KEY or NON_STANDARD_XEMBED_GTK_UNGRAB_KEY data[3] = X keysym data[4] = X modifiers - response from server (in case the grabbed key has been pressed): forwarded XKeyEvent that matches keysym/modifiers pair

handleClientMessageback to summary
public void handleClientMessage(XEvent xev)

Overrides sun.awt.X11.XBaseWindow.handleClientMessage.

Annotations
@Override
handleEventback to summary
public void handleEvent(AWTEvent e)

Overrides sun.awt.X11.XComponentPeer.handleEvent.

Implements java.awt.peer.ComponentPeer.handleEvent.

Doc from java.awt.peer.ComponentPeer.handleEvent.

Called to let the component peer handle events.

Annotations
@Override
initDispatchingback to summary
pack-priv void initDispatching()
installAcceleratorListenerback to summary
pack-priv void installAcceleratorListener()
installActivateListenerback to summary
pack-priv void installActivateListener()
installModalityListenerback to summary
pack-priv void installModalityListener()
isApplicationActiveback to summary
pack-priv boolean isApplicationActive()
isFocusableback to summary
public boolean isFocusable()

Overrides sun.awt.X11.XComponentPeer.isFocusable.

Implements java.awt.peer.ComponentPeer.isFocusable.

Doc from java.awt.peer.ComponentPeer.isFocusable.

Returns true when the component takes part in the focus traversal, false otherwise.

Annotations
@Override
isXEmbedActiveback to summary
pack-priv boolean isXEmbedActive()
modalityPoppedback to summary
public void modalityPopped(ModalityEvent ev)

Implements sun.awt.ModalityListener.modalityPopped.

Doc from sun.awt.ModalityListener.modalityPopped.

Called by AWT when it exits a level of modality

Annotations
@Override
modalityPushedback to summary
public void modalityPushed(ModalityEvent ev)

Implements sun.awt.ModalityListener.modalityPushed.

Doc from sun.awt.ModalityListener.modalityPushed.

Called by AWT when it enters a new level of modality

Annotations
@Override
notifyChildEmbeddedback to summary
pack-priv void notifyChildEmbedded()
postInitback to summary
protected void postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.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
postProcessKeyEventback to summary
public boolean postProcessKeyEvent(KeyEvent e)

Implements java.awt.KeyEventPostProcessor.postProcessKeyEvent.

Doc from java.awt.KeyEventPostProcessor.postProcessKeyEvent.

This method is called by the current KeyboardFocusManager, requesting that this KeyEventPostProcessor perform any necessary post-processing which should be part of the KeyEvent's final resolution. At the time this method is invoked, typically the KeyEvent has already been dispatched to and handled by its target. However, if no Component in the application currently owns the focus, then the KeyEvent has not been dispatched to any Component. Typically, KeyEvent post-processing will be used to implement features which require global KeyEvent post-handling, such as menu shortcuts. Note that if a KeyEventPostProcessor wishes to dispatch the KeyEvent, it must use redispatchEvent to prevent the AWT from recursively requesting that this KeyEventPostProcessor perform post-processing of the event again.

If an implementation of this method returns false, then the KeyEvent is passed to the next KeyEventPostProcessor in the chain, ending with the current KeyboardFocusManager. If an implementation returns true, the KeyEvent is assumed to have been fully handled (although this need not be the case), and the AWT will take no further action with regard to the KeyEvent. If an implementation consumes the KeyEvent but returns false, the consumed event will still be passed to the next KeyEventPostProcessor in the chain. It is important for developers to check whether the KeyEvent has been consumed before performing any post-processing of the KeyEvent. By default, the current KeyboardFocusManager will perform no post- processing in response to a consumed KeyEvent.

Annotations
@Override
preInitback to summary
protected void preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XCanvasPeer.preInit.

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

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

Annotations
@Override
processXEmbedDnDEventback to summary
public boolean processXEmbedDnDEvent(long ctxt, int eventID)
propogateRegisterAcceleratorback to summary
pack-priv void propogateRegisterAccelerator(AWTKeyStroke stroke)
propogateUnRegisterAcceleratorback to summary
pack-priv void propogateUnRegisterAccelerator(AWTKeyStroke stroke)
registerAcceleratorback to summary
pack-priv void registerAccelerator(final long accel_id, final long keysym, final long modifiers)
removeXEmbedDropTargetback to summary
public void removeXEmbedDropTarget()
requestXEmbedFocusback to summary
pack-priv void requestXEmbedFocus()
setXEmbedDropTargetback to summary
public void setXEmbedDropTarget()
ungrabKeyback to summary
pack-priv void ungrabKey(final long keysym, final long modifiers)
unregisterAcceleratorback to summary
pack-priv void unregisterAccelerator(final long accel_id)
windowGainedFocusback to summary
public void windowGainedFocus(WindowEvent e)

Implements java.awt.event.WindowFocusListener.windowGainedFocus.

Doc from java.awt.event.WindowFocusListener.windowGainedFocus.

Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events.

Annotations
@Override
windowLostFocusback to summary
public void windowLostFocus(WindowEvent e)

Implements java.awt.event.WindowFocusListener.windowLostFocus.

Doc from java.awt.event.WindowFocusListener.windowLostFocus.

Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents.

Annotations
@Override
sun.awt.X11 back to summary

pack-priv final Class XEmbedCanvasPeer.GrabbedKey

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long

Constructor Summary

AccessConstructor and Description
pack-priv
GrabbedKey(long keysym, long modifiers)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object o)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

keysymback to summary
pack-priv long keysym
modifiersback to summary
pack-priv long modifiers

Constructor Detail

GrabbedKeyback to summary
pack-priv GrabbedKey(long keysym, long modifiers)
GrabbedKeyback to summary
pack-priv GrabbedKey(KeyEvent ev)

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
initback to summary
private void init(KeyEvent e)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.awt.X11 back to summary

private final Class XEmbedCanvasPeer.XEmbedDropTarget

extends DropTarget
Class Inheritance
Annotations
@SuppressWarnings:serial

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
addDropTargetListener(DropTargetListener dtl)

Overrides java.awt.dnd.DropTarget.addDropTargetListener.

Adds a new DropTargetListener (UNICAST SOURCE).

Inherited from java.awt.dnd.DropTarget:
addNotifyclearAutoscrollcreateDropTargetAutoScrollercreateDropTargetContextdragEnterdragExitdragOverdropdropActionChangedgetComponentgetDefaultActionsgetDropTargetContextgetFlavorMapinitializeAutoscrollingisActiveremoveDropTargetListenerremoveNotifysetActivesetComponentsetDefaultActionssetFlavorMapupdateAutoscroll

Constructor Detail

XEmbedDropTargetback to summary
private XEmbedDropTarget()

Method Detail

addDropTargetListenerback to summary
public void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException

Overrides java.awt.dnd.DropTarget.addDropTargetListener.

Doc from java.awt.dnd.DropTarget.addDropTargetListener.

Adds a new DropTargetListener (UNICAST SOURCE).

Annotations
@Override
Exceptions
TooManyListenersException:
if a DropTargetListener is already added to this DropTarget.
sun.awt.X11 back to summary

pack-priv final Class XEmbedCanvasPeer.XEmbedServer

extends XEmbedHelper
implements XEventDispatcher
Class Inheritance
All Implemented Interfaces
sun.awt.X11.XEventDispatcher

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long
pack-priv long
Inherited from sun.awt.X11.XEmbedHelper:
NON_STANDARD_XEMBED_GTK_GRAB_KEYNON_STANDARD_XEMBED_GTK_UNGRAB_KEYunsafeXEmbedXEMBED_ACTIVATE_ACCELERATORXEMBED_EMBEDDED_NOTIFYXEMBED_FOCUS_CURRENTXEMBED_FOCUS_FIRSTXEMBED_FOCUS_INXEMBED_FOCUS_LASTXEMBED_FOCUS_NEXTXEMBED_FOCUS_OUTXEMBED_FOCUS_PREVXEMBED_GRAB_KEYXEMBED_MAPPEDXEMBED_MODALITY_OFFXEMBED_MODALITY_ONXEMBED_MODIFIER_ALTXEMBED_MODIFIER_CONTROLXEMBED_MODIFIER_HYPERXEMBED_MODIFIER_SHIFTXEMBED_MODIFIER_SUPERXEMBED_REGISTER_ACCELERATORXEMBED_REQUEST_FOCUSXEMBED_UNGRAB_KEYXEMBED_UNREGISTER_ACCELERATORXEMBED_VERSIONXEMBED_WINDOW_ACTIVATEXEMBED_WINDOW_DEACTIVATEXEmbedInfo

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
pack-priv void
public void
pack-priv boolean
Inherited from sun.awt.X11.XEmbedHelper:
focusIdToStringgetKeyStrokeForKeySymgetModifiersmsgidToStringsendMessagesendMessageXEmbedMessageToString

Field Detail

flagsback to summary
pack-priv long flags
handleback to summary
pack-priv long handle
versionback to summary
pack-priv long version

Constructor Detail

XEmbedServerback to summary
pack-priv XEmbedServer()

Method Detail

dispatchEventback to summary
public void dispatchEvent(XEvent xev)

Implements sun.awt.X11.XEventDispatcher.dispatchEvent.

Annotations
@Override
handleConfigureNotifyback to summary
pack-priv void handleConfigureNotify(XEvent xev)
handlePropertyNotifyback to summary
public void handlePropertyNotify(XEvent xev)
processXEmbedInfoback to summary
pack-priv boolean processXEmbedInfo()