## 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( String propertyName, java.beans.PropertyChangeListener listener ) → void [view source]
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void [view source]

## 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( ) → String [view source]
removePropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void [view source]
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void [view source]
setId( String id ) → void [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

syncTo( org.autoplot.dom.DomNode n, java.util.List exclude ) → void

Bulk assignment of properties, but allow specification of properties to exclude. Note exclude should be passed to children when this is overriden, normally to exclude id property.

### Parameters

n - a DomNode
exclude - a java.util.List

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]
toString( ) → String [view source]