src/share/classes/java/awt/dnd/DragSourceContext.java

Print this page




 258 
 259     /**
 260      * Returns a bitwise mask of <code>DnDConstants</code> that
 261      * represent the set of drop actions supported by the drag source for the
 262      * drag operation associated with this <code>DragSourceContext</code>.
 263      *
 264      * @return the drop actions supported by the drag source
 265      */
 266     public int  getSourceActions() {
 267         return sourceActions;
 268     }
 269 
 270     /**
 271      * Sets the cursor for this drag operation to the specified
 272      * <code>Cursor</code>.  If the specified <code>Cursor</code>
 273      * is <code>null</code>, the default drag cursor behavior is
 274      * activated for this drag operation, otherwise it is deactivated.
 275      *
 276      * @param c     the initial {@code Cursor} for this drag operation,
 277      *                       or {@code null} for the default cursor handling;
 278      *                       see {@linkplain #defaultCursor class
 279      *                       level documentation} for more details
 280      *                       on the cursor handling during drag and drop
 281      *
 282      */
 283 
 284     public synchronized void setCursor(Cursor c) {
 285         useCustomCursor = (c != null);
 286         setCursorImpl(c);
 287     }
 288 
 289     /**
 290      * Returns the current drag <code>Cursor</code>.
 291      * <P>
 292      * @return the current drag <code>Cursor</code>
 293      */
 294 
 295     public Cursor getCursor() { return cursor; }
 296 
 297     /**
 298      * Add a <code>DragSourceListener</code> to this




 258 
 259     /**
 260      * Returns a bitwise mask of <code>DnDConstants</code> that
 261      * represent the set of drop actions supported by the drag source for the
 262      * drag operation associated with this <code>DragSourceContext</code>.
 263      *
 264      * @return the drop actions supported by the drag source
 265      */
 266     public int  getSourceActions() {
 267         return sourceActions;
 268     }
 269 
 270     /**
 271      * Sets the cursor for this drag operation to the specified
 272      * <code>Cursor</code>.  If the specified <code>Cursor</code>
 273      * is <code>null</code>, the default drag cursor behavior is
 274      * activated for this drag operation, otherwise it is deactivated.
 275      *
 276      * @param c     the initial {@code Cursor} for this drag operation,
 277      *                       or {@code null} for the default cursor handling;
 278      *                       see {@linkplain Cursor class
 279      *                       level documentation} for more details
 280      *                       on the cursor handling during drag and drop
 281      *
 282      */
 283 
 284     public synchronized void setCursor(Cursor c) {
 285         useCustomCursor = (c != null);
 286         setCursorImpl(c);
 287     }
 288 
 289     /**
 290      * Returns the current drag <code>Cursor</code>.
 291      * <P>
 292      * @return the current drag <code>Cursor</code>
 293      */
 294 
 295     public Cursor getCursor() { return cursor; }
 296 
 297     /**
 298      * Add a <code>DragSourceListener</code> to this