Examples of moveConnectedBlocks()


Examples of edu.mit.blocks.renderable.RenderableBlock.moveConnectedBlocks()

            if (BlockUtilities.blockExists(workspace, node)) {
                //create mirror block and mirror childrens
                spot.translate(10, 10);
                RenderableBlock mirror = BlockUtilities.makeRenderable(workspace, node, widget);
                mirror.setLocation(spot);
                mirror.moveConnectedBlocks(); // make sure the childrens are placed correctly
            } else {
                //TODO: future version, allow them to paste
                JOptionPane.showMessageDialog(frame, "You cannot paste blocks that are currently NOT on the canvas."
                        + "\nThis function will be available in a future version.\n", "Error", JOptionPane.PLAIN_MESSAGE);
            }
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.