Package java.awt.dnd

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


    mButtonPanel.updateUI();
  }

  private void init() {
    // set the drop targets of the Actions
    new DropTarget(MainFrame.getInstance().getToolbar(), this);
    new DropTarget(MainFrame.getInstance().getToolBarPanel(), this);
    new DropTarget(mButtonPanel, this);

    // set up the ActionButtons in the ToolBar for dragging
    MainFrame.getInstance().getToolbar().disableForDragAndDrop(this, mWest);

    if (mShowToolbarCb.isSelected()) {
View Full Code Here

    mTimer.start();

    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

    //create the drop target for installation of Plugins with Drag'N'Drop on MainFrame
    DropTarget target = new DropTarget();
    try {
      target.addDropTargetListener(this);
    } catch (TooManyListenersException e1) {
      //ignore
    }

    this.setDropTarget(target);
View Full Code Here

  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

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

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

        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

    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

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

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

        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

    }

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

TOP

Related Classes of java.awt.dnd.DropTarget

Copyright © 2018 www.massapicom. 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.