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

pack-priv abstract Class XDragSourceProtocol

extends Object
Class Inheritance
Known Direct Subclasses
sun.awt.X11.MotifDnDDragSourceProtocol, sun.awt.X11.XDnDDragSourceProtocol
Imports
java.awt.datatransfer.Transferable, .DataFlavor, java.awt.dnd.DnDConstants, .InvalidDnDOperationException, java.util.Map

An abstract class for drag protocols on X11 systems. Contains protocol-independent drag source code.
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private boolean
private final XDragSourceProtocolListener
private int
private long
private long
private long

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final boolean
attachTargetWindow(long window, long time)

public void
cleanup()

Terminates the current drag operation (if any) and resets the internal state of this object.

public void
cleanupTargetInfo()

Clears the information on the current drop target.

protected final void
pack-priv static long
protected final XDragSourceProtocolListener
public abstract String
getProtocolName()

Returns the protocol name.

protected final int
protected final long
protected final long
public abstract XDragSourceProtocol.TargetWindowInfo
getTargetWindowInfo(long window)

public final void
initializeDrag(int
a bitwise mask of DnDConstants that represent the supported drop actions.
actions
,
Transferable
the contents for the drag operation.
contents
,
Map<Long, DataFlavor> formatMap, long[]
  • an array of Atoms that represent the supported data formats.
  • an array of Atoms that represent the supported data formats.
formats
)

Initializes a drag operation with the specified supported drop actions, contents and data formats.

protected abstract void
initializeDragImpl(int actions, Transferable contents, Map<Long, DataFlavor> formatMap, long[] formats)

public final void
initiateDrop(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)

public abstract boolean

Returns:

true if the event was successfully processed.
processClientMessage
(XClientMessageEvent xclient)

Processes the specified client message event.

public abstract boolean
processProxyModeEvent(XClientMessageEvent xclient, long sourceWindow)

protected abstract void
sendDropMessage(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)

public abstract void
sendEnterMessage(long[] formats, int sourceAction, int sourceActions, long time)

public abstract void
sendLeaveMessage(long time)

public abstract void
sendMoveMessage(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initializedback to summary
private boolean initialized
listenerback to summary
private final XDragSourceProtocolListener listener
targetProtocolVersionback to summary
private int targetProtocolVersion
targetProxyWindowback to summary
private long targetProxyWindow
targetWindowback to summary
private long targetWindow
targetWindowMaskback to summary
private long targetWindowMask

Constructor Detail

XDragSourceProtocolback to summary
protected XDragSourceProtocol(XDragSourceProtocolListener listener)

Method Detail

attachTargetWindowback to summary
public final boolean attachTargetWindow(long window, long time)
cleanupback to summary
public void cleanup()

Terminates the current drag operation (if any) and resets the internal state of this object.

Exceptions
XException:
if some X call failed.
cleanupTargetInfoback to summary
public void cleanupTargetInfo()

Clears the information on the current drop target.

Exceptions
XException:
if some X call failed.
finalizeDropback to summary
protected final void finalizeDrop()
getDragSourceWindowback to summary
pack-priv static long getDragSourceWindow()
getProtocolListenerback to summary
protected final XDragSourceProtocolListener getProtocolListener()
getProtocolNameback to summary
public abstract String getProtocolName()

Returns the protocol name. The protocol name cannot be null.

getTargetProtocolVersionback to summary
protected final int getTargetProtocolVersion()
getTargetProxyWindowback to summary
protected final long getTargetProxyWindow()
getTargetWindowback to summary
protected final long getTargetWindow()
getTargetWindowInfoback to summary
public abstract XDragSourceProtocol.TargetWindowInfo getTargetWindowInfo(long window)
initializeDragback to summary
public final void initializeDrag(int actions, Transferable contents, Map<Long, DataFlavor> formatMap, long[] formats) throws InvalidDnDOperationException, IllegalArgumentException, XException

Initializes a drag operation with the specified supported drop actions, contents and data formats.

Parameters
actions:int

a bitwise mask of DnDConstants that represent the supported drop actions.

contents:Transferable

the contents for the drag operation.

formats:long[]

  • an array of Atoms that represent the supported data formats.
  • an array of Atoms that represent the supported data formats.
Exceptions
InvalidDnDOperationException:
if a drag operation is already initialized.
IllegalArgumentException:
if some argument has invalid value.
XException:
if some X call failed.
initializeDragImplback to summary
protected abstract void initializeDragImpl(int actions, Transferable contents, Map<Long, DataFlavor> formatMap, long[] formats) throws InvalidDnDOperationException, IllegalArgumentException, XException
initiateDropback to summary
public final void initiateDrop(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)
processClientMessageback to summary
public abstract boolean processClientMessage(XClientMessageEvent xclient) throws XException

Processes the specified client message event.

Returns:boolean

true if the event was successfully processed.

processProxyModeEventback to summary
public abstract boolean processProxyModeEvent(XClientMessageEvent xclient, long sourceWindow)
sendDropMessageback to summary
protected abstract void sendDropMessage(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)
sendEnterMessageback to summary
public abstract void sendEnterMessage(long[] formats, int sourceAction, int sourceActions, long time)
sendLeaveMessageback to summary
public abstract void sendLeaveMessage(long time)
sendMoveMessageback to summary
public abstract void sendMoveMessage(int xRoot, int yRoot, int sourceAction, int sourceActions, long time)
sun.awt.X11 back to summary

public final Class XDragSourceProtocol.TargetWindowInfo

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final long

Constructor Summary

AccessConstructor and Description
public
TargetWindowInfo(long proxy, int version)

Method Summary

Modifier and TypeMethod and Description
public int
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

protocolVersionback to summary
private final int protocolVersion
proxyWindowback to summary
private final long proxyWindow

Constructor Detail

TargetWindowInfoback to summary
public TargetWindowInfo(long proxy, int version)

Method Detail

getProtocolVersionback to summary
public int getProtocolVersion()
getProxyWindowback to summary
public long getProxyWindow()