maspack.properties
Class TestNode

java.lang.Object
  extended by maspack.properties.TestNode
All Implemented Interfaces:
HasProperties, HierarchyNode

public class TestNode
extends java.lang.Object
implements HierarchyNode, HasProperties

Artificial property-containing class used for testing.


Field Summary
static PropertyList myProps
           
 
Constructor Summary
TestNode(java.lang.String name)
           
 
Method Summary
 void addChild(TestNode node)
           
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 java.util.Iterator<TestNode> getChildren()
           
 java.lang.String getName()
           
 TestNode getParent()
           
 Property getProperty(java.lang.String name)
          Returns a property associated with a specified path name.
 java.lang.Object getPropertyValue(java.lang.String name)
           
 double getRand()
           
 TestRenderInfo getRenderInfo()
           
 int getStyle()
           
 PropertyMode getStyleMode()
           
 boolean hasChildren()
           
 void removeChild(TestNode node)
           
 void setName(java.lang.String name)
           
 void setPropertyValue(java.lang.String name, java.lang.Object value)
           
 void setRenderInfo(TestRenderInfo info)
           
 void setStyle(int style)
           
 void setStyleMode(PropertyMode mode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myProps

public static PropertyList myProps
Constructor Detail

TestNode

public TestNode(java.lang.String name)
Method Detail

getAllPropertyInfo

public PropertyList getAllPropertyInfo()
Description copied from interface: HasProperties
Returns a list giving static information about all properties exported by this object.

Specified by:
getAllPropertyInfo in interface HasProperties
Returns:
static information for all exported properties

getProperty

public Property getProperty(java.lang.String name)
Description copied from interface: HasProperties
Returns a property associated with a specified path name. All properties exported by this object must have a name which is a valid Java identifier. Specifying one of these names causes the corresponding Property to be returned. Handles to sub-properties can also be obtained by delimiting the sub-property name(s) by '.' characters. A sub-property exists if the value of a property is itself an object which exports properties. It is only possible to obtain a sub-property handle if each of its ancestor properties exports their values by reference.

Specified by:
getProperty in interface HasProperties
Parameters:
name - name of the desired property or sub-property
Returns:
handle to the property

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)

setPropertyValue

public void setPropertyValue(java.lang.String name,
                             java.lang.Object value)

getRand

public double getRand()

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

getStyle

public int getStyle()

setStyle

public void setStyle(int style)

getStyleMode

public PropertyMode getStyleMode()

setStyleMode

public void setStyleMode(PropertyMode mode)

getParent

public TestNode getParent()
Specified by:
getParent in interface HierarchyNode

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in interface HierarchyNode

getChildren

public java.util.Iterator<TestNode> getChildren()
Specified by:
getChildren in interface HierarchyNode

removeChild

public void removeChild(TestNode node)

addChild

public void addChild(TestNode node)

getRenderInfo

public TestRenderInfo getRenderInfo()

setRenderInfo

public void setRenderInfo(TestRenderInfo info)