Examples of DragSourceContext


Examples of java.awt.dnd.DragSourceContext

        }
    }
    private String lastAction;
    private void describe(String type, DragSourceEvent e) {
        if (false) {
            DragSourceContext ds = e.getDragSourceContext();
            String msg = "drag: " + type;
            if (e instanceof DragSourceDragEvent) {
                DragSourceDragEvent ev = (DragSourceDragEvent)e;
                msg += ": src=" + actionString(ds.getSourceActions())
                    + " usr=" + actionString(ev.getUserAction())
                    + " tgt=" + actionString(ev.getTargetActions())
                    + " act=" + actionString(ev.getDropAction())
                    + " mods=" + ev.getGestureModifiersEx();
            }
View Full Code Here

Examples of java.awt.dnd.DragSourceContext

      /**
       * {@inheritDoc}
       */
      public void dragEnter(DragSourceDragEvent dsde)
      {
        DragSourceContext context = dsde.getDragSourceContext();
        int dropAction = dsde.getDropAction();
        if ((dropAction & DnDConstants.ACTION_COPY) != 0)
        {
          context.setCursor(DragSource.DefaultCopyDrop);
        }
        else if ((dropAction & DnDConstants.ACTION_MOVE) != 0)
        {
          context.setCursor(DragSource.DefaultMoveDrop);
        }
        else
        {
          context.setCursor(DragSource.DefaultCopyNoDrop);
        }
      }

      /**
       * {@inheritDoc}
 
View Full Code Here

Examples of java.awt.dnd.DragSourceContext

            LocalManifestAdapter localManifestAdapter = new LocalManifestAdapter(dragContent);

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

                public void dragExit(DragSourceEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                }

                public void dragOver(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                public void dropActionChanged(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                public void dragDropEnd(DragSourceDropEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                }
            });
        }
View Full Code Here

Examples of java.awt.dnd.DragSourceContext

            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())));
                }

                @Override
                public void dragExit(DragSourceEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                }

                @Override
                public void dragOver(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                @Override
                public void dropActionChanged(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                @Override
                public void dragDropEnd(DragSourceDropEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                }
            });
        }
View Full Code Here

Examples of java.awt.dnd.DragSourceContext

            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())));
                }

                @Override
                public void dragExit(DragSourceEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                }

                @Override
                public void dragOver(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                @Override
                public void dropActionChanged(DragSourceDragEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
                }

                @Override
                public void dragDropEnd(DragSourceDropEvent event) {
                    DragSourceContext context = event.getDragSourceContext();
                    context.setCursor(java.awt.Cursor.getDefaultCursor());
                    dragSource.endDrag(dragDescendant, getDropAction(event.getDropAction()));
                }
            });
        }
View Full Code Here

Examples of java.awt.dnd.DragSourceContext

        }
    }
    private String lastAction;
    private void describe(String type, DragSourceEvent e) {
        if (false) {
            DragSourceContext ds = e.getDragSourceContext();
            String msg = "drag: " + type;
            if (e instanceof DragSourceDragEvent) {
                DragSourceDragEvent ev = (DragSourceDragEvent)e;
                msg += ": src=" + actionString(ds.getSourceActions())
                    + " usr=" + actionString(ev.getUserAction())
                    + " tgt=" + actionString(ev.getTargetActions())
                    + " act=" + actionString(ev.getDropAction())
                    + " mods=" + ev.getGestureModifiersEx();
            }
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.