Package com.treemap

# Class AbstractRendering<C,N,Row,Column,Color,Font>

java.lang.Object
com.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 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 final float`
  `COLOR_SIMILARITY_THRESHOLD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractRendering()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.macrofocus.igraphics.CPColor<Color>`
  `getNestingBackground(N node, TreeMapModel<N,Row,Column,Color,Font> model)`
  `Iterable<N>`
  `getOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)`
  `Iterable<N>`
  `getParentOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)`
  `int`
  `getPasses(TreeMapModel<N,Row,Column,Color,Font> model)`
  `com.macrofocus.geom.Shape`
  `getRenderedShape(TreeMapView<C,N,Row,Column,Color,Font> view, TreeMapModel<N,Row,Column,Color,Font> model, N node, com.macrofocus.geom.Shape shape)`
  `void`
  `paintBackground(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, com.macrofocus.geom.Rectangle b, com.macrofocus.geom.Shape shape)`
  `void`
  `paintLabel(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)`
  `void`
  `paintParent(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)`
  `void`
  `paintParentBorder(TGraphics<Color,Font> g, N node, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.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, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)`
  `static <Color, Font>
  com.macrofocus.igraphics.CPFont<Font>`
  `scaleFontToFit(com.macrofocus.geom.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.treemap.Rendering

  `paintBorder, paintNode`

- ## Field Details

  - ### COLOR_SIMILARITY_THRESHOLD

    protected static final float COLOR_SIMILARITY_THRESHOLD
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AbstractRendering

    public AbstractRendering()

- ## Method Details

  - ### getPasses

    public int getPasses(TreeMapModel<N,Row,Column,Color,Font> model)
    Specified by:
      `getPasses` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### getParentOrder

    public Iterable<N> getParentOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
    Specified by:
      `getParentOrder` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### getOrder

    public Iterable<N> getOrder(TreeMapView<C,N,Row,Column,Color,Font> view, N root, int pass)
    Specified by:
      `getOrder` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### paintParent

    public void paintParent(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)
    Specified by:
      `paintParent` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### getRenderedShape

    public com.macrofocus.geom.Shape getRenderedShape(TreeMapView<C,N,Row,Column,Color,Font> view, TreeMapModel<N,Row,Column,Color,Font> model, N node, com.macrofocus.geom.Shape shape)
    Specified by:
      `getRenderedShape` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### paintBackground

    public void paintBackground(TGraphics<Color,Font> g, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, int passes, com.macrofocus.geom.Rectangle b, com.macrofocus.geom.Shape shape)
    Specified by:
      `paintBackground` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### getNestingBackground

    public com.macrofocus.igraphics.CPColor<Color> getNestingBackground(N node, TreeMapModel<N,Row,Column,Color,Font> model)
    Specified by:
      `getNestingBackground` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### scaleFontToFit

    public static <Color, Font> com.macrofocus.igraphics.CPFont<Font> scaleFontToFit(com.macrofocus.geom.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, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)
    Specified by:
      `paintLabel` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### paintParentBorder

    public void paintParentBorder(TGraphics<Color,Font> g, N node, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape, TreeMapModel<N,Row,Column,Color,Font> model)
    Specified by:
      `paintParentBorder` in interface `Rendering<C,N,Row,Column,Color,Font>`

  - ### paintParentHighlight

    public void paintParentHighlight(TGraphics<Color,Font> g2, TreeMapView<C,N,Row,Column,Color,Font> view, N node, int pass, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)
    Specified by:
      `paintParentHighlight` in interface `Rendering<C,N,Row,Column,Color,Font>`