Package org.jungrapht.visualization
Interface VisualizationModel<V,E>
-
- Type Parameters:
V- the vertex typeE- the edge type
- All Superinterfaces:
LayoutSizeChange.Listener<V>,LayoutSizeChange.Producer<V>,ModelChange.Listener,ModelChange.Producer,ViewChange.Listener,ViewChange.Producer
- All Known Implementing Classes:
AbstractVisualizationModel
public interface VisualizationModel<V,E> extends ViewChange.Listener, ViewChange.Producer, ModelChange.Listener, ModelChange.Producer, LayoutSizeChange.Listener<V>, LayoutSizeChange.Producer<V>
Interface for the visualization model to hold state information for a graph visualization
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classVisualizationModel.Builder<V,E,T extends VisualizationModel,B extends VisualizationModel.Builder<V,E,T,B>>A builder for creating instances of a VisualizationModel} with user defined propertiesstatic classVisualizationModel.SpatialSupportthe types of spatial data strucure to use with the visualization
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <V,E>
VisualizationModel.Builder<V,E,?,?>builder()static <V,E>
VisualizationModel.Builder<V,E,?,?>builder(org.jgrapht.Graph<V,E> graph)static <V,E>
VisualizationModel.Builder<V,E,?,?>builder(LayoutModel<V> layoutModel)org.jgrapht.Graph<V,E>getGraph()Function<org.jgrapht.Graph<V,?>,Pair<Integer>>getInitialDimensionFunction()LayoutAlgorithm<V>getLayoutAlgorithm()LayoutModel<V>getLayoutModel()DimensiongetLayoutSize()default LayoutSizeChange.Listener<V>getLayoutSizeChangeListener()voidsetGraph(org.jgrapht.Graph<V,E> graph)voidsetGraph(org.jgrapht.Graph<V,E> graph, boolean forceUpdate)voidsetInitialDimensionFunction(Function<org.jgrapht.Graph<V,?>,Pair<Integer>> initialDimensionFunction)voidsetLayoutAlgorithm(LayoutAlgorithm<V> layoutAlgorithm)voidsetLayoutModel(LayoutModel<V> layoutModel)-
Methods inherited from interface org.jungrapht.visualization.layout.event.LayoutSizeChange.Listener
layoutSizeChanged
-
Methods inherited from interface org.jungrapht.visualization.layout.event.LayoutSizeChange.Producer
getLayoutSizeChangeSupport
-
Methods inherited from interface org.jungrapht.visualization.layout.event.ModelChange.Listener
modelChanged
-
Methods inherited from interface org.jungrapht.visualization.layout.event.ModelChange.Producer
getModelChangeSupport
-
Methods inherited from interface org.jungrapht.visualization.layout.event.ViewChange.Listener
viewChanged
-
Methods inherited from interface org.jungrapht.visualization.layout.event.ViewChange.Producer
getViewChangeSupport
-
-
-
-
Method Detail
-
builder
static <V,E> VisualizationModel.Builder<V,E,?,?> builder()
- Type Parameters:
V- vertex typeE- edge type- Returns:
- a Builder to create a VisualizationModel instance
-
builder
static <V,E> VisualizationModel.Builder<V,E,?,?> builder(org.jgrapht.Graph<V,E> graph)
- Type Parameters:
V- the vertex typeE- the edge type- Parameters:
graph- the graph to visualize- Returns:
- a Builder to create a VisualizationModel instance
-
builder
static <V,E> VisualizationModel.Builder<V,E,?,?> builder(LayoutModel<V> layoutModel)
- Type Parameters:
V- the vertex typeE- the edge type- Parameters:
layoutModel- the layout model for the visualization model- Returns:
- a Builder to create a VisualizationModel instance
-
getLayoutSize
Dimension getLayoutSize()
- Returns:
- the current layoutSize of the visualization's space
-
setLayoutAlgorithm
void setLayoutAlgorithm(LayoutAlgorithm<V> layoutAlgorithm)
- Parameters:
layoutAlgorithm- the algorithm to apply to the vertex locations
-
getLayoutAlgorithm
LayoutAlgorithm<V> getLayoutAlgorithm()
- Returns:
- the layout algorithm that was used to place the vertices
-
getLayoutModel
LayoutModel<V> getLayoutModel()
- Returns:
- the layout model that holds vertex location state
-
setLayoutModel
void setLayoutModel(LayoutModel<V> layoutModel)
- Parameters:
layoutModel- the layout model to hold vertex locations
-
setGraph
void setGraph(org.jgrapht.Graph<V,E> graph, boolean forceUpdate)
- Parameters:
graph- the graph to visualizeforceUpdate- whether to force an update
-
getInitialDimensionFunction
Function<org.jgrapht.Graph<V,?>,Pair<Integer>> getInitialDimensionFunction()
-
setInitialDimensionFunction
void setInitialDimensionFunction(Function<org.jgrapht.Graph<V,?>,Pair<Integer>> initialDimensionFunction)
-
getLayoutSizeChangeListener
default LayoutSizeChange.Listener<V> getLayoutSizeChangeListener()
-
-