Examples of DragTracker


Examples of net.glowstone.inventory.DragTracker

            // 5 2 * end left drag
            // 5 4 * start right drag
            // 5 5   add slot right drag
            // 5 6 * end right drag

            DragTracker drag = player.getInventory().getDragTracker();
            boolean right = (message.getButton() >= 4);

            switch (message.getButton()) {
                case 0: // start left drag
                case 4: // start right drag
                    return drag.start(right);

                case 1: // add slot left
                case 5: // add slot right
                    return drag.addSlot(right, message.getSlot());

                case 2: // end left drag
                case 6: // end right drag
                    List<Integer> slots = drag.finish(right);
                    if (slots == null || cursor == null) {
                        return false;
                    }

                    ItemStack newCursor = cursor.clone();
View Full Code Here

Examples of org.eclipse.gef.DragTracker

        protected Color getFillColor() {
            return ColorConstants.white;
        }

        protected DragTracker createDragTracker() {
            DragTracker tracker = new DragEditPartsTracker(getOwner());
           
            return tracker;
        }
View Full Code Here

Examples of org.eclipse.gef.DragTracker

        if (isInState(STATE_INITIAL)
                && targetEditPart instanceof NodeEditPart)
        {
            LocationRequest request = new LocationRequest(org.eclipse.jst.pagedesigner.requests.PageDesignerRequestConstants.REQ_SELECTION_TRACKER);
            request.setLocation(getLocation());
            DragTracker selectionTracker = targetEditPart.getDragTracker(request);
            setDragTracker(selectionTracker);
        }
       
        return handled;
    }
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.