Package org.jungrapht.visualization.util
Class IconCache<V>
- java.lang.Object
-
- org.jungrapht.visualization.util.IconCache<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIconCache.Builder<V>Builder for IconCachestatic interfaceIconCache.Decorator<V>extend this interface to apply 'decorations' to the vertex labels after they are drawn.static interfaceIconCache.Stylist<V>allows for functional interface method to set the font, colors, etc for the vertex JLabel.
-
Field Summary
Fields Modifier and Type Field Description protected Function<V,Paint>colorFunctionprotected JLabellabelprotected IconCache.Decorator<V>postDecoratorprotected IconCache.Decorator<V>preDecoratorprotected Map<RenderingHints.Key,Object>renderingHintsprotected IconCache.Stylist<V>stylistprotected Function<V,String>vertexLabelFunctionprotected Function<V,Shape>vertexShapeFunction
-
Constructor Summary
Constructors Modifier Constructor Description protectedIconCache(IconCache.Builder<V> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iconapply(V n)static <V> IconCache.Builder<V>builder(Function<V,String> vertexLabelFunction)protected voidcacheIconFor(JLabel label, V vertex, Function<V,String> vertexLabelFunction, Function<V,Paint> colorFunction)
-
-
-
Field Detail
-
label
protected JLabel label
-
renderingHints
protected Map<RenderingHints.Key,Object> renderingHints
-
stylist
protected IconCache.Stylist<V> stylist
-
preDecorator
protected IconCache.Decorator<V> preDecorator
-
postDecorator
protected IconCache.Decorator<V> postDecorator
-
-
Constructor Detail
-
IconCache
protected IconCache(IconCache.Builder<V> builder)
- Parameters:
builder- the configured Builder
-
-
Method Detail
-
builder
public static <V> IconCache.Builder<V> builder(Function<V,String> vertexLabelFunction)
- Type Parameters:
V- vertex type- Parameters:
vertexLabelFunction- function to return String labels for vertices- Returns:
- the Builder
-
-