Package com.treemap

# Class SurroundLabeling<N,Row,Column,Color,Font>

java.lang.Object
com.treemap.AbstractLabeling<N,Row,Column,Color,Font>
com.treemap.SurroundLabeling<N,Row,Column,Color,Font>

Type Parameters:
  `N` - the type of nodes

All Implemented Interfaces:
  `Labeling<N,Row,Column,Color,Font>`

Direct Known Subclasses:
  `ColoredSurroundLabeling`

@JsType public class SurroundLabeling<N,Row,Column,Color,Font> extends AbstractLabeling<N,Row,Column,Color,Font>
Display the label of the parent node above its children.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final float`
  `MINIMUM_FONT_SIZE_TO_DISPLAY`

  ### Fields inherited from class com.treemap.AbstractLabeling

  `COLOR_SIMILARITY_THRESHOLD, SHARE_OF_ZOOM_FACTOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SurroundLabeling()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected double`
  `computePreferredHeight(TreeMapModel<N,Row,Column,Color,Font> model, TGraphics<Color,Font> g2, com.macrofocus.geom.Rectangle2D rectangle, N node)`
  `protected com.macrofocus.igraphics.CPColor<Color>`
  `getBackgroundColor(N node, TreeMapModel model)`
  `protected com.macrofocus.igraphics.CPColor<Color>`
  `getEffectColor(N node, TreeMapModel model)`
  `protected com.macrofocus.igraphics.CPColor<Color>`
  `getForegroundColor(N node, TreeMapModel model)`
  `double`
  `getLeftSpace(TreeMapModel<N,Row,Column,Color,Font> model)`
  `double`
  `getTopSpace(TreeMapModel<N,Row,Column,Color,Font> model)`
  `void`
  `paintParent(TGraphics<Color,Font> g2, com.macrofocus.geom.Rectangle bounds, N node, TreeMapView view, int pass, int passes)`
  `void`
  `setHeadless(Headless headless)`
  `com.macrofocus.geom.Shape`
  `subtract(TreeMapModel<N,Row,Column,Color,Font> model, com.macrofocus.geom.Shape shape, N node)`
  `String`
  `toString()`

  ### Methods inherited from class com.treemap.AbstractLabeling

  `adjustLabelColor, calcCenterOfMass, findEnclosedRectangle, getArea, getCentroid, getPoints, getTopHeaderSpacing, getTreeMapFieldsByVerticalAlignment, paintFields, paintLabel, paintLeaf`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### MINIMUM_FONT_SIZE_TO_DISPLAY

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

- ## Constructor Details

  - ### SurroundLabeling

    public SurroundLabeling()

- ## Method Details

  - ### setHeadless

    public void setHeadless(Headless headless)

  - ### getTopSpace

    public double getTopSpace(TreeMapModel<N,Row,Column,Color,Font> model)
    Specified by:
      `getTopSpace` in interface `Labeling<N,Row,Column,Color,Font>`
    Overrides:
      `getTopSpace` in class `AbstractLabeling<N,Row,Column,Color,Font>`

  - ### getLeftSpace

    public double getLeftSpace(TreeMapModel<N,Row,Column,Color,Font> model)
    Specified by:
      `getLeftSpace` in interface `Labeling<N,Row,Column,Color,Font>`
    Overrides:
      `getLeftSpace` in class `AbstractLabeling<N,Row,Column,Color,Font>`

  - ### subtract

    public com.macrofocus.geom.Shape subtract(TreeMapModel<N,Row,Column,Color,Font> model, com.macrofocus.geom.Shape shape, N node)
    Specified by:
      `subtract` in interface `Labeling<N,Row,Column,Color,Font>`
    Overrides:
      `subtract` in class `AbstractLabeling<N,Row,Column,Color,Font>`

  - ### computePreferredHeight

    protected double computePreferredHeight(TreeMapModel<N,Row,Column,Color,Font> model, TGraphics<Color,Font> g2, com.macrofocus.geom.Rectangle2D rectangle, N node)

  - ### paintParent

    public void paintParent(TGraphics<Color,Font> g2, com.macrofocus.geom.Rectangle bounds, N node, TreeMapView view, int pass, int passes)

  - ### getBackgroundColor

    protected com.macrofocus.igraphics.CPColor<Color> getBackgroundColor(N node, TreeMapModel model)

  - ### getForegroundColor

    protected com.macrofocus.igraphics.CPColor<Color> getForegroundColor(N node, TreeMapModel model)

  - ### getEffectColor

    protected com.macrofocus.igraphics.CPColor<Color> getEffectColor(N node, TreeMapModel model)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`