|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtuosotechnologies.lib.basiccommand.builder.AbstractBuilderNode
com.virtuosotechnologies.lib.basiccommand.builder.AbstractBranchBuilderNode
A skeletal implementation for builder nodes with children. Provides accessors for children as well as position finding. Subclasses need to implement createChildNode() to create child nodes corresponding to child CommandNodes. Subclasses also need to implement the add/set/removeElements methods, as well as getCardinality().
Field Summary |
Fields inherited from class com.virtuosotechnologies.lib.basiccommand.builder.AbstractBuilderNode |
END_POSITION |
Fields inherited from interface com.virtuosotechnologies.lib.command.CommandNodeListener |
ALL_CHILDREN_REMOVED_METHOD, CHILD_ADDED_METHOD, CHILD_REMOVED_METHOD |
Fields inherited from interface com.virtuosotechnologies.lib.container.PropertySetListener |
PROPERTYSET_CHANGED_METHOD |
Constructor Summary | |
protected |
AbstractBranchBuilderNode(CommandNode commandNode,
AbstractBranchBuilderNode parent,
int index)
Constructor |
Method Summary | |
protected abstract void |
addElementAt(int pos,
Object element)
Override this to insert a element at a position. |
void |
allChildrenRemoved(AllChildrenRemovedEvent ev)
All children removed. |
protected void |
buildChildren()
Build children. |
void |
childAdded(ChildAddedEvent ev)
Child added. |
void |
childRemoved(ChildRemovedEvent ev)
Child removed. |
protected abstract AbstractBuilderNode |
createChildNode(CommandNode cn,
int index)
Create a child node. |
protected AbstractBuilderNode |
getChild(CommandNode cn)
Get a child given a CommandNode |
protected AbstractBuilderNode |
getChild(int index)
Get a child given an index |
protected List |
getChildren()
Get an unmodifiable view of the list of children |
protected int |
getNumChildren()
Get number of children |
protected int |
getPosition(AbstractBuilderNode child)
Get the starting position of a particular child |
protected int |
getPosition(int index)
Get the starting position at a particular index |
protected abstract void |
removeAllElements()
Override this to remove all child elements. |
protected void |
removeChildElements(AbstractBuilderNode child)
Helper method that removes elements within the specified child's area of influence (position and cardinality) |
protected abstract void |
removeElementAt(int pos)
Override this to remove an indexed element. |
protected void |
setElementAt(int pos,
Object element)
Override this to set the element at a position. |
Methods inherited from class com.virtuosotechnologies.lib.basiccommand.builder.AbstractBuilderNode |
decGrayLevel, decMaskLevel, disabledStateChanged, dump, getCardinality, getCommandNode, getParent, hiddenStateChanged, incGrayLevel, incMaskLevel, isDisabled, isHidden, propertySetChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractBranchBuilderNode(CommandNode commandNode, AbstractBranchBuilderNode parent, int index)
Method Detail |
protected final void buildChildren()
protected final int getPosition(AbstractBuilderNode child)
protected final int getPosition(int index)
protected final AbstractBuilderNode getChild(int index)
protected final AbstractBuilderNode getChild(CommandNode cn)
protected final int getNumChildren()
protected final List getChildren()
protected final void removeChildElements(AbstractBuilderNode child)
protected abstract AbstractBuilderNode createChildNode(CommandNode cn, int index)
protected abstract void addElementAt(int pos, Object element)
protected void setElementAt(int pos, Object element)
protected abstract void removeElementAt(int pos)
protected abstract void removeAllElements()
public void childAdded(ChildAddedEvent ev)
childAdded
in interface CommandNodeListener
public void childRemoved(ChildRemovedEvent ev)
childRemoved
in interface CommandNodeListener
public void allChildrenRemoved(AllChildrenRemovedEvent ev)
allChildrenRemoved
in interface CommandNodeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |