Package java.awt.dnd

Examples of java.awt.dnd.DropTarget


     */
    static void installSwingDropTargetAsNecessary(Component c,
                                                         TransferHandler t) {

        if (!getSuppressDropTarget()) {
            DropTarget dropHandler = c.getDropTarget();
            if ((dropHandler == null) || (dropHandler instanceof UIResource)) {
                if (t == null) {
                    c.setDropTarget(null);
                } else if (!GraphicsEnvironment.isHeadless()) {
                    c.setDropTarget(new TransferHandler.SwingDropTarget(c));
View Full Code Here


    _app = session.getApplication();

    _textArea = new OsterTextControl(session, prefs, getIdentifier());
   
    dt = new DropTarget(_textArea, new FileEditorDropTargetListener(session));
  }
View Full Code Here

    final JScrollPane scrollPane = new JScrollPane(this.tree);
    this.setLayout(new BorderLayout());
    this.add(scrollPane, BorderLayout.CENTER);

    this.tree.updateUI();
    dt = new DropTarget(this, this);

  }
View Full Code Here

                              syntaxFactory,
                              _plugin,
                              getIdentifier(),
                              _propertiesWrapper);

    dt = new DropTarget(_textArea, new FileEditorDropTargetListener(session));
  }
View Full Code Here

      _textScrollPane = new RTextScrollPane(_textArea);

      _textScrollPane.setLineNumbersEnabled(prefs.isLineNumbersEnabled());


      dt = new DropTarget(_textArea, new FileEditorDropTargetListener(session));


      //////////////////////////////////////////////////////////////////////
      // Dragging inside the text area itself conflicts with file dnd
      // so we disable it. See bug #3006515
View Full Code Here

  /**
   *
   */
  protected void installDropTargetHandler()
  {
    DropTarget dropTarget = graphComponent.getDropTarget();

    try
    {
      if (dropTarget != null)
      {
        dropTarget.addDropTargetListener(this);
        currentDropTarget = dropTarget;
      }
    }
    catch (TooManyListenersException tmle)
    {
View Full Code Here

        ActivityDesignerListener.getInstance().pasteSelectedActivity();
      }
    });
    popup.add(pastePopupMenu);

    new DropTarget(this,
        DnDConstants.ACTION_COPY_OR_MOVE,
        this);


    this.setAlignmentX(Component.CENTER_ALIGNMENT);
View Full Code Here

  public PlaceHolder(Dimension originalSize, boolean augmentVertically){
//    super(AbstractActivityDesigner.isVertical ? VERT_ARROW : ARROW);
    super();

    new DropTarget(this,
        DnDConstants.ACTION_COPY_OR_MOVE,
        this);


    this.augmentVertically = augmentVertically;
View Full Code Here

            DnDConstants.ACTION_LINK,       //specifies valid actions
            this                                  //DragGestureListener
          );
      
        dgr.setSourceActions(dgr.getSourceActions() & ~InputEvent.BUTTON3_MASK);
        DropTarget dropTarget = new DropTarget(this, this);
       
        final JPopupMenu popupMenu = new JPopupMenu();

        JMenuItem menuItem = new JMenuItem("Unlink");
        menuItem.addActionListener(new ActionListener(){
View Full Code Here

   
    public InformationValueLabel(Object value, Icon icon, int alignment){
      super(getLabel(value), icon, alignment);
      this.value = value;
     
      new DropTarget(this,
          DnDConstants.ACTION_COPY_OR_MOVE,
          this);

    }
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.