| Package | Description |
|---|---|
| edu.mit.blocks.codeblocks | |
| edu.mit.blocks.renderable |
| Modifier and Type | Method and Description |
|---|---|
BlockConnector |
Block.addSocket(int index,
java.lang.String kind,
BlockConnector.PositionType positionType,
java.lang.String label,
boolean isLabelEditable,
boolean isExpandable,
java.lang.Long blockID)
Adds another socket to this.
|
BlockConnector |
Block.getAfterConnector()
Returns the BlockConnector representing the connection to the block after this
|
BlockConnector |
Block.getBeforeConnector()
Returns the BlockConnector representing the connection to the block before this
|
BlockConnector |
Block.getConnectorTo(java.lang.Long otherBlockID)
Searches for the BlockConnector linking this block to another block
|
BlockConnector |
BlockGenus.getInitAfter()
Returns the initial after connector of this
|
BlockConnector |
Block.getInitAfter()
Returns the initial after connector of this
FORWARDED FROM BLOCK GENUS
|
BlockConnector |
BlockGenus.getInitBefore()
Returns the initial before connector of this
|
BlockConnector |
Block.getInitBefore()
Returns the initial before connector of this
FORWARDED FROM BLOCK GENUS
|
BlockConnector |
BlockGenus.getInitPlug()
Returns the initial plug connector of this
|
BlockConnector |
Block.getInitPlug()
Returns the initial plug connector of this
FORWARDED FROM BLOCK GENUS
|
BlockConnector |
BlockLink.getPlug() |
BlockConnector |
Block.getPlug()
Returns the BlockConnector plug of this
|
static BlockConnector |
BlockLinkChecker.getPlugEquivalent(Block b) |
BlockConnector |
BlockLink.getSocket() |
BlockConnector |
Block.getSocketAt(int index)
Returns the socket (BlockConnector instance) at the specified index
|
static BlockConnector |
BlockConnector.instantiateFromState(Workspace workspace,
java.lang.Object memento)
This is a way of generating a BlockConnector from a memento.
|
static BlockConnector |
BlockConnector.loadBlockConnector(Workspace workspace,
org.w3c.dom.Node node,
java.util.HashMap<java.lang.Long,java.lang.Long> idMapping)
Loads information for a single BlockConnector and returns an instance
of BlockConnector with the loaded information
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.util.List<BlockConnector>> |
BlockGenus.getExpandGroups()
Returns the expand groups of this.
|
java.lang.Iterable<BlockConnector> |
BlockGenus.getInitSockets()
Returns the initial set of sockets of this
|
java.lang.Iterable<BlockConnector> |
Block.getInitSockets()
Returns the initial set of sockets of this
FORWARDED FROM BLOCK GENUS
|
static java.lang.Iterable<BlockConnector> |
BlockLinkChecker.getSocketEquivalents(Block b) |
java.lang.Iterable<BlockConnector> |
Block.getSockets()
Returns an unmodifiable iterable over a safe copy of the Sockets of this
|
| Modifier and Type | Method and Description |
|---|---|
void |
Block.blockConnected(BlockConnector connectedSocket,
java.lang.Long connectedBlockID)
Informs this Block that a block with id connectedBlockID has connected to the specified
connectedSocket
|
void |
Block.blockDisconnected(BlockConnector disconnectedSocket)
Informs this Block that a block has disconnected from the specified disconnectedSocket
|
boolean |
CommandRule.canLink(Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2) |
boolean |
SocketRule.canLink(Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2)
Returns true if the two sockets of the two blocks can link by matching their socket kind; false if not.
|
boolean |
LinkRule.canLink(Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2)
Returns true if the two sockets of the two blocks can link; false if not
|
boolean |
InfixRule.canLink(Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2)
Returns true if the two sockets of the two blocks can link; false if not
|
static BlockLink |
BlockLinkChecker.canLink(Workspace workspace,
Block block1,
Block block2,
BlockConnector con1,
BlockConnector con2)
Returns a BlockLink instance if the two specified blocks can connect at the specified
block connectors at each block; null if no link is possible.
|
static BlockLink |
BlockLink.getBlockLink(Workspace workspace,
Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2)
Factory method for creating BlockLink objects
|
static java.awt.Dimension |
BlockConnectorShape.getConnectorDimensions(BlockConnector blockConnector)
Gets the dimension of a given BlockConnector.
|
int |
Block.getSocketIndex(BlockConnector socket)
Returns the index number of a given socket
|
static boolean |
BlockConnectorShape.isCommandConnector(BlockConnector connector) |
void |
Block.removeSocket(BlockConnector socket)
Removes specified socket
|
| Constructor and Description |
|---|
BlockConnector(BlockConnector con)
Constucts a new
BlockConnector by copying the connector information
from the specified con. |
| Modifier and Type | Method and Description |
|---|---|
void |
RenderableBlock.blockConnected(BlockConnector connectedSocket,
long connectedBlockID)
Notifies this renderable block that ITS socket connectedSocket was
connected to ANOTHER block with ID connectedBlockID.
|
void |
RenderableBlock.blockDisconnected(BlockConnector disconnectedSocket)
Notifies this renderable block that its socket connectedSocket had a
block disconnected from it.
|
java.awt.Point |
RenderableBlock.getSocketAbstractPoint(BlockConnector socket)
Returns a new Point object that represents the abstract location of this
socket's center.
|
java.awt.Point |
RenderableBlock.getSocketPixelPoint(BlockConnector socket)
Returns a new Point object that represents the pixel location of this
socket's center.
|
java.awt.Dimension |
RenderableBlock.getSocketSpaceDimension(BlockConnector socket)
Returns the dimension associated with a socket.
|
void |
RenderableBlock.updateSocketPoint(BlockConnector socket,
java.awt.geom.Point2D point)
Updates the center point location of this socket
|