Examples of DragSourceListener


Examples of org.eclipse.swt.dnd.DragSourceListener

                final List<Element> dragElements = new ArrayList<Element>();
               
                dragSource.addDragListener
                (
                    new DragSourceListener()
                    {
                        public void dragStart( final DragSourceEvent event )
                        {
                            if( TablePropertyEditorPresentation.this.tableViewer.getComparator() == null )
                            {
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

  private void createDragSource() {
    if (dragSource != null)
      dragSource.dispose();
    dragSource = new DragSource(dragControl, dragOperation);
    dragSource.setTransfer(dragTypes);
    dragSource.addDragListener(new DragSourceListener() {
      public void dragFinished(org.eclipse.swt.dnd.DragSourceEvent event) {
        dragConsole.append(">>dragFinished\n");
        printEvent(event);
        dragDataText = dragDataRTF = dragDataHTML = null;
        dragDataFiles = null;
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

   * @return the DragSource for the table
   */
  private DragSource createTableDragSource(final Table table) {
    DragSource dragSource = new DragSource(table, DND.DROP_MOVE | DND.DROP_COPY);
    dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dragSource.addDragListener(new DragSourceListener() {
      TableItem[]  dndSelection  = null;
      String[]  sourceNames    = null;

      public void dragFinished(DragSourceEvent event) {
        dragSourceHandleDragFinished(event, sourceNames);
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

   * @return the DragSource for the tree
   */
  private DragSource createTreeDragSource(final Tree tree) {
    DragSource dragSource = new DragSource(tree, DND.DROP_MOVE | DND.DROP_COPY);
    dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dragSource.addDragListener(new DragSourceListener() {
      TreeItem[]  dndSelection  = null;
      String[]  sourceNames    = null;

      public void dragFinished(DragSourceEvent event) {
        dragSourceHandleDragFinished(event, sourceNames);
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

    }

    private void addDragDropSupport() {
        // TODO: Support drag and drop of directories
        Transfer[] transfers = new Transfer[] { FileTransfer.getInstance()};
        viewer.addDragSupport(DND.DROP_COPY, transfers, new DragSourceListener() {
            private TreeObject[] target;

            public void dragFinished(DragSourceEvent event) {
                target = null;
                event.doit = true;
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

        final List<Element> dragElements = new ArrayList<Element>();
       
        dragSource.addDragListener
        (
            new DragSourceListener()
            {
                public void dragStart( final DragSourceEvent event )
                {
                    final TreeItem[] selection = tree.getSelection();
                    final String filter = outline().getFilterText();
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

  private void initDragAndDrop() {
    int ops = DND.DROP_COPY | DND.DROP_MOVE;
    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer(), TextTransfer.getInstance(), URLTransfer.getInstance() };

    /* Drag Support */
    fResultViewer.addDragSupport(ops, transfers, new DragSourceListener() {
      public void dragStart(final DragSourceEvent event) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            LocalSelectionTransfer.getTransfer().setSelection(fResultViewer.getSelection());
            LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL);
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

  private void initDragAndDrop() {
    int ops = DND.DROP_COPY | DND.DROP_MOVE;
    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer(), TextTransfer.getInstance(), URLTransfer.getInstance() };

    /* Drag Support */
    fViewer.addDragSupport(ops, transfers, new DragSourceListener() {
      public void dragStart(final DragSourceEvent event) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            LocalSelectionTransfer.getTransfer().setSelection(fViewer.getSelection());
            LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL);
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

    DragSource source = new DragSource(viewer.getTree(), DND.DROP_COPY);

    source.setTransfer(new Transfer[] { FeatureStructureTransfer.getInstance() });

    source.addDragListener(new DragSourceListener() {
      TreeItem dragSourceItem = null;

      public void dragStart(DragSourceEvent event) {

        event.doit = false;
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceListener

      }

    });
    final DragSource dragSource = new DragSource(gallery, DND.DROP_COPY);
    dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dragSource.addDragListener(new DragSourceListener() {

      private String[] dataX;

      public void dragFinished(DragSourceEvent event) {
        this.dataX = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.