Package edu.mit.blocks.workspace

Examples of edu.mit.blocks.workspace.Page$CollapseButton


    private static void dropBlock(RenderableBlock block) {
        if (block == null) {
            throw new RuntimeException("Invariant Violated: child block was null");
        }
        Workspace workspace = block.getWorkspace();
        Page p = workspace.getCurrentPage(block);
        if (p == null) {
            throw new RuntimeException("Invariant Violated: child block was located on a null widget");
        }
        //add this block to that page.
        p.blockDropped(block);
    }
View Full Code Here


      workspaceController.loadFreshWorkspace();
    }
        */
   
    Workspace workspace = workspaceController.getWorkspace();
    Page page = workspace.getPageNamed("Main");
   
    FactoryManager manager = workspace.getFactoryManager();
    Block newBlock;
        newBlock = new Block(workspace, "loop", false);
        FactoryRenderableBlock factoryRenderableBlock = new FactoryRenderableBlock(workspace, manager, newBlock.getBlockID());
        RenderableBlock renderableBlock = factoryRenderableBlock.createNewInstance();
        renderableBlock.setLocation(100, 100);
        page.addBlock(renderableBlock);
       
       
  }
View Full Code Here

TOP

Related Classes of edu.mit.blocks.workspace.Page$CollapseButton

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.