Class DefaultModalRenderer<V,E>
- java.lang.Object
-
- org.jungrapht.visualization.renderers.BiModalRenderer<V,E>
-
- org.jungrapht.visualization.renderers.DefaultModalRenderer<V,E>
-
- Type Parameters:
V
- the vertex typeE
- the edge type
- All Implemented Interfaces:
EventListener
,ChangeListener
,ModalRenderer<V,E>
,Renderer<V,E>
public class DefaultModalRenderer<V,E> extends BiModalRenderer<V,E> implements ModalRenderer<V,E>
ARenderer
that delegates to either aHeavyweightRenderer
or aLightweightRenderer
depending on the results of a count predicate and a scale predicateThe count predicate defaults to a comparison of the vertex count with the lightweightCountThreshold
The scale predicate defauls to a comparison of the VIEW transform scale with the lightweightScaleThreshold
if the scale threshold is less than 0.5, then the graph is always drawn with the lightweight renderer
if the vertex count is less than (for example) 20 the the graph is always drawn with the default renderer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultModalRenderer.Builder<V,E,M extends Enum<M>,T extends DefaultModalRenderer<V,E>,B extends DefaultModalRenderer.Builder<V,E,M,T,B>>
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.renderers.ModalRenderer
ModalRenderer.Mode
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.renderers.Renderer
Renderer.Edge<V,E>, Renderer.EdgeLabel<V,E>, Renderer.Vertex<V,E>, Renderer.VertexLabel<V,E>
-
-
Field Summary
-
Fields inherited from class org.jungrapht.visualization.renderers.BiModalRenderer
countPredicate, countSupplier, HEAVYWEIGHT, LIGHTWEIGHT, lightweightRenderingCountThreshold, lightweightRenderingScaleThreshold, mode, rendererMap, scalePredicate, scaleSupplier
-
-
Constructor Summary
Constructors Constructor Description DefaultModalRenderer(DefaultModalRenderer.Builder<V,E,?,?,?> builder)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V,E>
DefaultModalRenderer.Builder<V,E,?,?,?>builder()
-
Methods inherited from class org.jungrapht.visualization.renderers.BiModalRenderer
getCountSupplier, getEdgeLabelRenderer, getEdgeLabelRenderer, getEdgeRenderer, getEdgeRenderer, getMode, getModeFor, getRenderer, getScaleSupplier, getVertexLabelRenderer, getVertexLabelRenderer, getVertexRenderer, getVertexRenderer, manageMode, render, render, renderEdge, renderEdgeLabel, renderVertex, renderVertexLabel, setCountSupplier, setEdgeLabelRenderer, setEdgeLabelRenderer, setEdgeRenderer, setEdgeRenderer, setMode, setRenderer, setScaleSupplier, setVertexLabelRenderer, setVertexLabelRenderer, setVertexRenderer, setVertexRenderer, stateChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jungrapht.visualization.renderers.ModalRenderer
getEdgeLabelRenderer, getEdgeRenderer, getRenderer, getVertexLabelRenderer, getVertexRenderer, setEdgeLabelRenderer, setEdgeRenderer, setMode, setRenderer, setVertexLabelRenderer, setVertexRenderer
-
Methods inherited from interface org.jungrapht.visualization.renderers.Renderer
getEdgeLabelRenderer, getEdgeRenderer, getVertexLabelRenderer, getVertexRenderer, render, render, renderEdge, renderEdgeLabel, renderVertex, renderVertexLabel, setEdgeLabelRenderer, setEdgeRenderer, setVertexLabelRenderer, setVertexRenderer
-
-
-
-
Constructor Detail
-
DefaultModalRenderer
public DefaultModalRenderer(DefaultModalRenderer.Builder<V,E,?,?,?> builder)
-
-
Method Detail
-
builder
public static <V,E> DefaultModalRenderer.Builder<V,E,?,?,?> builder()
-
-