com.virtuosotechnologies.lib.basiccommand.builder
Class AbstractBuilderNode

java.lang.Object
  extended bycom.virtuosotechnologies.lib.basiccommand.builder.AbstractBuilderNode
All Implemented Interfaces:
EventListener, PropertySetListener
Direct Known Subclasses:
AbstractBranchBuilderNode, AbstractElementBuilderNode

public abstract class AbstractBuilderNode
extends Object
implements PropertySetListener

A skeletal implementation for builder nodes. Note that this builder registers itself as a PropertySetListener on the CommandNode, so subclasses do not need to do so again.


Field Summary
protected static int END_POSITION
           
 
Fields inherited from interface com.virtuosotechnologies.lib.container.PropertySetListener
PROPERTYSET_CHANGED_METHOD
 
Constructor Summary
protected AbstractBuilderNode(CommandNode commandNode, AbstractBranchBuilderNode parent, int index)
          Constructor
 
Method Summary
protected  void decGrayLevel()
          Decrement the gray level
protected  void decMaskLevel()
          Decrement the mask level
protected abstract  void disabledStateChanged(boolean nowDisabled)
          The gray state has changed.
static void dump(AbstractBuilderNode node)
          Dump subgraph to standard error
protected abstract  int getCardinality()
          Get the cardinality (number of swing objects this node represents).
protected  CommandNode getCommandNode()
          Return the command node
protected  AbstractBranchBuilderNode getParent()
          Return the parent
protected abstract  void hiddenStateChanged(boolean nowHidden)
          The hidden state has changed.
protected  void incGrayLevel()
          Increment the gray level
protected  void incMaskLevel()
          Increment the mask level
protected  boolean isDisabled()
          Get the grayed state
protected  boolean isHidden()
          Get the hidden state
 void propertySetChanged(PropertySetEvent ev)
          Model changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

END_POSITION

protected static final int END_POSITION
See Also:
Constant Field Values
Constructor Detail

AbstractBuilderNode

protected AbstractBuilderNode(CommandNode commandNode,
                              AbstractBranchBuilderNode parent,
                              int index)
Constructor

Method Detail

getParent

protected final AbstractBranchBuilderNode getParent()
Return the parent


getCommandNode

protected final CommandNode getCommandNode()
Return the command node


isHidden

protected final boolean isHidden()
Get the hidden state


isDisabled

protected final boolean isDisabled()
Get the grayed state


incMaskLevel

protected final void incMaskLevel()
Increment the mask level


decMaskLevel

protected final void decMaskLevel()
Decrement the mask level


incGrayLevel

protected final void incGrayLevel()
Increment the gray level


decGrayLevel

protected final void decGrayLevel()
Decrement the gray level


propertySetChanged

public void propertySetChanged(PropertySetEvent ev)
Model changed. If this is overridden, be sure to call the superclass.

Specified by:
propertySetChanged in interface PropertySetListener
Parameters:
ev - more information about the event

hiddenStateChanged

protected abstract void hiddenStateChanged(boolean nowHidden)
The hidden state has changed.


disabledStateChanged

protected abstract void disabledStateChanged(boolean nowDisabled)
The gray state has changed.


getCardinality

protected abstract int getCardinality()
Get the cardinality (number of swing objects this node represents). Most things have a cardinality of 1. Groups have variable cardinality. Containers have a cardinality of 1.


dump

public static void dump(AbstractBuilderNode node)
Dump subgraph to standard error