The SunDropTargetContextPeer class is the generic class responsible for handling the interaction between a windowing systems DnD system and Java.
| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| protected static final Object | |
| private int | |
| private int | |
| private DropTarget | |
| private DropTargetContext | |
| protected static Transferable | |
| private int | |
| private long[] | |
| public static final boolean | |
| private static final PlatformLogger | |
| private boolean | |
| protected boolean | |
| pack-priv boolean | |
| protected int | |
| private Transferable | |
| private long | |
| private int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | acceptDrag(int dragOperation)
Implements java. acceptDrag |
| public synchronized void | acceptDrop(int dropOperation)
Implements java. acceptDrop |
| protected abstract void | |
| public synchronized void | dropComplete(boolean success)
Implements java. signal drop complete |
| protected void | |
| protected void | |
| public DropTarget | Returns: the DropTarget associated with this peerImplements java. get the DropTarget associated with this peer |
| private static Transferable | |
| protected abstract Object | |
| protected synchronized long | |
| public int | Returns: the current target actionsImplements java. get the current Target actions |
| public Transferable | getTransferable()
Implements java. get the Transferable associated with the drop |
| public Object | Returns: the dataImplements java. Returns an object which represents the data to be transferred. |
| public DataFlavor[] | Returns: current DataFlavors availableImplements java. get the (remote) DataFlavors from the peer |
| private void | handleDropMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt)
upcall to handle the Drop message |
| private int | handleEnterMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt)
|
| private void | |
| private int | handleMotionMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt)
|
| public boolean | Returns: true if the flavor is supported, otherwise falseImplements java. Returns whether or not the specified data flavor is supported for this object. |
| public boolean | Returns: true if the transfer is a local one, otherwise
falseImplements java. Return whether or not the DragSource Transferable is in the same JVM as the Target. |
| private int | |
| protected int | postDropTargetEvent(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt, final int eventID, final boolean dispatchType)
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public synchronized void | |
| public synchronized void | |
| public static void | |
| public synchronized void | setTargetActions(int
set the current actions actions)Implements java. update the peer's notion of the Target's actions |
| _globalLock | back to summary |
|---|---|
| protected static final Object _globalLock | |
| currentA | back to summary |
|---|---|
| private int currentA | |
| currentDA | back to summary |
|---|---|
| private int currentDA | |
| currentDT | back to summary |
|---|---|
| private DropTarget currentDT | |
| currentDTC | back to summary |
|---|---|
| private DropTargetContext currentDTC | |
| currentJVMLocalSourceTransferable | back to summary |
|---|---|
| protected static Transferable currentJVMLocalSourceTransferable | |
| currentSA | back to summary |
|---|---|
| private int currentSA | |
| currentT | back to summary |
|---|---|
| private long[] currentT | |
| DISPATCH_SYNC | back to summary |
|---|---|
| public static final boolean DISPATCH_SYNC | |
| dndLog | back to summary |
|---|---|
| private static final PlatformLogger dndLog | |
| dragRejected | back to summary |
|---|---|
| private boolean dragRejected | |
| dropComplete | back to summary |
|---|---|
| protected boolean dropComplete | |
| dropInProcess | back to summary |
|---|---|
| pack-priv boolean dropInProcess | |
| dropStatus | back to summary |
|---|---|
| protected int dropStatus | |
| local | back to summary |
|---|---|
| private Transferable local | |
| nativeDragContext | back to summary |
|---|---|
| private long nativeDragContext | |
| previousDA | back to summary |
|---|---|
| private int previousDA | |
| STATUS_ACCEPT | back to summary |
|---|---|
| protected static final int STATUS_ACCEPT | |
| STATUS_NONE | back to summary |
|---|---|
| protected static final int STATUS_NONE | |
| STATUS_REJECT | back to summary |
|---|---|
| protected static final int STATUS_REJECT | |
| STATUS_WAIT | back to summary |
|---|---|
| protected static final int STATUS_WAIT | |
| SunDropTargetContextPeer | back to summary |
|---|---|
| public SunDropTargetContextPeer() create the peer | |
| acceptDrag | back to summary |
|---|---|
| public synchronized void acceptDrag(int dragOperation) Implements java. acceptDrag | |
| acceptDrop | back to summary |
|---|---|
| public synchronized void acceptDrop(int dropOperation) Implements java. acceptDrop | |
| doDropDone | back to summary |
|---|---|
| protected abstract void doDropDone(boolean success, int dropAction, boolean isLocal) | |
| dropComplete | back to summary |
|---|---|
| public synchronized void dropComplete(boolean success) Implements java. signal drop complete | |
| eventPosted | back to summary |
|---|---|
| protected void eventPosted(SunDropTargetEvent e) | |
| eventProcessed | back to summary |
|---|---|
| protected void eventProcessed(SunDropTargetEvent e, int returnValue, boolean dispatcherDone) | |
| getDropTarget | back to summary |
|---|---|
| public DropTarget getDropTarget() Implements java. Doc from java. get the DropTarget associated with this peer
| |
| getJVMLocalSourceTransferable | back to summary |
|---|---|
| private static Transferable getJVMLocalSourceTransferable() obtain the transferable iff the operation is in the same VM | |
| getNativeData | back to summary |
|---|---|
| protected abstract Object getNativeData(long format) throws IOException | |
| getNativeDragContext | back to summary |
|---|---|
| protected synchronized long getNativeDragContext() | |
| getTargetActions | back to summary |
|---|---|
| public int getTargetActions() Implements java. Doc from java. get the current Target actions
| |
| getTransferable | back to summary |
|---|---|
| public Transferable getTransferable() Implements java. get the Transferable associated with the drop | |
| getTransferData | back to summary |
|---|---|
| public Object getTransferData(DataFlavor df) throws UnsupportedFlavorException, IOException, InvalidDnDOperationException Implements java. Doc from java. Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.
| |
| getTransferDataFlavors | back to summary |
|---|---|
| public DataFlavor[] getTransferDataFlavors() Implements java. Doc from java. get the (remote) DataFlavors from the peer
| |
| handleDropMessage | back to summary |
|---|---|
| private void handleDropMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt) upcall to handle the Drop message | |
| handleEnterMessage | back to summary |
|---|---|
| private int handleEnterMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt) | |
| handleExitMessage | back to summary |
|---|---|
| private void handleExitMessage(final Component component, final long nativeCtxt) upcall to handle exit messages | |
| handleMotionMessage | back to summary |
|---|---|
| private int handleMotionMessage(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt) | |
| isDataFlavorSupported | back to summary |
|---|---|
| public boolean isDataFlavorSupported(DataFlavor df) Implements java. Doc from java. Returns whether or not the specified data flavor is supported for this object.
| |
| isTransferableJVMLocal | back to summary |
|---|---|
| public boolean isTransferableJVMLocal() Implements java. Doc from java. Return whether or not the DragSource Transferable is in the same JVM as the Target.
| |
| mapOperation | back to summary |
|---|---|
| private int mapOperation(int operation) mapOperation | |
| postDropTargetEvent | back to summary |
|---|---|
| protected int postDropTargetEvent(final Component component, final int x, final int y, final int dropAction, final int actions, final long[] formats, final long nativeCtxt, final int eventID, final boolean dispatchType) | |
| processDropMessage | back to summary |
|---|---|
| protected void processDropMessage(SunDropTargetEvent event) | |
| processEnterMessage | back to summary |
|---|---|
| protected void processEnterMessage(SunDropTargetEvent event) actual processing on EventQueue Thread | |
| processExitMessage | back to summary |
|---|---|
| protected void processExitMessage(SunDropTargetEvent event) | |
| processMotionMessage | back to summary |
|---|---|
| protected void processMotionMessage(SunDropTargetEvent event, boolean operationChanged) | |
| rejectDrag | back to summary |
|---|---|
| public synchronized void rejectDrag() Implements java. rejectDrag | |
| rejectDrop | back to summary |
|---|---|
| public synchronized void rejectDrop() Implements java. reject Drop | |
| setCurrentJVMLocalSourceTransferable | back to summary |
|---|---|
| public static void setCurrentJVMLocalSourceTransferable(Transferable t) throws InvalidDnDOperationException | |
| setTargetActions | back to summary |
|---|---|
| public synchronized void setTargetActions(int actions) Implements java. Doc from java. update the peer's notion of the Target's actions
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private boolean | |
| private final boolean | |
| private final int | |
| private final HashSet | |
| private final long[] | |
| pack-priv static final ToolkitThreadBlockedHandler | |
| private long | |
| private final SunDropTargetContextPeer | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | EventDispatcher(SunDropTargetContextPeer peer, int dropAction, int actions, long[] formats, long nativeCtxt, boolean dispatchType)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| pack-priv void | |
| private void | |
| private void | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| pack-priv void |
| actions | back to summary |
|---|---|
| private final int actions | |
| dispatcherDone | back to summary |
|---|---|
| private boolean dispatcherDone | |
| dispatchType | back to summary |
|---|---|
| private final boolean dispatchType | |
| dropAction | back to summary |
|---|---|
| private final int dropAction | |
| eventSet | back to summary |
|---|---|
| private final HashSet<SunDropTargetEvent> eventSet | |
| formats | back to summary |
|---|---|
| private final long[] formats | |
| handler | back to summary |
|---|---|
| pack-priv static final ToolkitThreadBlockedHandler handler | |
| nativeCtxt | back to summary |
|---|---|
| private long nativeCtxt | |
| peer | back to summary |
|---|---|
| private final SunDropTargetContextPeer peer | |
| returnValue | back to summary |
|---|---|
| private int returnValue | |
| EventDispatcher | back to summary |
|---|---|
| pack-priv EventDispatcher(SunDropTargetContextPeer peer, int dropAction, int actions, long[] formats, long nativeCtxt, boolean dispatchType) | |
| dispatchDropEvent | back to summary |
|---|---|
| private void dispatchDropEvent(SunDropTargetEvent e) | |
| dispatchEnterEvent | back to summary |
|---|---|
| private void dispatchEnterEvent(SunDropTargetEvent e) | |
| dispatchEvent | back to summary |
|---|---|
| pack-priv void dispatchEvent(SunDropTargetEvent e) | |
| dispatchExitEvent | back to summary |
|---|---|
| private void dispatchExitEvent(SunDropTargetEvent e) | |
| dispatchMotionEvent | back to summary |
|---|---|
| private void dispatchMotionEvent(SunDropTargetEvent e) | |
| getReturnValue | back to summary |
|---|---|
| pack-priv int getReturnValue() | |
| isDone | back to summary |
|---|---|
| pack-priv boolean isDone() | |
| registerEvent | back to summary |
|---|---|
| pack-priv void registerEvent(SunDropTargetEvent e) | |
| setReturnValue | back to summary |
|---|---|
| pack-priv void setReturnValue(int ret) | |
| unregisterAllEvents | back to summary |
|---|---|
| public void unregisterAllEvents() | |
| unregisterEvent | back to summary |
|---|---|
| pack-priv void unregisterEvent(SunDropTargetEvent e) | |