Package com.sun.jna.platform.dnd

Examples of com.sun.jna.platform.dnd.DragHandler

NOTE: Fundamentally, the active action is determined by the drop handler in {@link DropTargetDragEvent#acceptDrag}, but often client code simply relies on {@link DropTargetDragEvent#getDropAction}.

    public static class DragLabel extends JLabel {
    private static final long serialVersionUID = 1L;
    private boolean dragging;
        public DragLabel(Icon icon) {
            super(icon);
            new DragHandler(this, DnDConstants.ACTION_COPY_OR_MOVE) {
                protected Icon getDragIcon(DragGestureEvent e, Point imageOffset) {
                    dragging = true;
                    return getIcon();
                }
                public void dragDropEnd(DragSourceDropEvent e) {
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.dnd.DragHandler

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.