List of usage examples for java.awt.dnd DragSourceDragEvent getDragSourceContext
public DragSourceContext getDragSourceContext()
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getTrigger()); }
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getSourceActions()); }
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getComponent()); }
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getDragSource()); }
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getTransferable()); }
From source file:Main.java
public void dragEnter(DragSourceDragEvent e) { DragSourceContext ctx = e.getDragSourceContext(); System.out.println(ctx.getCursor()); }
From source file:MainClass.java
public void dragEnter(DragSourceDragEvent e) { System.out.println("Entering drop target #2"); DragSourceContext ctx = e.getDragSourceContext(); int action = e.getDropAction(); if ((action & DnDConstants.ACTION_COPY) != 0) ctx.setCursor(DragSource.DefaultCopyDrop); else// ww w .j a v a 2 s.c o m ctx.setCursor(DragSource.DefaultCopyNoDrop); }
From source file:org.rdv.ui.DataPanelContainer.java
public void dragOver(DragSourceDragEvent e) { Point dragPoint = e.getLocation(); Point containerLocation = getLocationOnScreen(); dragPoint.translate(-containerLocation.x, -containerLocation.y); Component overComponent = getComponentAt(dragPoint); Component dragComponent = e.getDragSourceContext().getComponent(); if (overComponent != null && overComponent != dragComponent) { moveBefore(dragComponent, overComponent); }//from ww w. ja va2s.c o m }