java.lang.Object
com.virtuosotechnologies.lib.basiccommand.builder.AbstractBuilderNode
com.virtuosotechnologies.lib.basiccommand.builder.AbstractElementBuilderNode
- All Implemented Interfaces:
- java.util.EventListener, com.virtuosotechnologies.lib.propertyset.PropertySetListener
- Direct Known Subclasses:
- AbstractSwingButtonBuilderNode, ComboBoxMemberBuilderNode, MenuBarGlueBuilderNode, MenuSeparatorBuilderNode, SimpleLabelBuilderNode, ToolBarSeparatorBuilderNode
- public abstract class AbstractElementBuilderNode
- extends AbstractBuilderNode
A skeletal builder that creates a single leaf object with no children.
This needs to be subclassed to implement createInitialElement(), and/or
to pass an element into the constructor. Also note that this builder
registers itself as a PropertySetListener on the CommandNode, so
subclasses do not need to do so again.
A lot of this implementaiton is identical to
AbstractContainerElementBuilderNode, but alas, Java lacks multiple
implementation inheritance.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
element_
private java.lang.Object element_
AbstractElementBuilderNode
protected AbstractElementBuilderNode(com.virtuosotechnologies.lib.command.CommandNode commandNode,
AbstractBranchBuilderNode parent,
int index)
- Constructor
AbstractElementBuilderNode
protected AbstractElementBuilderNode(com.virtuosotechnologies.lib.command.CommandNode commandNode,
AbstractBranchBuilderNode parent,
int index,
java.lang.Object element)
- Constructor
getCardinality
protected final int getCardinality()
- Get the cardinality (number of swing objects this node represents).
Most things have a cardinality of 1. Groups have variable cardinality.
- Specified by:
getCardinality in class AbstractBuilderNode
setElement
protected final void setElement(java.lang.Object element)
- Change the element
getElement
protected final java.lang.Object getElement()
- Get the element
hiddenStateChanged
protected void hiddenStateChanged(boolean nowHidden)
- The hidden state has changed.
- Specified by:
hiddenStateChanged in class AbstractBuilderNode
disabledStateChanged
protected void disabledStateChanged(boolean nowDisabled)
- The disabled state has changed.
- Specified by:
disabledStateChanged in class AbstractBuilderNode
createInitialElement
protected abstract java.lang.Object createInitialElement()
- Override this method to create the initial element object.