window.setAlwaysOnTop(true); window.setBackground(new Color(0,true)); DragSource.getDefaultDragSource().addDragSourceMotionListener( new DragSourceMotionListener() { @Override public void dragMouseMoved(DragSourceDragEvent dsde) {
public static void registerDragGesture(Component c, DragGesture dragGesture) { DragSource dragSource = new DragSource(); dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragGesture); dragSource.addDragSourceMotionListener(dragGesture); }
protected void registerDragGesture(Component c) { if (dragGesture == null) initDragGesture(); DragSource dragSource = new DragSource(); dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragGesture); dragSource.addDragSourceMotionListener(dragGesture); }
public void registerDragListeners() { if (dragSource != null) { dragSource.removeDragSourceListener(this); dragSource.removeDragSourceMotionListener(this); } dragSource = DragSource.getDefaultDragSource(); dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); dragSource.addDragSourceMotionListener(this); }
ds.addDragSourceMotionListener(dsml); dragSource.addDragSourceMotionListener(dsml); glassPane = new FinalGlassPane(this) {
DragSource.getDefaultDragSource().addDragSourceMotionListener(new DragSourceMotionListener() { @Override public void dragMouseMoved(DragSourceDragEvent dsde) { Point pt = dsde.getLocation();
@Override public void registerListeners() { super.registerListeners(); // Reactivate tooltip listener ToolTipManager.sharedInstance().registerComponent(this); if (dragSource != null) { dragSource.removeDragSourceListener(this); dragSource.removeDragSourceMotionListener(this); removeFocusListener(this); } addFocusListener(this); this.setFocusable(true); this.addMouseListener(this); dragSource = new DragSource(); dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); dragSource.addDragSourceMotionListener(this); }
/** * Creates a new {@link ChannelLabelsView} instance. */ private ChannelLabelsView( final SignalDiagramController aController ) { super( aController ); this.model = new ChannelLabelsViewModel( aController ); this.dropHandler = new DropHandler(); this.dndListener = new DragAndDropListener(); final DragSource dragSource = DragSource.getDefaultDragSource(); dragSource.addDragSourceMotionListener( this.dndListener ); dragSource.addDragSourceListener( this.dndListener ); this.dragGestureRecognizer = dragSource.createDefaultDragGestureRecognizer( this, DnDConstants.ACTION_MOVE, this.dndListener ); this.mouseHandler = new ChannelLabelMouseHandler( aController ); updateUI(); }
window.setAlwaysOnTop(true); window.setBackground(new Color(0,true)); DragSource.getDefaultDragSource().addDragSourceMotionListener( new DragSourceMotionListener() { @Override public void dragMouseMoved(DragSourceDragEvent dsde) {
e.getDragSource().addDragSourceMotionListener(this); DragHandler.transferable = transferable;
e.getDragSource().addDragSourceMotionListener(this); DragHandler.transferable = transferable;