syn3d.data
Class PropertyData

java.lang.Object
  extended by syn3d.data.SceneGraphData
      extended by syn3d.data.SceneGraphDoubleData
          extended by syn3d.data.PropertyData
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, DataSourceListener, EndNotificationListener

public class PropertyData
extends SceneGraphDoubleData
implements java.lang.Cloneable, java.io.Serializable

This class manages a multi-dimensional data related to a node (a property)

Author:
ogor
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class syn3d.data.SceneGraphData
SceneGraphData.SourceHolder
 
Field Summary
protected  java.lang.String dataName
           
protected  java.lang.String[] elementNames
           
protected  TransformGroupNode node
           
protected  double[] vData
           
 
Fields inherited from class syn3d.data.SceneGraphDoubleData
params
 
Fields inherited from class syn3d.data.SceneGraphData
delegateListener, editable, sources
 
Constructor Summary
PropertyData(TransformGroupNode node, java.lang.String dataName, java.lang.String[] elementNames)
           
 
Method Summary
 java.lang.Object clone()
           
 void DataSourceIndexRangeChanged(DataSource ds, long startIndex, long lastIndex)
          Called when the range of valid index changed
 void DataSourceValueChanged(DataSource ds, long minIndex, long maxIndex)
          Called when at least a value changed in the data source.
 double[] getDoubleProperties()
           
 java.lang.String getName()
           
 java.lang.String getName(int index)
           
 void init()
          Initialize data with the node current values
 void restoreProperty(TransformGroupNode node)
           
 void updateFrom(SceneGraphData dataCopy)
          Inverse operation from clone() Update this data from the content of another one
 void updateValues()
           
 
Methods inherited from class syn3d.data.SceneGraphDoubleData
apply, dispose, getValue, set, setValue
 
Methods inherited from class syn3d.data.SceneGraphData
DataSourceInfoChanged, DataSourceOrderChanged, DataSourceReplaced, DataSourceValueRangeChanged, getDataSource, getDelegateListener, isEditable, length, notificationEnd, removeSceneGraphData, setDataSource, setDelegateListener, setEditable
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected transient TransformGroupNode node

dataName

protected java.lang.String dataName

vData

protected double[] vData

elementNames

protected java.lang.String[] elementNames
Constructor Detail

PropertyData

public PropertyData(TransformGroupNode node,
                    java.lang.String dataName,
                    java.lang.String[] elementNames)
Method Detail

restoreProperty

public void restoreProperty(TransformGroupNode node)

getName

public java.lang.String getName()
Returns:
the name of the property

getName

public java.lang.String getName(int index)
Parameters:
index -
Returns:
the element of the property related to the index

getDoubleProperties

public double[] getDoubleProperties()

init

public void init()
Description copied from class: SceneGraphData
Initialize data with the node current values

Specified by:
init in class SceneGraphData

updateValues

public void updateValues()

updateFrom

public void updateFrom(SceneGraphData dataCopy)
Description copied from class: SceneGraphData
Inverse operation from clone() Update this data from the content of another one

Overrides:
updateFrom in class SceneGraphDoubleData

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class SceneGraphDoubleData
Throws:
java.lang.CloneNotSupportedException

DataSourceIndexRangeChanged

public void DataSourceIndexRangeChanged(DataSource ds,
                                        long startIndex,
                                        long lastIndex)
Description copied from interface: DataSourceListener
Called when the range of valid index changed

Specified by:
DataSourceIndexRangeChanged in interface DataSourceListener
Overrides:
DataSourceIndexRangeChanged in class SceneGraphDoubleData
Parameters:
ds - The data source that changed
startIndex - The new start Index
lastIndex - The new last index

DataSourceValueChanged

public void DataSourceValueChanged(DataSource ds,
                                   long minIndex,
                                   long maxIndex)
Description copied from interface: DataSourceListener
Called when at least a value changed in the data source. The listener shall then get the values in the given range again, if it is interested by the values in that range.

Specified by:
DataSourceValueChanged in interface DataSourceListener
Overrides:
DataSourceValueChanged in class SceneGraphDoubleData
Parameters:
ds - The data source that changed
minIndex - Lower bound of the range where values changed
maxIndex - Higher bound of the range where values changed