| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.visualization.DefaultVisualizationModel<V,E>
public class DefaultVisualizationModel<V,E>
The model containing state values for visualizations of graphs. Refactored and extracted from the 1.6.0 version of VisualizationViewer
| Field Summary | |
|---|---|
protected  ChangeListener | 
changeListener
listens for changes in the layout, forwards to the viewer  | 
protected  Layout<V,E> | 
layout
the layout algorithm currently in use  | 
protected  Relaxer | 
relaxer
manages the thread that applies the current layout algorithm  | 
| Constructor Summary | |
|---|---|
DefaultVisualizationModel(Layout<V,E> layout)
 | 
|
DefaultVisualizationModel(Layout<V,E> layout,
                          Dimension d)
 | 
|
| Method Summary | |
|---|---|
 void | 
addChangeListener(ChangeListener l)
Adds a ChangeListener. | 
 void | 
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type.  | 
 ChangeListener[] | 
getChangeListeners()
Returns an array of all the ChangeListeners added
 with addChangeListener(). | 
 Layout<V,E> | 
getGraphLayout()
Returns the current graph layout.  | 
 Relaxer | 
getRelaxer()
 | 
 void | 
removeChangeListener(ChangeListener l)
Removes a ChangeListener.  | 
 void | 
setGraphLayout(Layout<V,E> layout)
set the graph Layout and if it is not already initialized, initialize it to the default VisualizationViewer preferred size of 600x600  | 
 void | 
setGraphLayout(Layout<V,E> layout,
               Dimension viewSize)
Removes the current graph layout, and adds a new one.  | 
 void | 
setRelaxer(VisRunner relaxer)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Relaxer relaxer
protected Layout<V,E> layout
protected ChangeListener changeListener
| Constructor Detail | 
|---|
public DefaultVisualizationModel(Layout<V,E> layout)
layout - The Layout to apply, with its associated Graph
public DefaultVisualizationModel(Layout<V,E> layout,
                                 Dimension d)
layout - d - The preferred size of the View that will display this graph| Method Detail | 
|---|
public void setGraphLayout(Layout<V,E> layout,
                           Dimension viewSize)
setGraphLayout in interface VisualizationModel<V,E>layout - the new layout to useviewSize - the size of the View that will display this layoutpublic void setGraphLayout(Layout<V,E> layout)
setGraphLayout in interface VisualizationModel<V,E>public Layout<V,E> getGraphLayout()
getGraphLayout in interface VisualizationModel<V,E>public Relaxer getRelaxer()
getRelaxer in interface VisualizationModel<V,E>public void setRelaxer(VisRunner relaxer)
relaxer - the relaxer to setpublic void addChangeListener(ChangeListener l)
ChangeListener.
addChangeListener in interface ChangeEventSupportaddChangeListener in interface VisualizationModel<V,E>l - the listener to be addedpublic void removeChangeListener(ChangeListener l)
removeChangeListener in interface ChangeEventSupportremoveChangeListener in interface VisualizationModel<V,E>l - the listener to be removedpublic ChangeListener[] getChangeListeners()
ChangeListeners added
 with addChangeListener().
getChangeListeners in interface ChangeEventSupportgetChangeListeners in interface VisualizationModel<V,E>ChangeListeners added or an empty
         array if no listeners have been addedpublic void fireStateChanged()
fireStateChanged in interface ChangeEventSupportEventListenerList
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||