Examples of exportAsDrag()


Examples of javax.swing.TransferHandler.exportAsDrag()

      if (( dx > 5 ) || ( dy > 5 )) {
        //This is a drag, not a click.
        JComponent c = (JComponent)e.getSource();
        //Tell the transfer handler to initiate the drag.
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag( c, firstMouseEvent, action );
        firstMouseEvent = null;
      }
    }
  }
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

        int action = (event.isControlDown() && graph.isCloneable()) ? TransferHandler.COPY
            : TransferHandler.MOVE;
        TransferHandler th = graph.getTransferHandler();
        setInsertionLocation(event.getPoint());
        try {
          th.exportAsDrag(graph, event, action);
        } catch (Exception ex) {
          // Ignore
        }
      }
    }
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

      public void mousePressed(MouseEvent e)
      {
        if (chooser.getDragEnabled())
        {
          TransferHandler th = chooser.getTransferHandler();
          th.exportAsDrag(chooser, e, TransferHandler.COPY);
        }
      }
    };

    installPreviewPanel();
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.