torero.gui
Class GrammarRoot
java.lang.Object
|
+--torero.gui.GrammarNode
|
+--torero.gui.GrammarRoot
- All Implemented Interfaces:
- TreeNode
- public class GrammarRoot
- extends GrammarNode
A special implementation for a GrammarNode which is a Root Node. For detailed class description
see the GrammarNode class.
Only the overwritten method are documented in this class.
- See Also:
GrammarNode
Methods inherited from class torero.gui.GrammarNode |
ACDCacheInit, checkIfChildSource, children, clearDestLookupCache, getACDPos, getACDSize, getAllDests, getAllowsChildren, getAttribHeigh, getAttribPosY, getAttributeCellDataArray, getAttributeGrammar, getAttribWidth, getChildAt, getChildCount, getDerivat, getDestCnt, getIndex, getListElement, getNodeWidth, getParent, getselectedAttrib, getSources, getSymbolHeigh, isLeaf, NodeInit, processMouseEvent, setAttribHeight, setAttribWidth, setNodeWidth, setSymbolHeight, toString |
GrammarRoot
public GrammarRoot(AttributeGrammar ag,
Derivat rootderivat)
- Creates a new GrammarRoot.
- Parameters:
ag
- a reference to the attribute grammarrootderivat
- this node can be expanded by using this derivat
isRoot
public boolean isRoot()
- Check if this is a Root Node.
- Overrides:
isRoot
in class GrammarNode
- Following copied from class:
torero.gui.GrammarNode
- See Also:
GrammarRoot
getItsSubDerivation
public Derivat getItsSubDerivation()
- Note that the subderivation of a Root Node is the same as it's derivat.
Therefore this method's returns getDerivat().
- Overrides:
getItsSubDerivation
in class GrammarNode
- Returns:
- getDerivat()
- See Also:
GrammarNode
checkIfParentSource
protected void checkIfParentSource()
- Is an emtpy implementation for the Root Node.
- Overrides:
checkIfParentSource
in class GrammarNode
checkIfSiblingSource
protected GrammarNode checkIfSiblingSource(GrammarNode mgtn)
- Calls checkIfSelfTraversalSourde() because a root node cannot have "siblings".
- Overrides:
checkIfSiblingSource
in class GrammarNode
- Parameters:
mgtn
- has to be this.- Returns:
- mgtn
checkIfSelfTraversalSource
protected void checkIfSelfTraversalSource()
- For every assignment (with destination of type traversal) from the node to itself (this), it put's an entry in the destination lookup chache.
- Overrides:
checkIfSelfTraversalSource
in class GrammarNode