Package com.macrofocus.treemap
Class AbstractRendering<C,N,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractRendering<C,N,Row,Column,Color,Font>
-
- Type Parameters:
N
- the type of nodes
- All Implemented Interfaces:
Rendering<C,N,Row,Column,Color,Font>
- Direct Known Subclasses:
CushionRendering
public abstract class AbstractRendering<C,N,Row,Column,Color,Font> extends java.lang.Object implements Rendering<C,N,Row,Column,Color,Font>
This class provides a skeletal implementation of the Rendering interface to minimize the effort required to implement this interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected static float
COLOR_SIMILARITY_THRESHOLD
-
Constructor Summary
Constructors Constructor Description AbstractRendering()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.macrofocus.igraphics.CPColor<Color>
getNestingBackground(N node, TreeMapModel<N,Row,Column,Color,Font> model)
java.lang.Iterable<N>
getOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
java.lang.Iterable<N>
getParentOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
int
getPasses(TreeMapModel<N,Row,Column,Color,Font> model)
java.awt.Shape
getRenderedShape(TreeMapView<C,N,Row,Column,Color,Font> view, TreeMapModel<N,Row,Column,Color,Font> model, N node, java.awt.Shape shape)
void
paintBackground(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, java.awt.Rectangle b, java.awt.Shape shape)
void
paintLabel(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, java.awt.Rectangle bounds, java.awt.Shape shape)
void
paintParent(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, java.awt.Rectangle bounds, java.awt.Shape shape)
void
paintParentBorder(TGraphics<Color,Font> g, N node, java.awt.Rectangle bounds, java.awt.Shape shape, TreeMapModel<N,Row,Column,Color,Font> model)
void
paintParentHighlight(TGraphics<Color,Font> g2, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, java.awt.Rectangle bounds, java.awt.Shape shape)
static <Color,Font>
com.macrofocus.igraphics.CPFont<Font>scaleFontToFit(java.awt.Rectangle bounds, com.macrofocus.igraphics.CPFont<Font> font, com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, PreferredSize pf, double fontSize, boolean shrink, boolean expand)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.treemap.Rendering
paintBorder, paintNode
-
-
-
-
Field Detail
-
COLOR_SIMILARITY_THRESHOLD
protected static final float COLOR_SIMILARITY_THRESHOLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getParentOrder
public java.lang.Iterable<N> getParentOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
-
getOrder
public java.lang.Iterable<N> getOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
-
paintParent
public void paintParent(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, java.awt.Rectangle bounds, java.awt.Shape shape)
-
getRenderedShape
public java.awt.Shape getRenderedShape(TreeMapView<C,N,Row,Column,Color,Font> view, TreeMapModel<N,Row,Column,Color,Font> model, N node, java.awt.Shape shape)
-
paintBackground
public void paintBackground(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, java.awt.Rectangle b, java.awt.Shape shape)
-
getNestingBackground
public com.macrofocus.igraphics.CPColor<Color> getNestingBackground(N node, TreeMapModel<N,Row,Column,Color,Font> model)
-
scaleFontToFit
public static <Color,Font> com.macrofocus.igraphics.CPFont<Font> scaleFontToFit(java.awt.Rectangle bounds, com.macrofocus.igraphics.CPFont<Font> font, com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, PreferredSize pf, double fontSize, boolean shrink, boolean expand)
-
paintLabel
public void paintLabel(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, java.awt.Rectangle bounds, java.awt.Shape shape)
-
paintParentBorder
public void paintParentBorder(TGraphics<Color,Font> g, N node, java.awt.Rectangle bounds, java.awt.Shape shape, TreeMapModel<N,Row,Column,Color,Font> model)
-
-