Package java.awt.dnd

Examples of java.awt.dnd.DropTarget


                return new ObjectTransferable(musicas, TipoTransferenciaMusica.JBIBLIOTECA);

            }
        });

        dropTargetBiblioteca = new DropTarget(jScrollPane, new DropTargetAdapter() {
            @Override
            public void drop(DropTargetDropEvent dtde) {
                try {
                    Transferable transferable = dtde.getTransferable();
                    DataFlavor[] flavors = transferable.getTransferDataFlavors();
View Full Code Here


                }
                return new ObjectTransferable(musicas, TipoTransferenciaMusica.JFILA_FILA);

            }
        });
        dropTargetFila = new DropTarget(jScrollPaneFila, new DropTargetAdapter() {
            @Override
            public void drop(DropTargetDropEvent dtde) {
                try {
                    Point location = dtde.getLocation();
                    int posicaoDestino = -1;
View Full Code Here

                return new ObjectTransferable(musicas, TipoTransferenciaMusica.JPLAY_LIST);

            }
        });

        dropTargetPlayList = new DropTarget(jScrollPane, new DropTargetAdapter() {
            @Override
            public void drop(DropTargetDropEvent dtde) {
                try {
                    Point location = dtde.getLocation();
                    int posicaoDestino = -1;
View Full Code Here

    testFiveParams();
  }
 
  public void testNoParam()
  {
    dt = new DropTarget();
    oldDt = dt;
    h.check(dt.getComponent() == null);
    h.check(dt.getDefaultActions() == DnDConstants.ACTION_COPY_OR_MOVE);
   
    try
View Full Code Here

    caught = false;
  }
 
  public void testTwoParams()
  {   
    dt = new DropTarget(b, oldDt);
    h.check(dt.getComponent().equals(b));
    h.check(dt.getDefaultActions() == DnDConstants.ACTION_COPY_OR_MOVE);
   
    try
    {
View Full Code Here

    h.check((fm instanceof SystemFlavorMap));
  }
 
  public void testThreeParams()
  {   
    dt = new DropTarget(b, DnDConstants.ACTION_COPY_OR_MOVE, oldDt);
    h.check(dt.getComponent().equals(b));
    h.check(dt.getDefaultActions() == DnDConstants.ACTION_COPY_OR_MOVE);
   
    try
    {
View Full Code Here

    h.check((fm instanceof SystemFlavorMap));
  }
 
  public void testFourParams()
  {   
    dt = new DropTarget(b, DnDConstants.ACTION_COPY_OR_MOVE, oldDt, false);
    h.check(dt.getComponent().equals(b));
    h.check(dt.getDefaultActions() == DnDConstants.ACTION_COPY_OR_MOVE);
   
    try
    {
View Full Code Here

  }
 
  public void testFiveParams()
  {   
    fm = SystemFlavorMap.getDefaultFlavorMap();
    dt = new DropTarget(b, DnDConstants.ACTION_COPY_OR_MOVE, oldDt, false, fm);
    h.check(dt.getComponent().equals(b));
    h.check(dt.getDefaultActions() == DnDConstants.ACTION_COPY_OR_MOVE);
   
    try
    {
View Full Code Here

      add(source, BorderLayout.NORTH);

      target.addActionListener(this);
      add(target, BorderLayout.SOUTH);

      new DropTarget(target, DnDConstants.ACTION_COPY_OR_MOVE, this);
      setSize(205, 100);
      setVisible(true);
     
      r.waitForIdle();
      r.delay (1000);
View Full Code Here

    comp.setCursor(new Cursor(Cursor.HAND_CURSOR));
    harness.check(propertyName, null, "Property: cursor");

    // check 'dropTarget' property (must not be fired)
    propertyName = null;
    comp.setDropTarget(new DropTarget());
    harness.check(propertyName, null, "Property: dropTarget");

    // check 'enabled' property (must not be fired)
    propertyName = null;
    comp.setEnabled(true);
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.