Class BiModalRenderer.Builder<V,E,T extends BiModalRenderer<V,E>,B extends BiModalRenderer.Builder<V,E,T,B>>
- java.lang.Object
-
- org.jungrapht.visualization.renderers.BiModalRenderer.Builder<V,E,T,B>
-
- Type Parameters:
V
- vertex typeE
- edge typeT
- BiModalRenderer typeB
- Builder type
- Direct Known Subclasses:
BiModalSelectionRenderer.Builder
,DefaultModalRenderer.Builder
- Enclosing class:
- BiModalRenderer<V,E>
public static class BiModalRenderer.Builder<V,E,T extends BiModalRenderer<V,E>,B extends BiModalRenderer.Builder<V,E,T,B>> extends Object
Builder to create a configured instance of a BiModalRenderer
-
-
Field Summary
Fields Modifier and Type Field Description protected JComponent
component
a Component to render onprotected Map<ModalRenderer.Mode,Renderer<V,E>>
rendererMap
Map of Renderers keyed on Mode
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
build()
B
component(JComponent component)
B
heavyweightRenderer(Renderer<V,E> heavyweightRenderer)
B
lightweightRenderer(Renderer<V,E> lightweightRenderer)
protected B
self()
-
-
-
Field Detail
-
rendererMap
protected Map<ModalRenderer.Mode,Renderer<V,E>> rendererMap
Map of Renderers keyed on Mode
-
component
protected JComponent component
a Component to render on
-
-
Method Detail
-
self
protected B self()
- Returns:
- an instance of this Builder cast to B
-
component
public B component(JComponent component)
- Parameters:
component
- to render on- Returns:
- this Builder
-
lightweightRenderer
public B lightweightRenderer(Renderer<V,E> lightweightRenderer)
- Parameters:
lightweightRenderer
- the value for the LIGHTWEIGHT key- Returns:
- this Builder
-
heavyweightRenderer
public B heavyweightRenderer(Renderer<V,E> heavyweightRenderer)
- Parameters:
heavyweightRenderer
- the value for the HEAVYWEIGHT key- Returns:
- this Builder
-
build
public T build()
- Returns:
- a configured instance of a BiModalRenderer
-
-