Examples of DragSourceListener


Examples of java.awt.dnd.DragSourceListener

            LocalManifest dragContent = dragSource.getContent();
            LocalManifestAdapter localManifestAdapter = new LocalManifestAdapter(dragContent);

            awtDragSource.startDrag(trigger, java.awt.Cursor.getDefaultCursor(),
                null, null, localManifestAdapter, new DragSourceListener() {
                @Override
                public void dragEnter(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

            LocalManifest dragContent = dragSource.getContent();
            LocalManifestAdapter localManifestAdapter = new LocalManifestAdapter(dragContent);

            awtDragSource.startDrag(trigger, java.awt.Cursor.getDefaultCursor(),
                null, null, localManifestAdapter, new DragSourceListener() {
                @Override
                public void dragEnter(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

                            return true;
                          else
                            return false;
                        }

                      }, new DragSourceListener() {

                        private ModelGraph mouseOverGraph;
                        private DefaultGraphCell mouseOverCell;

                        public void dragDropEnd(DragSourceDropEvent dsde) {
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

     * <code>DragSourceDragEvent</code>.
     *
     * @param dsde the <code>DragSourceDragEvent</code>
     */
    public void dragOver(DragSourceDragEvent dsde) {
        DragSourceListener dsl = listener;
        if (dsl != null) {
            dsl.dragOver(dsde);
        }
        getDragSource().processDragOver(dsde);

  updateCurrentCursor(getSourceActions(), dsde.getTargetActions(), OVER);
    }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

     * <code>DragSourceEvent</code>.
     *
     * @param dse the <code>DragSourceEvent</code>
     */
    public void dragExit(DragSourceEvent dse) {
        DragSourceListener dsl = listener;
        if (dsl != null) {
            dsl.dragExit(dse);
        }
        getDragSource().processDragExit(dse);

  updateCurrentCursor(DnDConstants.ACTION_NONE, DnDConstants.ACTION_NONE, DEFAULT);
    }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

     * <code>DragSourceDragEvent</code>.
     *
     * @param dsde the <code>DragSourceDragEvent</code>
     */
    public void dropActionChanged(DragSourceDragEvent dsde) {
        DragSourceListener dsl = listener;
        if (dsl != null) {
            dsl.dropActionChanged(dsde);
        }
        getDragSource().processDropActionChanged(dsde);

  updateCurrentCursor(getSourceActions(), dsde.getTargetActions(), CHANGED);
    }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

     * <code>DragSourceDropEvent</code>.
     *
     * @param dsde the <code>DragSourceDropEvent</code>
     */
    public void dragDropEnd(DragSourceDropEvent dsde) {
        DragSourceListener dsl = listener;
        if (dsl != null) {
            dsl.dragDropEnd(dsde);
        }
        getDragSource().processDragDropEnd(dsde);
    }
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

    private static class PTreeDragGestureListener implements
            DragGestureListener {
        // FindBugs suggests making this class static so as to decrease
        // the size of instances and avoid dangling references.
        public void dragGestureRecognized(DragGestureEvent e) {
            final DragSourceListener dsl = new DragSourceListener() {
                public void dragDropEnd(DragSourceDropEvent dsde) {
                }

                public void dragEnter(DragSourceDragEvent dsde) {
                    DragSourceContext context = dsde.getDragSourceContext();
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

     * meaning that it will support "plain text" and "java string"
     * data flavors.
     */
    public void makeDraggable(JComponent c, String data) {
        final String dataHandle = data;
        final DragSourceListener dsl = new DragSourceListener() {
            public void dragDropEnd(DragSourceDropEvent dsde) {
            }

            public void dragEnter(DragSourceDragEvent dsde) {
                DragSourceContext context = dsde.getDragSourceContext();
View Full Code Here

Examples of java.awt.dnd.DragSourceListener

            LocalManifest dragContent = dragSource.getContent();
            LocalManifestAdapter localManifestAdapter = new LocalManifestAdapter(dragContent);

            awtDragSource.startDrag(trigger, java.awt.Cursor.getDefaultCursor(),
                null, null, localManifestAdapter, new DragSourceListener() {
                @Override
                public void dragEnter(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }
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.