Examples of DropTarget


Examples of java.awt.dnd.DropTarget

  public ListDragAndDropHandler(JList list1, JList list2, ListDropAction action) {
    mList1 = list1;
    mList2 = list2;
    mPaint1 = true;
    mPaint2 = true;
    new DropTarget(mList1, this);
    if(list2 != null && list1 != list2) {
      new DropTarget(mList2, this);
    }
    mAction = action;
  }
View Full Code Here

Examples of java.awt.dnd.DropTarget

    new OverlayListener(this);
    (new DragSource()).createDefaultDragGestureRecognizer(this,
        DnDConstants.ACTION_MOVE, this);

    new DropTarget(this, this);
  }
View Full Code Here

Examples of java.awt.dnd.DropTarget

        while (tokenizer.hasMoreTokens()) {
          flavors[counter++] = new DataFlavor(tokenizer.nextToken());
        }

        DropHandler handler = new DropHandler(this, listener, name, flavors);
        new DropTarget(getRealWidget(), handler);
      } catch (Exception e) {
        throw new GUIException("Error while creating drop target support", e);
      }
    } else {
      throw new GUIException(
View Full Code Here

Examples of java.awt.dnd.DropTarget

    public void setLayers(Layer[] allLayers) {
        // remove old layers list
        layers.clear();
        for (int i = 0; i < allLayers.length; i++) {
            // create a new drop target
            /* dropTarget = */new DropTarget(allLayers[i], DnDConstants.ACTION_MOVE, this);
            if (allLayers[i] instanceof OMGraphicHandlerLayer) {
                Debug.message("DnDCatcher", "Layers changed");
                // keep a reference to potential drop target
                layers.put(allLayers[i].getName(), allLayers[i]);
            }
View Full Code Here

Examples of java.awt.dnd.DropTarget

    public ShapesComponent(DiagramParameters param, ShapesContainer sc){
      super(param, sc);
      lastProviderOver = null;

      setDropTarget(
        new DropTarget(
          this,
          new ShapesComponentDropListener(this)));
    }
View Full Code Here

Examples of java.awt.dnd.DropTarget

        static final EventTargetFilter FILTER = new DropTargetEventTargetFilter();
       
        private DropTargetEventTargetFilter() {}

        public boolean accept(final Component comp) {
            DropTarget dt = comp.getDropTarget();
            return dt != null && dt.isActive();
        }
View Full Code Here

Examples of java.awt.dnd.DropTarget

    }

    _session = session;
    _comp = new MyTextArea(session);
   
    dt = new DropTarget(_comp, new FileEditorDropTargetListener(session));
  }
View Full Code Here

Examples of java.awt.dnd.DropTarget

    add(auto);
    add(xmp);

    // Add drag and drop support to the field
    if (editor != null)
      ((JComponent) editor).setDropTarget(new DropTarget((Component) editor,
        DnDConstants.ACTION_NONE, new UrlDragDrop(entryEditor, frame, editor)));
  }
View Full Code Here

Examples of java.awt.dnd.DropTarget

        /*
         * else if ((s != null) && s.equals("browsePs")) { ExternalFilePanel pan =
         * new ExternalFilePanel(frame, this, "ps", off, ed); return pan; }
         */
        else if ((s != null) && s.equals("url")) {
            ((JComponent) ed).setDropTarget(new DropTarget((Component) ed,
                DnDConstants.ACTION_NONE, new SimpleUrlDragDrop(ed, storeFieldAction)));

            return null;
        }

View Full Code Here

Examples of java.awt.dnd.DropTarget

import java.awt.dnd.DropTarget;

public class FileDrop {

    public final static void addFileDrop(FileDropListener listener, Component component) {
        DropTarget dropTarget  = new DropTarget(component, listener);
        component.setDropTarget(dropTarget);
    }
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.