use of edu.mit.blocks.workspace.WorkspaceEvent in project openblocks by mikaelhg.
the class BlockLabel method genusChanged.
protected void genusChanged(String genus) {
if (widget.hasSiblings()) {
Block oldBlock = workspace.getEnv().getBlock(blockID);
oldBlock.changeGenusTo(genus);
RenderableBlock rb = workspace.getEnv().getRenderableBlock(blockID);
rb.repaintBlock();
workspace.notifyListeners(new WorkspaceEvent(workspace, rb.getParentWidget(), blockID, WorkspaceEvent.BLOCK_GENUS_CHANGED));
}
}
Aggregations