Package java.awt.dnd

Examples of java.awt.dnd.DropTarget


        }

      });

      setDragEnabled(true);
      setDropTarget(new DropTarget(this, // component
          DnDConstants.ACTION_COPY_OR_MOVE, // actions
          this));
      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
View Full Code Here


    graphComponent.getGraph().getView().addListener(
        mxEvent.SCALE_AND_TRANSLATE, repaintHandler);

    graphComponent.getGraphControl().addMouseMotionListener(this);

    DropTarget dropTarget = graphComponent.getDropTarget();

    try
    {
      if (dropTarget != null)
      {
        dropTarget.addDropTargetListener(this);
      }
    }
    catch (TooManyListenersException tmle)
    {
      // should not happen... swing drop target is multicast
View Full Code Here

        propertiesTable.setDragEnabled( true );
        propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

        if( getHolder().getModelItem() != null )
        {
          DropTarget dropTarget = new DropTarget( propertiesTable,
              new PropertyHolderTablePropertyExpansionDropTarget() );
          dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
        }

        return propertiesTable;
      }
    };
View Full Code Here

    JScrollPane scrollPane = new JScrollPane( buildPropertiesTable() );

    if( getHolder().getModelItem() != null )
    {
      DropTarget dropTarget = new DropTarget( scrollPane, new PropertyHolderTablePropertyExpansionDropTarget() );
      dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
    }

    add( scrollPane, BorderLayout.CENTER );
    add( buildToolbar(), BorderLayout.NORTH );
  }
View Full Code Here

    propertiesTable.setDragEnabled( true );
    propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

    if( getHolder().getModelItem() != null )
    {
      DropTarget dropTarget = new DropTarget( propertiesTable, new PropertyHolderTablePropertyExpansionDropTarget() );
      dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
    }

    // Set render this only for value column. In this cell render we handle password shadowing.
    propertiesTable.getColumnModel().getColumn( 1 ).setCellRenderer( new PropertiesTableCellRenderer() );
    return propertiesTable;
View Full Code Here

        propertiesTable.setDragEnabled( true );
        propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

        if( getHolder().getModelItem() != null )
        {
          DropTarget dropTarget = new DropTarget( propertiesTable,
              new PropertyHolderTablePropertyExpansionDropTarget() );
          dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
        }

        return propertiesTable;
      }
    };
View Full Code Here

  }

  public static void enable( JTextComponent textField, ModelItem modelItem, JPopupMenu popup )
  {
    JTextComponentPropertyExpansionTarget target = new JTextComponentPropertyExpansionTarget( textField, modelItem );
    DropTarget dropTarget = new DropTarget( textField, new PropertyExpansionDropTarget( target ) );
    dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );

    textField.setComponentPopupMenu( popup );

    if( popup != null )
    {
View Full Code Here

  }

  public static void enable( JXEditTextArea textField, ModelItem modelItem )
  {
    JXEditTextAreaPropertyExpansionTarget target = new JXEditTextAreaPropertyExpansionTarget( textField, modelItem );
    DropTarget dropTarget = new DropTarget( textField, new PropertyExpansionDropTarget( target ) );
    dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );

    JPopupMenu popup = textField.getRightClickPopup();

    if( popup != null )
    {
View Full Code Here

  }

  public static void enable( GroovyEditor groovyEditor, ModelItem modelItem )
  {
    GroovyEditorPropertyExpansionTarget target = new GroovyEditorPropertyExpansionTarget( groovyEditor, modelItem );
    DropTarget dropTarget = new DropTarget( groovyEditor.getEditArea(), new PropertyExpansionDropTarget( target ) );
    dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );

    JPopupMenu popup = groovyEditor.getEditArea().getComponentPopupMenu();

    if( popup != null )
    {
View Full Code Here

    return null;
  }

  public static void addDropTarget( Component component, AbstractSoapUIDropTarget target )
  {
    DropTarget dropTarget = new DropTarget( component, target );
    dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
  }
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.