edu.uci.ics.jung.visualization3d.layout
Class LayoutEventBroadcaster<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.visualization3d.layout.LayoutDecorator<V,E>
      extended by edu.uci.ics.jung.visualization3d.layout.LayoutEventBroadcaster<V,E>
All Implemented Interfaces:
Layout<V,E>, IterativeContext, ChangeEventSupport, org.apache.commons.collections15.Transformer<V,javax.vecmath.Point3f>

public class LayoutEventBroadcaster<V,E>
extends LayoutDecorator<V,E>
implements ChangeEventSupport

A LayoutDecorator the fires ChangeEvents when certain methods are called. Used to wrap a Layout so that the visualization components can be notified of changes.

Author:
Tom Nelson
See Also:
LayoutDecorator

Field Summary
protected  ChangeEventSupport changeSupport
           
 
Fields inherited from class edu.uci.ics.jung.visualization3d.layout.LayoutDecorator
delegate
 
Constructor Summary
LayoutEventBroadcaster(Layout<V,E> delegate)
           
 
Method Summary
 void addChangeListener(ChangeListener l)
           
 void fireStateChanged()
           
 ChangeListener[] getChangeListeners()
          Returns an array of all the ChangeListeners added with addChangeListener().
 void initialize()
          Initializes fields in the node that may not have been set during the constructor.
 void removeChangeListener(ChangeListener l)
          Removes a ChangeListener.
 void setGraph(Graph<V,E> graph)
          setter for graph
 void setLocation(V v, javax.vecmath.Point3f location)
          set the location of a vertex
 void step()
          Advances one step.
 
Methods inherited from class edu.uci.ics.jung.visualization3d.layout.LayoutDecorator
done, getDelegate, getGraph, getSize, isLocked, lock, reset, setDelegate, setInitializer, setSize, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeSupport

protected ChangeEventSupport changeSupport
Constructor Detail

LayoutEventBroadcaster

public LayoutEventBroadcaster(Layout<V,E> delegate)
Method Detail

step

public void step()
Description copied from interface: IterativeContext
Advances one step.

Specified by:
step in interface IterativeContext
Overrides:
step in class LayoutDecorator<V,E>
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#step()

initialize

public void initialize()
Description copied from interface: Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.

Specified by:
initialize in interface Layout<V,E>
Overrides:
initialize in class LayoutDecorator<V,E>
See Also:
Layout.initialize()

setLocation

public void setLocation(V v,
                        javax.vecmath.Point3f location)
Description copied from interface: Layout
set the location of a vertex

Specified by:
setLocation in interface Layout<V,E>
Overrides:
setLocation in class LayoutDecorator<V,E>
Parameters:
v -
location -
See Also:
Layout.setLocation(java.lang.Object, java.awt.geom.Point2D)

addChangeListener

public void addChangeListener(ChangeListener l)
Specified by:
addChangeListener in interface ChangeEventSupport

removeChangeListener

public void removeChangeListener(ChangeListener l)
Description copied from interface: ChangeEventSupport
Removes a ChangeListener.

Specified by:
removeChangeListener in interface ChangeEventSupport
Parameters:
l - the listener to be removed

getChangeListeners

public ChangeListener[] getChangeListeners()
Description copied from interface: ChangeEventSupport
Returns an array of all the ChangeListeners added with addChangeListener().

Specified by:
getChangeListeners in interface ChangeEventSupport
Returns:
all of the ChangeListeners added or an empty array if no listeners have been added

fireStateChanged

public void fireStateChanged()
Specified by:
fireStateChanged in interface ChangeEventSupport

setGraph

public void setGraph(Graph<V,E> graph)
Description copied from interface: Layout
setter for graph

Specified by:
setGraph in interface Layout<V,E>
Overrides:
setGraph in class LayoutDecorator<V,E>


Copyright © 2009. All Rights Reserved.