455 /**
456 * Returns the <code>Transferable</code> associated with
457 * this <code>DragSourceContext</code>.
458 *
459 * @return the <code>Transferable</code>
460 */
461 public Transferable getTransferable() { return transferable; }
462
463 /**
464 * If the default drag cursor behavior is active, this method
465 * sets the default drag cursor for the specified actions
466 * supported by the drag source, the drop target action,
467 * and status, otherwise this method does nothing.
468 *
469 * @param sourceAct the actions supported by the drag source
470 * @param targetAct the drop target action
471 * @param status one of the fields <code>DEFAULT</code>,
472 * <code>ENTER</code>, <code>OVER</code>,
473 * <code>CHANGED</code>
474 */
475
476 protected synchronized void updateCurrentCursor(int sourceAct, int targetAct, int status) {
477
478 // if the cursor has been previously set then don't do any defaults
479 // processing.
480
481 if (useCustomCursor) {
482 return;
483 }
484
485 // do defaults processing
486
487 Cursor c = null;
488
489 switch (status) {
490 default:
491 targetAct = DnDConstants.ACTION_NONE;
492 case ENTER:
493 case OVER:
494 case CHANGED:
495 int ra = sourceAct & targetAct;
|
455 /**
456 * Returns the <code>Transferable</code> associated with
457 * this <code>DragSourceContext</code>.
458 *
459 * @return the <code>Transferable</code>
460 */
461 public Transferable getTransferable() { return transferable; }
462
463 /**
464 * If the default drag cursor behavior is active, this method
465 * sets the default drag cursor for the specified actions
466 * supported by the drag source, the drop target action,
467 * and status, otherwise this method does nothing.
468 *
469 * @param sourceAct the actions supported by the drag source
470 * @param targetAct the drop target action
471 * @param status one of the fields <code>DEFAULT</code>,
472 * <code>ENTER</code>, <code>OVER</code>,
473 * <code>CHANGED</code>
474 */
475 @SuppressWarnings("fallthrough")
476 protected synchronized void updateCurrentCursor(int sourceAct, int targetAct, int status) {
477
478 // if the cursor has been previously set then don't do any defaults
479 // processing.
480
481 if (useCustomCursor) {
482 return;
483 }
484
485 // do defaults processing
486
487 Cursor c = null;
488
489 switch (status) {
490 default:
491 targetAct = DnDConstants.ACTION_NONE;
492 case ENTER:
493 case OVER:
494 case CHANGED:
495 int ra = sourceAct & targetAct;
|