## org.autoplot.dom.DomNodeController

Base class for controller objects that are responsible for managing a node.

## DomNodeController( org.autoplot.dom.DomNode node )

## 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 [view source]

## changePerformed

changePerformed( Object client, Object lockObject ) → void

the change is complete, and as far as the client is concerned, the canvas is valid.

### Parameters

client - the object that is mutating the bean.
lockObject - an object identifying the change.

### Returns:

void (returns nothing)

### See Also:

registerPendingChange(java.lang.Object, java.lang.Object)
performingChange(java.lang.Object, java.lang.Object)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getController

getController( org.autoplot.dom.DomNode n ) → org.autoplot.dom.DomNodeController

return the controller for the node, if it exists. This appeared to take a significant amount of time using introspection, so was recoded. Note this is much faster, but it's trivial either way and this runs the risk of a future new node not being handled. (Test on 2016-03-14 showed 1e6 invocations of with introspection took ~700ms, while this took 7ms.)

### Parameters

n - the node

### Returns:

the controller or null.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isPendingChanges

isPendingChanges( ) → boolean

Some sort of processing is going on, so wait until idle.

### Returns:

true if there are changes pending.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isValueAdjusting

isValueAdjusting( ) → boolean

the application state is rapidly changing.

### Returns:

a boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## mutatorLock

mutatorLock( ) → org.autoplot.dom.ChangesSupport.DomLock

lock the node so that others cannot modify it. Call the lock object's lock method with a name for the operation, then unlock it when the operation is complete. A try/finally block should be used in case exceptions occur, otherwise the application will be left in an unusable state! `DomLock lock = dom.controller.mutatorLock(); lock.lock( "Sync to Application" ); do atomic operation... lock.unlock()`

### Returns:

an org.autoplot.dom.ChangesSupport.DomLock
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pendingChanges

pendingChanges( java.util.Map changes ) → void

return a list of all the pending changes. These are returned in a Map that goes from pending change to change manager. Note this will recurse through all the children, so to see pending changes for the application, just call this on its controller.

### Parameters

changes - a Map to which the changes will be added.

### Returns:

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

## performingChange

performingChange( Object client, Object lockObject ) → void

performingChange tells that the change is about to be performed. This is a place holder in case we use a mutator lock, but currently does nothing. If the change has not been registered, it will be registered implicitly.

### Parameters

client - the object that is mutating the bean.
lockObject - an object identifying the change.

### Returns:

void (returns nothing)

### See Also:

registerPendingChange(java.lang.Object, java.lang.Object)
changePerformed(java.lang.Object, java.lang.Object)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## printStats

printStats( ) → void

### Returns:

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

## registerPendingChange

registerPendingChange( Object client, Object lockObject ) → void

the client knows a change will be coming, and the canvas' clients should know that its current state will change soon. Example pending changes would be: layout because tick labels are changing data is loading

### Parameters

client - the object that will perform the change. This allows the canvas (and developers) identify who has registered the change.
lockObject - object identifying the change.

### Returns:

void (returns nothing)

### See Also:

performingChange(java.lang.Object, java.lang.Object)
changePerformed(java.lang.Object, java.lang.Object)
[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 [view source]