Java Code Examples for java.awt.dnd.DragSourceAdapter

The following are top voted examples for showing how to use java.awt.dnd.DragSourceAdapter. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: jdk8u-jdk   File: ImageTransferTest.java   View source code 6 votes vote down vote up
ImageDragSource() {
    formats = retrieveFormatsToTest();
    passedArray = new boolean[formats.length];
    final DragSourceListener dsl = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            System.err.println("Drop was successful=" + e.getDropSuccess());
            notifyTransferSuccess(e.getDropSuccess());
            if (++fi < formats.length) {
                leaveFormat(formats[fi]);
            }
        }
    };

    new DragSource().createDefaultDragGestureRecognizer(frame,
            DnDConstants.ACTION_COPY,
            dge -> dge.startDrag(null, new ImageSelection(image), dsl));
    leaveFormat(formats[fi]);
}
 
Example 2
Project: openjdk-jdk10   File: ImageTransferTest.java   View source code 6 votes vote down vote up
ImageDragSource() {
    formats = retrieveFormatsToTest();
    passedArray = new boolean[formats.length];
    final DragSourceListener dsl = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            System.err.println("Drop was successful=" + e.getDropSuccess());
            notifyTransferSuccess(e.getDropSuccess());
            if (++fi < formats.length) {
                leaveFormat(formats[fi]);
            }
        }
    };

    new DragSource().createDefaultDragGestureRecognizer(frame,
            DnDConstants.ACTION_COPY,
            dge -> dge.startDrag(null, new ImageSelection(image), dsl));
    leaveFormat(formats[fi]);
}
 
Example 3
Project: openjdk9   File: ImageTransferTest.java   View source code 6 votes vote down vote up
ImageDragSource() {
    formats = retrieveFormatsToTest();
    passedArray = new boolean[formats.length];
    final DragSourceListener dsl = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            System.err.println("Drop was successful=" + e.getDropSuccess());
            notifyTransferSuccess(e.getDropSuccess());
            if (++fi < formats.length) {
                leaveFormat(formats[fi]);
            }
        }
    };

    new DragSource().createDefaultDragGestureRecognizer(frame,
            DnDConstants.ACTION_COPY,
            dge -> dge.startDrag(null, new ImageSelection(image), dsl));
    leaveFormat(formats[fi]);
}
 
Example 4
Project: jdk8u_jdk   File: ImageTransferTest.java   View source code 6 votes vote down vote up
ImageDragSource() {
    formats = retrieveFormatsToTest();
    passedArray = new boolean[formats.length];
    final DragSourceListener dsl = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            System.err.println("Drop was successful=" + e.getDropSuccess());
            notifyTransferSuccess(e.getDropSuccess());
            if (++fi < formats.length) {
                leaveFormat(formats[fi]);
            }
        }
    };

    new DragSource().createDefaultDragGestureRecognizer(frame,
            DnDConstants.ACTION_COPY,
            dge -> dge.startDrag(null, new ImageSelection(image), dsl));
    leaveFormat(formats[fi]);
}
 
Example 5
Project: lookaside_java-1.8.0-openjdk   File: ImageTransferTest.java   View source code 6 votes vote down vote up
ImageDragSource() {
    formats = retrieveFormatsToTest();
    passedArray = new boolean[formats.length];
    final DragSourceListener dsl = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            System.err.println("Drop was successful=" + e.getDropSuccess());
            notifyTransferSuccess(e.getDropSuccess());
            if (++fi < formats.length) {
                leaveFormat(formats[fi]);
            }
        }
    };

    new DragSource().createDefaultDragGestureRecognizer(frame,
            DnDConstants.ACTION_COPY,
            dge -> dge.startDrag(null, new ImageSelection(image), dsl));
    leaveFormat(formats[fi]);
}
 
Example 6
Project: Tarski   File: mxGraphHandler.java   View source code 5 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler() {
  DragGestureListener dragGestureListener = new DragGestureListener() {
    public void dragGestureRecognized(DragGestureEvent e) {
      if (graphComponent.isDragEnabled() && first != null) {
        final TransferHandler th = graphComponent.getTransferHandler();

        if (th instanceof mxGraphTransferHandler) {
          final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
              .createTransferable(graphComponent);

          if (t != null) {
            e.startDrag(null, mxSwingConstants.EMPTY_IMAGE, new Point(), t,
                new DragSourceAdapter() {

                  /**
                   * 
                   */
                  public void dragDropEnd(DragSourceDropEvent dsde) {
                    ((mxGraphTransferHandler) th).exportDone(graphComponent, t,
                        TransferHandler.NONE);
                    first = null;
                  }
                });
          }
        }
      }
    }
  };

  DragSource dragSource = new DragSource();
  dragSource.createDefaultDragGestureRecognizer(graphComponent.getGraphControl(),
      (isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE : DnDConstants.ACTION_MOVE,
      dragGestureListener);
}
 
Example 7
Project: wabit   File: OlapQueryPanel.java   View source code 5 votes vote down vote up
public void dragGestureRecognized(DragGestureEvent dge) {
    dge.getSourceAsDragGestureRecognizer().setSourceActions(DnDConstants.ACTION_COPY);
    JTree t = (JTree) dge.getComponent();
    List<Object> selectedNodes = new ArrayList<Object>();
    if (t.getSelectionPaths() == null) return;
    for (TreePath path : t.getSelectionPaths()) {
    	selectedNodes.add(path.getLastPathComponent());
    }
    dge.getDragSource().startDrag(dge, null, 
            new OlapMetadataTransferable(selectedNodes.toArray()), 
            new DragSourceAdapter() {//just need a default adapter
            }
    );
}
 
Example 8
Project: WP3   File: mxGraphHandler.java   View source code 5 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler() {
  DragGestureListener dragGestureListener = new DragGestureListener() {
    public void dragGestureRecognized(DragGestureEvent e) {
      if (graphComponent.isDragEnabled() && first != null) {
        final TransferHandler th = graphComponent.getTransferHandler();

        if (th instanceof mxGraphTransferHandler) {
          final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
              .createTransferable(graphComponent);

          if (t != null) {
            e.startDrag(null, mxSwingConstants.EMPTY_IMAGE, new Point(), t,
                new DragSourceAdapter() {

                  /**
                   * 
                   */
                  public void dragDropEnd(DragSourceDropEvent dsde) {
                    ((mxGraphTransferHandler) th).exportDone(graphComponent, t,
                        TransferHandler.NONE);
                    first = null;
                  }
                });
          }
        }
      }
    }
  };

  DragSource dragSource = new DragSource();
  dragSource.createDefaultDragGestureRecognizer(graphComponent.getGraphControl(),
      (isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE : DnDConstants.ACTION_MOVE,
      dragGestureListener);
}
 
Example 9
Project: TrabalhoFinalEDA2   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(graphComponent
			.getGraphControl(),
			(isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE
					: DnDConstants.ACTION_MOVE, dragGestureListener);
}
 
Example 10
Project: openjdk-jdk10   File: Button2DragTest.java   View source code 4 votes vote down vote up
public void run() {
    frame = new Frame();

    final DragSourceListener dragSourceListener = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            dropSuccess = e.getDropSuccess();
            System.err.println("Drop was successful: " + dropSuccess);
        }
    };
    DragGestureListener dragGestureListener = new DragGestureListener() {
        public void dragGestureRecognized(DragGestureEvent dge) {
            dge.startDrag(null, new StringSelection("OK"), dragSourceListener);
        }
    };
    new DragSource().createDefaultDragGestureRecognizer(frame, DnDConstants.ACTION_MOVE,
                                                        dragGestureListener);

    DropTargetAdapter dropTargetListener = new DropTargetAdapter() {
        public void drop(DropTargetDropEvent dtde) {
            dtde.acceptDrop(DnDConstants.ACTION_MOVE);
            dtde.dropComplete(true);
            System.err.println("Drop");
        }
    };
    new DropTarget(frame, dropTargetListener);

    //What would normally go into main() will probably go here.
    //Use System.out.println for diagnostic messages that you want
    //to read after the test is done.
    frame.setUndecorated(true);
    frame.setBounds(100, 100, 200, 200);
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);

    Robot robot = Util.createRobot();

    Util.waitForIdle(robot);

    Point startPoint = frame.getLocationOnScreen();
    Point endPoint = new Point(startPoint);
    startPoint.translate(50, 50);
    endPoint.translate(150, 150);

    Util.drag(robot, startPoint, endPoint, InputEvent.BUTTON2_MASK);

    Util.waitForIdle(robot);
    robot.delay(500);

    if (dropSuccess) {
        System.err.println("test passed");
    } else {
        throw new RuntimeException("test failed: drop was not successful");
    }
}
 
Example 11
Project: openjdk9   File: Button2DragTest.java   View source code 4 votes vote down vote up
public void run() {
    frame = new Frame();

    final DragSourceListener dragSourceListener = new DragSourceAdapter() {
        public void dragDropEnd(DragSourceDropEvent e) {
            dropSuccess = e.getDropSuccess();
            System.err.println("Drop was successful: " + dropSuccess);
        }
    };
    DragGestureListener dragGestureListener = new DragGestureListener() {
        public void dragGestureRecognized(DragGestureEvent dge) {
            dge.startDrag(null, new StringSelection("OK"), dragSourceListener);
        }
    };
    new DragSource().createDefaultDragGestureRecognizer(frame, DnDConstants.ACTION_MOVE,
                                                        dragGestureListener);

    DropTargetAdapter dropTargetListener = new DropTargetAdapter() {
        public void drop(DropTargetDropEvent dtde) {
            dtde.acceptDrop(DnDConstants.ACTION_MOVE);
            dtde.dropComplete(true);
            System.err.println("Drop");
        }
    };
    new DropTarget(frame, dropTargetListener);

    //What would normally go into main() will probably go here.
    //Use System.out.println for diagnostic messages that you want
    //to read after the test is done.
    frame.setUndecorated(true);
    frame.setBounds(100, 100, 200, 200);
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);

    Robot robot = Util.createRobot();

    Util.waitForIdle(robot);

    Point startPoint = frame.getLocationOnScreen();
    Point endPoint = new Point(startPoint);
    startPoint.translate(50, 50);
    endPoint.translate(150, 150);

    Util.drag(robot, startPoint, endPoint, InputEvent.BUTTON2_MASK);

    Util.waitForIdle(robot);
    robot.delay(500);

    if (dropSuccess) {
        System.err.println("test passed");
    } else {
        throw new RuntimeException("test failed: drop was not successful");
    }
}
 
Example 12
Project: OWLAx   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(graphComponent
			.getGraphControl(),
			(isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE
					: DnDConstants.ACTION_MOVE, dragGestureListener);
}
 
Example 13
Project: CodenameOne   File: UserInterfaceEditor.java   View source code 4 votes vote down vote up
private void makeDraggable(final JButton b, final Class codenameOneClass, final String namePrefix, final CustomComponent custom) {
    DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(b,
            TransferHandler.MOVE, new DragGestureListener() {
        public void dragGestureRecognized(DragGestureEvent dge) {
            lockForDragging = true;
            try {
                com.codename1.ui.Component cmp;
                if(custom != null && custom.isUiResource()) {
                    UIBuilderOverride u = new UIBuilderOverride();
                    cmp = u.createContainer(res, custom.getType());
                    if(b.getIcon() != null) {
                        DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                                ((ImageIcon)b.getIcon()).getImage(), new Point(0, 0),
                                new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                            });
                    } else {
                        DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                            new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                            });
                    }
                    return;
                }
                if(codenameOneClass == com.codename1.ui.Component.class) {
                    // special case for custom component which has a protected constructor
                    cmp = new com.codename1.ui.Component() {};
                } else {
                    cmp = (com.codename1.ui.Component)codenameOneClass.newInstance();
                }
                cmp.putClientProperty(TYPE_KEY, namePrefix);
                cmp.setName(findUniqueName(namePrefix));
                initializeComponentText(cmp);
                if(custom != null) {
                    cmp.putClientProperty("CustomComponent", custom);
                    cmp.putClientProperty(TYPE_KEY, custom.getType());
                }
                DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                        new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                        });
            } catch(Exception e) {
                e.printStackTrace();
            }
        }
    });
}
 
Example 14
Project: cn1   File: UserInterfaceEditor.java   View source code 4 votes vote down vote up
private void makeDraggable(final JButton b, final Class codenameOneClass, final String namePrefix, final CustomComponent custom) {
    DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(b,
            TransferHandler.MOVE, new DragGestureListener() {
        public void dragGestureRecognized(DragGestureEvent dge) {
            lockForDragging = true;
            try {
                com.codename1.ui.Component cmp;
                if(custom != null && custom.isUiResource()) {
                    UIBuilderOverride u = new UIBuilderOverride();
                    cmp = u.createContainer(res, custom.getType());
                    if(b.getIcon() != null) {
                        DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                                ((ImageIcon)b.getIcon()).getImage(), new Point(0, 0),
                                new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                            });
                    } else {
                        DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                            new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                            });
                    }
                    return;
                }
                if(codenameOneClass == com.codename1.ui.Component.class) {
                    // special case for custom component which has a protected constructor
                    cmp = new com.codename1.ui.Component() {};
                } else {
                    cmp = (com.codename1.ui.Component)codenameOneClass.newInstance();
                }
                cmp.putClientProperty(TYPE_KEY, namePrefix);
                cmp.setName(findUniqueName(namePrefix));
                initializeComponentText(cmp);
                if(custom != null) {
                    cmp.putClientProperty("CustomComponent", custom);
                    cmp.putClientProperty(TYPE_KEY, custom.getType());
                }
                DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveDrop,
                        new CodenameOneComponentTransferable(cmp), new DragSourceAdapter() {
                        });
            } catch(Exception e) {
                e.printStackTrace();
            }
        }
    });
}
 
Example 15
Project: GKA1   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(graphComponent
			.getGraphControl(),
			(isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE
					: DnDConstants.ACTION_MOVE, dragGestureListener);
}
 
Example 16
Project: GKA1   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(graphComponent
			.getGraphControl(),
			(isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE
					: DnDConstants.ACTION_MOVE, dragGestureListener);
}
 
Example 17
Project: Puzzledice   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(
			graphComponent.getGraphControl(),
			DnDConstants.ACTION_COPY_OR_MOVE, dragGestureListener);
}
 
Example 18
Project: WMA   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(
			graphComponent.getGraphControl(),
			DnDConstants.ACTION_COPY_OR_MOVE, dragGestureListener);
}
 
Example 19
Project: OnionUmlVisualization   File: mxGraphHandler.java   View source code 4 votes vote down vote up
/**
 * 
 */
protected void installDragGestureHandler()
{
	DragGestureListener dragGestureListener = new DragGestureListener()
	{
		public void dragGestureRecognized(DragGestureEvent e)
		{
			if (graphComponent.isDragEnabled() && first != null)
			{
				final TransferHandler th = graphComponent
						.getTransferHandler();

				if (th instanceof mxGraphTransferHandler)
				{
					final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
							.createTransferable(graphComponent);

					if (t != null)
					{
						e.startDrag(null, mxSwingConstants.EMPTY_IMAGE,
								new Point(), t, new DragSourceAdapter()
								{

									/**
									 * 
									 */
									public void dragDropEnd(
											DragSourceDropEvent dsde)
									{
										((mxGraphTransferHandler) th)
												.exportDone(
														graphComponent,
														t,
														TransferHandler.NONE);
										first = null;
									}
								});
					}
				}
			}
		}
	};

	DragSource dragSource = new DragSource();
	dragSource.createDefaultDragGestureRecognizer(
			graphComponent.getGraphControl(),
			DnDConstants.ACTION_COPY_OR_MOVE, dragGestureListener);
}