org.autoplot.dom.DomNode
Autoplot's state is stored in a tree of nodes, with Java types constraining to particular abstractions. Each node
can have children, and implements:
- copy -- make a copy of this node and its children.
- syncTo -- make this node look like another node. (e.g. undo to old state). syncTo can also be told to exclude properties.
- diffs -- show differences between this and another node.
All nodes have the property "id" which must be unique within the tree. Each node has properties of the following types:
- String
- double
- boolean
- Datum
- DatumRange
- Color
- RenderType
- PlotSymbol
- PsymConnector
- Enum
- Connector
- LegendPosition
- AnchorPosition
Any DomNode can be saved and restored using SerializeUtil, which uses Java introspection to look at all the properties.
Some nodes currently have the method "setXAutomatically" where X is a property. This is currently used to indicate who is setting
the property. For example, PlotElement has setComponentAutomatically for use when a slice is set automatically by the application.
This is handled specially in SerializeUtil
DomNode( )
PROP_ID
addPropertyChangeListener
addPropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
Parameters
propertyName - a String
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
boundCount
boundCount( ) → int
try and find the leaks caused by binding...
Returns:
an int
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
childNodes
childNodes( ) → java.util.List
return any child nodes.
Returns:
a java.util.List
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
copy
copy( ) → org.autoplot.dom.DomNode
returns a deep copy of the node.
Returns:
an org.autoplot.dom.DomNode
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
diffs
diffs( org.autoplot.dom.DomNode that ) → java.util.List
return a list of the differences between this and another node. The
differences describe how to mutate that node to make it like this
node.
Parameters
that - a DomNode
Returns:
the list of differences
See Also:
Diff
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getId
getId( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener
removePropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
Parameters
propertyName - a String
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
setId
setId( String id ) → void
Parameters
id - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
syncTo
syncTo( org.autoplot.dom.DomNode n ) → void
bulk assignment of properties. When the node's children differ, then a controller should be used
to implement the sync.
Syncing should include the node's ID.
Parameters
n - a DomNode
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
syncTo( org.autoplot.dom.DomNode n, java.util.List exclude ) → void
toString
toString( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]