|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodeblocks.BlockGenus
public class BlockGenus
A genus describes the properties that define a block. For example, fd is a block genus that describes all forward block instances in Starlogo. The BlockGenus class stores all the immutable properties and socket information of a genus.
Method Summary | |
---|---|
boolean |
areSocketsExpandable()
Returns true iff this genus's sockets are expandable |
java.lang.String |
getBlockDescription()
Returns the String block text description of this. |
java.awt.Color |
getColor()
Returns the Color of this; May return Color.Black if color was unspecified. |
java.util.List<java.util.List<BlockConnector>> |
getExpandGroups()
Returns the expand groups of this. |
java.lang.String |
getGenusName()
Returns the name of this genus |
static BlockGenus |
getGenusWithName(java.lang.String name)
Returns the BlockGenus with the specified name; null if this name does not exist |
BlockConnector |
getInitAfter()
Returns the initial after connector of this |
BlockConnector |
getInitBefore()
Returns the initial before connector of this |
java.util.Map<BlockImageIcon.ImageLocation,BlockImageIcon> |
getInitBlockImageMap()
Returns the initial BlockImageIcon mapping of this. |
java.lang.Iterable<java.lang.String> |
getInitialArgumentDescriptions()
Returns the set of argument descriptions of this. |
java.lang.String |
getInitialLabel()
Returns the initial label of this |
BlockConnector |
getInitPlug()
Returns the initial plug connector of this |
java.lang.Iterable<BlockConnector> |
getInitSockets()
Returns the initial set of sockets of this |
java.lang.String |
getLabelPrefix()
Returns the String block label prefix of this |
java.lang.String |
getLabelSuffix()
Returns the String block label prefix of this |
java.lang.String |
getProperty(java.lang.String property)
Returns the value of the specified language dependent property |
java.util.List<java.lang.String> |
getSiblingsList()
Returns the siblings of this genus. |
java.lang.Iterable<java.lang.String> |
getStubList()
Returns a list of the stub kinds (or stub genus names) of this; if this genus does not have any stubs, returns an empty list |
boolean |
hasAfterConnector()
Returns true if this genus has a "after" connector; false otherwise. |
boolean |
hasBeforeConnector()
Returns true if this genus has a "before" connector; false otherwise. |
boolean |
hasDefaultArgs()
Returns true iff any one of the connectors for this genus has default arguments; false otherwise |
boolean |
hasSiblings()
Returns true if this genus has siblings; false otherwise. |
boolean |
hasStubs()
Returns true is this genus has stubs (references such as getters, setters, etc.); false otherwise |
boolean |
isCommandBlock()
Returns true if this block is a command block (i.e. |
boolean |
isDataBlock()
Returns true if this block is a data block a.k.a. |
boolean |
isDeclaration()
Returns true if this genus is a declaration block. |
boolean |
isFunctionBlock()
Returns true iff this block is a function block, which takes in an input and produces an output. |
boolean |
isInfix()
Returns true iff this genus is an infix operator. |
boolean |
isLabelEditable()
Returns true if the label of this is editable; false otherwise |
boolean |
isLabelValue()
Returns true if the value of this genus is contained within the label of this; false otherwise |
boolean |
isListRelated()
Returns true if this block is a list or a list operator (determined by whether it has at least one list connector of any type); false otherwise. |
boolean |
isPageLabelSetByPage()
Returns true iff this genus can have page label. |
boolean |
isProcedureDeclBlock()
Returns true if this block is a procedure declaration block; false otherwise |
boolean |
isProcedureParamBlock()
Returns true if this block is a procedure parameter block; false otherwise |
boolean |
isVariableDeclBlock()
Returns true if this block is a variable declaration block; false otherwise |
boolean |
labelMustBeUnique()
Returns true if the label of this must be unique; false otherwise |
static void |
loadBlockGenera(org.w3c.dom.Element root)
Loads the all the initial BlockGenuses and BlockGenus families of this language |
static void |
main(java.lang.String[] args)
|
static void |
resetAllGenuses()
Resets all the Block Genuses of current language. |
java.lang.String |
toString()
Returns String representation of this |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static void resetAllGenuses()
public static BlockGenus getGenusWithName(java.lang.String name)
name
- the name of the desired BlockGenus
public java.util.List<java.lang.String> getSiblingsList()
public boolean hasSiblings()
public java.lang.Iterable<java.lang.String> getStubList()
public boolean hasStubs()
public boolean hasDefaultArgs()
public boolean isCommandBlock()
public boolean isDataBlock()
public boolean isFunctionBlock()
public boolean isVariableDeclBlock()
public boolean isProcedureDeclBlock()
public boolean isProcedureParamBlock()
public boolean isDeclaration()
public boolean isListRelated()
public boolean hasBeforeConnector()
public boolean hasAfterConnector()
public boolean isLabelValue()
public boolean isLabelEditable()
public boolean isPageLabelSetByPage()
public boolean labelMustBeUnique()
public boolean areSocketsExpandable()
public boolean isInfix()
public java.lang.String getGenusName()
public java.lang.String getInitialLabel()
public java.lang.String getLabelPrefix()
public java.lang.String getLabelSuffix()
public java.lang.String getBlockDescription()
public java.lang.Iterable<java.lang.String> getInitialArgumentDescriptions()
public java.awt.Color getColor()
public java.util.Map<BlockImageIcon.ImageLocation,BlockImageIcon> getInitBlockImageMap()
public java.lang.String getProperty(java.lang.String property)
property
- the property to look up
public java.lang.Iterable<BlockConnector> getInitSockets()
public BlockConnector getInitPlug()
public BlockConnector getInitBefore()
public BlockConnector getInitAfter()
public java.util.List<java.util.List<BlockConnector>> getExpandGroups()
public static void loadBlockGenera(org.w3c.dom.Element root)
root
- the Element carrying the specifications of the BlockGenusespublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |