start page | rating of books | rating of authors | reviews | copyrights

Book Home Java Enterprise in a Nutshell Search this book

Chapter 13. The java.awt.dnd.peer Package

The interfaces of the java.awt.dnd.peer package precisely specify the native drag-and-drop capabilities that are required to implement the java.awt.dnd package. Application-level code never needs to use this package. Figure 13-1 shows the class hierarchy of this package.

figure

Figure 13-1. The java.awt.dnd.peer package

DragSourceContextPeerJava 1.2
java.awt.dnd.peer

This interface defines methods that the java.awt.dnd.DragSourceContext class uses to communicate with the underlying native drag-and-drop subsystem. Application-level code never uses this interface.

public abstract interface DragSourceContextPeer {
// Public Instance Methods
public abstract Cursor getCursor ();
public abstract void setCursor (Cursor c) throws InvalidDnDOperationException;
public abstract void startDrag (DragSourceContext dsc, Cursor c, Image dragImage, Point imageOffset) throws InvalidDnDOperationException;
public abstract void transferablesFlavorsChanged ();
}

Passed To: DragSource.createDragSourceContext(), DragSourceContext.DragSourceContext()

Returned By: Toolkit.createDragSourceContextPeer()

DropTargetContextPeerJava 1.2
java.awt.dnd.peer

This interface defines methods that the java.awt.dnd.DropTargetContext class uses to communicate with the underlying native drag-and-drop subsystem. Application-level code never uses this interface.

public abstract interface DropTargetContextPeer {
// Property Accessor Methods (by property name)
public abstract DropTarget getDropTarget ();
public abstract int getTargetActions ();
public abstract void setTargetActions (int actions);
public abstract java.awt.datatransfer.Transferable getTransferable () throws InvalidDnDOperationException;
public abstract boolean isTransferableJVMLocal ();
public abstract java.awt.datatransfer.DataFlavor[ ] getTransferDataFlavors ();
// Public Instance Methods
public abstract void acceptDrag (int dragAction);
public abstract void acceptDrop (int dropAction);
public abstract void dropComplete (boolean success);
public abstract void rejectDrag ();
public abstract void rejectDrop ();
}

Passed To: DropTargetContext.addNotify()

DropTargetPeerJava 1.2
java.awt.dnd.peer

This interface defines methods that the java.awt.dnd.DropTarget class uses to communicate with the underlying native drag-and-drop subsystem. Application-level code never uses this interface.

public abstract interface DropTargetPeer {
// Public Instance Methods
public abstract void addDropTarget (DropTarget dt);
public abstract void removeDropTarget (DropTarget dt);
}


Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.