Oculus Layout System API Documentation
November 25, 2002

com.oculustech.layout
Interface DynamicallyPropertiedComponent

All Known Implementing Classes:
OculusBox

public interface DynamicallyPropertiedComponent

Implements a generic system for dynamically determining properties of a component with accumulation (parents aggregate properties from children components, but can override), and/or with inheritance (children inherit properties from parents, but can override).


Method Summary
 java.lang.Object aggregateDynamicPropertyValues(java.lang.String prop, java.lang.Object value1, java.lang.Object value2)
          This function is used to aggregate values of the given property when computing the value of accumulated properties.
 void debugOutputNodesDefiningProperty(java.lang.String prop)
          Dump this.toString() to System.err for nodes who define given property.
 void dynamicallyAccumulatedPropertyChanged(java.lang.String prop)
          Called to notify parents when one of their descendants changes the accumulated property.
 void dynamicallyInheritedPropertyChanged(java.lang.String prop)
          Called to notify children when one of their ancestors changes a inherited property.
 java.lang.Object getDynamicallyAccumulatedProperty(java.lang.String prop)
          Get the value of the accumulated property, by starting aggregation from this node and recursing down through its children.
 java.lang.Object getDynamicallyAccumulatedPropertyFromRoot(java.lang.String prop)
          Get the value of the accumulated property as seen from the root of the tree.
 java.lang.Object getDynamicallyInheritedProperty(java.lang.String prop)
          Gets the given inherited property starting at this node and recursing up through the parents.
 DynamicallyPropertiedComponent getDynamicallyPropertiedChild(int index)
          Return a specific DynamicallyPropertiedComponent child
 int getDynamicallyPropertiedChildrenCount()
          Return the number of DynamicallyPropertiedComponent children
 DynamicallyPropertiedComponent getDynamicallyPropertiedParent()
          Return the parent DynamicallyPropertiedComponent
 DynamicallyPropertiedComponent getDynamicallyPropertiedRoot()
          Return the root of the DynamicallyPropertiedComponent tree
 java.lang.Object getLocalDynamicallyAccumulatedProperty(java.lang.String prop)
          Get the value of the dynamically accumulated property of the given name that was set on this node.
 java.lang.Object getLocalDynamicallyInheritedProperty(java.lang.String prop)
          Get the value of the inherited property of the given name that was set on this node.
 void setDynamicallyAccumulatedProperty(java.lang.String prop, java.lang.Object value)
          Set the given accumulated property to the given value at this node.
 void setDynamicallyInheritedProperty(java.lang.String prop, java.lang.Object value)
          Sets the given inherited property to the given value at this node, and then notifies the children of the change via their dynamicallyInheritedPropertyChanged() method.
 

Method Detail

getDynamicallyPropertiedParent

public DynamicallyPropertiedComponent getDynamicallyPropertiedParent()
Return the parent DynamicallyPropertiedComponent

getDynamicallyPropertiedChildrenCount

public int getDynamicallyPropertiedChildrenCount()
Return the number of DynamicallyPropertiedComponent children

getDynamicallyPropertiedChild

public DynamicallyPropertiedComponent getDynamicallyPropertiedChild(int index)
Return a specific DynamicallyPropertiedComponent child

getDynamicallyPropertiedRoot

public DynamicallyPropertiedComponent getDynamicallyPropertiedRoot()
Return the root of the DynamicallyPropertiedComponent tree

setDynamicallyAccumulatedProperty

public void setDynamicallyAccumulatedProperty(java.lang.String prop,
                                              java.lang.Object value)
Set the given accumulated property to the given value at this node. Parents will be notified that there has been a change via their dynamicallyAccumulatedPropertyChanged() method.

getDynamicallyAccumulatedProperty

public java.lang.Object getDynamicallyAccumulatedProperty(java.lang.String prop)
Get the value of the accumulated property, by starting aggregation from this node and recursing down through its children. Returns null if the property is undefined. If null is passed, indicates that many properties have changed, or that unknown properties have changed.

getDynamicallyAccumulatedPropertyFromRoot

public java.lang.Object getDynamicallyAccumulatedPropertyFromRoot(java.lang.String prop)
Get the value of the accumulated property as seen from the root of the tree. (Merely calls getDynamicallyPropertiedRoot().getDynamicallyAccumulatedProperty(prop)).

getLocalDynamicallyAccumulatedProperty

public java.lang.Object getLocalDynamicallyAccumulatedProperty(java.lang.String prop)
Get the value of the dynamically accumulated property of the given name that was set on this node. (Gets only those properties set on this node; Does not accumulate from children).

dynamicallyAccumulatedPropertyChanged

public void dynamicallyAccumulatedPropertyChanged(java.lang.String prop)
Called to notify parents when one of their descendants changes the accumulated property.

aggregateDynamicPropertyValues

public java.lang.Object aggregateDynamicPropertyValues(java.lang.String prop,
                                                       java.lang.Object value1,
                                                       java.lang.Object value2)
This function is used to aggregate values of the given property when computing the value of accumulated properties. Either or both value1 and value2 may be null. This function should be implemented in an inheritance-style fashion: if this node has a parent, calls to aggregate should be delegated to the parent, unless this node explicitly wishes to override default behaviour. The root should always provide a reasonable default implementation of this property.

setDynamicallyInheritedProperty

public void setDynamicallyInheritedProperty(java.lang.String prop,
                                            java.lang.Object value)
Sets the given inherited property to the given value at this node, and then notifies the children of the change via their dynamicallyInheritedPropertyChanged() method.

getDynamicallyInheritedProperty

public java.lang.Object getDynamicallyInheritedProperty(java.lang.String prop)
Gets the given inherited property starting at this node and recursing up through the parents. Returns null if undefined.

getLocalDynamicallyInheritedProperty

public java.lang.Object getLocalDynamicallyInheritedProperty(java.lang.String prop)
Get the value of the inherited property of the given name that was set on this node. (Gets only those properties set on this node; Does not inherit from ancestors).

dynamicallyInheritedPropertyChanged

public void dynamicallyInheritedPropertyChanged(java.lang.String prop)
Called to notify children when one of their ancestors changes a inherited property. This function should recurse down the tree notifying this nodes children of the change IF this node doesn't override the change. If null is passed, indicates that many properties have changed, or that unknown properties have changed.

debugOutputNodesDefiningProperty

public void debugOutputNodesDefiningProperty(java.lang.String prop)
Dump this.toString() to System.err for nodes who define given property. Recurses down through children.

Oculus Layout System API Documentation
November 25, 2002

Copyright 2001-2002 Oculus Technologies Corporation. 103 Broad Street, 5th Floor,
Boston, Massachusetts, 02110, U.S.A. All Rights Reserved.