Package edu.uci.ics.jung.visualization
Interface VisualizationModel<V,E>
-
- All Superinterfaces:
ChangeEventSupport
- All Known Implementing Classes:
DefaultVisualizationModel
public interface VisualizationModel<V,E> extends ChangeEventSupport
Interface for the state holding model of the VisualizationViewer. Refactored and extracted from the 1.6.0 version of VisualizationViewer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChangeListener(javax.swing.event.ChangeListener l)Registerlas a listeners to changes in the model.javax.swing.event.ChangeListener[]getChangeListeners()Returns an array of all theChangeListeners added with addChangeListener().edu.uci.ics.jung.algorithms.layout.Layout<V,E>getGraphLayout()Returns the current graph layout.edu.uci.ics.jung.algorithms.layout.util.RelaxergetRelaxer()voidremoveChangeListener(javax.swing.event.ChangeListener l)Removes a ChangeListener.voidsetGraphLayout(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)set the graph LayoutvoidsetGraphLayout(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, java.awt.Dimension d)Sets the graph Layout and initialize the Layout size to the passed dimensions.-
Methods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport
fireStateChanged
-
-
-
-
Method Detail
-
getRelaxer
edu.uci.ics.jung.algorithms.layout.util.Relaxer getRelaxer()
-
setGraphLayout
void setGraphLayout(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)
set the graph Layout- Parameters:
layout-
-
setGraphLayout
void setGraphLayout(edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, java.awt.Dimension d)
Sets the graph Layout and initialize the Layout size to the passed dimensions. The passed Dimension will often be the size of the View that will display the graph.- Parameters:
layout-d-
-
getGraphLayout
edu.uci.ics.jung.algorithms.layout.Layout<V,E> getGraphLayout()
Returns the current graph layout.
-
addChangeListener
void addChangeListener(javax.swing.event.ChangeListener l)
Registerlas a listeners to changes in the model. The View registers in order to repaint itself when the model changes.- Specified by:
addChangeListenerin interfaceChangeEventSupport
-
removeChangeListener
void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.- Specified by:
removeChangeListenerin interfaceChangeEventSupport- Parameters:
l- the listener to be removed
-
getChangeListeners
javax.swing.event.ChangeListener[] getChangeListeners()
Returns an array of all theChangeListeners added with addChangeListener().- Specified by:
getChangeListenersin interfaceChangeEventSupport- Returns:
- all of the
ChangeListeners added or an empty array if no listeners have been added
-
-