Package edu.mit.blocks.codeblocks

Examples of edu.mit.blocks.codeblocks.BlockLink.disconnect()


                    BlockConnector plug = BlockLinkChecker.getPlugEquivalent(block);
                    if (plug != null && plug.hasBlock()) {
                        Block parent = workspace.getEnv().getBlock(plug.getBlockID());
                        BlockConnector socket = parent.getConnectorTo(blockID);
                        BlockLink link = BlockLink.getBlockLink(workspace, block, parent, plug, socket);
                        link.disconnect();
                        //socket is removed internally from block's socket list if socket is expandable
                        workspace.getEnv().getRenderableBlock(parent.getBlockID()).blockDisconnected(socket);

                        //NOTIFY WORKSPACE LISTENERS OF DISCONNECTION
                        workspace.notifyListeners(new WorkspaceEvent(workspace, widget, link, WorkspaceEvent.BLOCKS_DISCONNECTED));
View Full Code Here


        BlockLink link = BlockLink.getBlockLink(workspace, childBlock, parentBlock, childPlug, parentSocket);
        if (link == null) {
            return;
        }

        link.disconnect();

        RenderableBlock parentRenderable = workspace.getEnv().getRenderableBlock(parentBlock.getBlockID());
        if (parentRenderable == null) {
            throw new RuntimeException("INCONSISTANCY VIOLATION: "
                    + "parent block was valid, non-null, and existed.\n\tBut yet, when we get it's renderable"
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.