public class CommandRule extends java.lang.Object implements LinkRule, WorkspaceListener
| Constructor and Description |
|---|
CommandRule(Workspace workspace) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
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 |
isMandatory() |
void |
workspaceEventOccurred(WorkspaceEvent e)
Invoked whenever any of the enumerated events specified within
WorkspaceEvent occur.
|
public CommandRule(Workspace workspace)
public boolean canLink(Block block1, Block block2, BlockConnector socket1, BlockConnector socket2)
LinkRulepublic boolean isMandatory()
isMandatory in interface LinkRulepublic void workspaceEventOccurred(WorkspaceEvent e)
WorkspaceListenerworkspaceEventOccurred in interface WorkspaceListenere - WorkspaceEvent object holding information regarding the triggered
event.