Package com.treemap

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

java.lang.Object
com.treemap.AbstractTreeMap<C,N,Row,Column,Color,Font>

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

Direct Known Subclasses:
  `SwingTreeMap`

@JsType public abstract class AbstractTreeMap<C,N,Row,Column,Color,Font> extends Object implements TreeMap<C,N,Row,Column,Color,Font>
Created by luc on 03/02/16.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected TreeMapController<C,N,Row,Column,Color,Font>`
  `controller`
  `protected static LicenseModel`
  `licenseModel`
  `protected TreeMapView<C,N,Row,Column,Color,Font>`
  `view`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTreeMap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TreeMapController<C,N,Row,Column,Color,Font>`
  `getController()`
  Returns the controller used for the treemap.
  `TreeMapModel<N,Row,Column,Color,Font>`
  `getModel()`
  Returns the model used for the treemap.
  `TreeMapView<C,N,Row,Column,Color,Font>`
  `getView()`
  Returns the view used for the treemap.
  `void`
  `setAggregation(Aggregation aggregation)`
  Defines the aggregation scheme to use to aggregate values of the treemap.
  `void`
  `setAlgorithm(Algorithm algorithm)`
  Defines the algorithm to use to lay out the treemap.
  `void`
  `setBackground(int column)`
  Defines the field to use for background labeling.
  `void`
  `setBackgroundByName(String columnName)`
  Defines the field to use for background labeling.
  `void`
  `setColor(int column)`
  Defines the field to use for coloring.
  `void`
  `setColorByName(String columnName)`
  Defines the field to use for coloring.
  `void`
  `setController(TreeMapController<C,N,Row,Column,Color,Font> controller)`
  Sets the controller to be used for the treemap and register the view currently in use.
  `void`
  `setDepth(Depth depth)`
  Defines the depth to use to lay out the treemap.
  `void`
  `setGroupBy(int... columns)`
  Defines the fields to be use for grouping.
  `void`
  `setGroupByByNames(String... columnNames)`
  Defines the fields to be use for grouping.
  `void`
  `setHeaderBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)`
  Sets the background color to use for drawing the headers.
  `void`
  `setHeaderFont(com.macrofocus.igraphics.CPFont<Font> font)`
  Sets the font used for labeling the headings.
  `void`
  `setHeaderForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)`
  Sets the foreground color to use for drawing the headers.
  `void`
  `setHeight(int column)`
  Defines the field to use for mapping the height.
  `void`
  `setHeightByName(String columnName)`
  Defines the field to use for mapping the height.
  `void`
  `setLabeling(Labeling labeling)`
  Defines the labeling scheme to use to draw the treemap.
  `void`
  `setLabelingBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)`
  Sets the background color to use for drawing the labels.
  `void`
  `setLabelingFont(com.macrofocus.igraphics.CPFont<Font> font)`
  Sets the font used for labeling.
  `void`
  `setLabelingForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)`
  Sets the foreground color to use for drawing the labels.
  `void`
  `setLabels(int... columns)`
  Defines the fields to be use for labeling.
  `void`
  `setLabelsByNames(String... columnNames)`
  Defines the fields to be use for labeling.
  `static void`
  `setLicenseKey(String username, String key)`
  Register the license key that legally entitle the use of CartoPlot.
  `void`
  `setLightSourceAmbient(double value)`
  Sets the light source ambient intensity used for drawing the cushions.
  `void`
  `setLightSourceHeight(double value)`
  Sets the light source height used for drawing the cushions.
  `void`
  `setLightSourceX(double value)`
  Sets the light source X position used for drawing the cushions.
  `void`
  `setLightSourceY(double value)`
  Sets the light source Y position used for drawing the cushions.
  `void`
  `setLightSourceZ(double value)`
  Sets the light source Z position used for drawing the cushions.
  `void`
  `setModel(TreeMapModel<N,Row,Column,Color,Font> model)`
  Sets the model to be used for the treemap and register it to the view.
  `void`
  `setNesting(Nesting nesting)`
  Defines the nesting to use to lay out the treemap.
  `void`
  `setOrdering(Ordering ordering)`
  Defines the ordering to use to lay out the treemap.
  `void`
  `setRendering(Rendering rendering)`
  Defines the rendering scheme to use to draw the treemap.
  `void`
  `setScale(Scale scale)`
  Defines the scaling scheme to use to project values the treemap.
  `void`
  `setSize(int column)`
  Defines the field to use to represent the size.
  `void`
  `setSizeByName(String columnName)`
  Defines the field to use to represent the size.
  `void`
  `setToolTip(int... columns)`
  Defines the fields to be use for grouping.
  `void`
  `setToolTipByNames(String... columnNames)`
  Defines the fields to be use for grouping.
  `void`
  `setView(TreeMapView<C,N,Row,Column,Color,Font> view)`
  Sets the view to be used for the treemap and register the model currently in use.

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

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

  ### Methods inherited from interface com.treemap.TreeMap

  `getNativeComponent`

- ## Field Details

  - ### view

    protected TreeMapView<C,N,Row,Column,Color,Font> view

  - ### controller

    protected TreeMapController<C,N,Row,Column,Color,Font> controller

  - ### licenseModel

    protected static LicenseModel licenseModel

- ## Constructor Details

  - ### AbstractTreeMap

    public AbstractTreeMap()

- ## Method Details

  - ### setLicenseKey

    public static void setLicenseKey(String username, String key)
    Register the license key that legally entitle the use of CartoPlot. This should be called prior to the first instantiation of this component.
    Parameters:
      `username` - the user name
      `key` - the license key

  - ### getModel

    public TreeMapModel<N,Row,Column,Color,Font> getModel()
    Returns the model used for the treemap.
    Specified by:
      `getModel` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Returns:
      the model in use

  - ### setModel

    public void setModel(TreeMapModel<N,Row,Column,Color,Font> model)
    Sets the model to be used for the treemap and register it to the view.
    Specified by:
      `setModel` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `model` - the model to be used

  - ### getView

    @JsMethod public TreeMapView<C,N,Row,Column,Color,Font> getView()
    Returns the view used for the treemap.
    Specified by:
      `getView` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Returns:
      the view in use

  - ### setView

    public void setView(TreeMapView<C,N,Row,Column,Color,Font> view)
    Sets the view to be used for the treemap and register the model currently in use. It will also register itself to the controller.
    Specified by:
      `setView` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `view` - the view to be used

  - ### getController

    public TreeMapController<C,N,Row,Column,Color,Font> getController()
    Returns the controller used for the treemap.
    Specified by:
      `getController` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Returns:
      the controller in use

  - ### setController

    public void setController(TreeMapController<C,N,Row,Column,Color,Font> controller)
    Sets the controller to be used for the treemap and register the view currently in use.
    Specified by:
      `setController` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `controller` - the controller in use

  - ### setGroupBy

    public void setGroupBy(int... columns)
    Defines the fields to be use for grouping.
    Specified by:
      `setGroupBy` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columns` - the indexes of the columns to be used for grouping
    See Also:
      - `DefaultTreeMapSettings.getGroupByTreeMapFields()`

  - ### setGroupByByNames

    public void setGroupByByNames(String... columnNames)
    Defines the fields to be use for grouping.
    Specified by:
      `setGroupByByNames` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnNames` - the names of the columns to be used for grouping
    See Also:
      - `DefaultTreeMapSettings.getGroupByTreeMapFields()`

  - ### setLabels

    public void setLabels(int... columns)
    Defines the fields to be use for labeling.
    Specified by:
      `setLabels` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columns` - the indexes of the columns to be used for labeling
    See Also:
      - `DefaultTreeMapSettings.getLabelTreeMapFields()`

  - ### setLabelsByNames

    public void setLabelsByNames(String... columnNames)
    Defines the fields to be use for labeling.
    Specified by:
      `setLabelsByNames` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnNames` - the names of the columns to be used for labeling
    See Also:
      - `DefaultTreeMapSettings.getLabelTreeMapFields()`

  - ### setBackground

    public void setBackground(int column)
    Defines the field to use for background labeling.
    Specified by:
      `setBackground` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `column` - the index of the column to be used for background labeling
    See Also:
      - `DefaultTreeMapSettings.getBackgroundTreeMapField()`

  - ### setBackgroundByName

    public void setBackgroundByName(String columnName)
    Defines the field to use for background labeling.
    Specified by:
      `setBackgroundByName` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnName` - the name of the column to be used for background labeling
    See Also:
      - `DefaultTreeMapSettings.getBackgroundTreeMapField()`

  - ### setSize

    public void setSize(int column)
    Defines the field to use to represent the size.
    Specified by:
      `setSize` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `column` - the index of the column to be used for representing the size
    See Also:
      - `DefaultTreeMapSettings.getSizeTreeMapField()`

  - ### setSizeByName

    public void setSizeByName(String columnName)
    Defines the field to use to represent the size.
    Specified by:
      `setSizeByName` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnName` - the name of the column to be used for representing the size
    See Also:
      - `DefaultTreeMapSettings.getSizeTreeMapField()`

  - ### setColor

    public void setColor(int column)
    Defines the field to use for coloring.
    Specified by:
      `setColor` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `column` - the index of the column to be used for coloring
    See Also:
      - `DefaultTreeMapSettings.getColorTreeMapField()`

  - ### setColorByName

    public void setColorByName(String columnName)
    Defines the field to use for coloring.
    Specified by:
      `setColorByName` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnName` - the name of the column to be used for coloring
    See Also:
      - `DefaultTreeMapSettings.getColorTreeMapField()`

  - ### setHeight

    public void setHeight(int column)
    Defines the field to use for mapping the height.
    Specified by:
      `setHeight` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `column` - the index of the column to be used for mapping the height
    See Also:
      - `DefaultTreeMapSettings.getHeightTreeMapField()`

  - ### setHeightByName

    public void setHeightByName(String columnName)
    Defines the field to use for mapping the height.
    Specified by:
      `setHeightByName` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnName` - the name of the column to be used for mapping the height
    See Also:
      - `DefaultTreeMapSettings.getHeightTreeMapField()`

  - ### setToolTip

    public void setToolTip(int... columns)
    Defines the fields to be use for grouping.
    Specified by:
      `setToolTip` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columns` - the indexes of the columns to be used for grouping
    See Also:
      - `DefaultTreeMapSettings.getGroupByTreeMapFields()`

  - ### setToolTipByNames

    public void setToolTipByNames(String... columnNames)
    Defines the fields to be use for grouping.
    Specified by:
      `setToolTipByNames` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `columnNames` - the names of the columns to be used for grouping
    See Also:
      - `DefaultTreeMapSettings.getGroupByTreeMapFields()`

  - ### setAlgorithm

    public void setAlgorithm(Algorithm algorithm)
    Defines the algorithm to use to lay out the treemap.
    Specified by:
      `setAlgorithm` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `algorithm` - the algorithm to use
    See Also:
      - `TreeMapFieldSettings.getAlgorithm()`
      - `AlgorithmFactory`

  - ### setAggregation

    public void setAggregation(Aggregation aggregation)
    Defines the aggregation scheme to use to aggregate values of the treemap.
    Specified by:
      `setAggregation` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `aggregation` - the aggregation scheme to use
    See Also:
      - `TreeMapFieldSettings.getAggregation()`
      - `AggregationFactory`

  - ### setScale

    public void setScale(Scale scale)
    Defines the scaling scheme to use to project values the treemap.
    Specified by:
      `setScale` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `scale` - the scale scheme to use
    See Also:
      - `TreeMapFieldSettings.getScale()`
      - `ScaleFactory`

  - ### setNesting

    public void setNesting(Nesting nesting)
    Defines the nesting to use to lay out the treemap.
    Specified by:
      `setNesting` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `nesting` - the nesting scheme to use
    See Also:
      - `TreeMapFieldSettings.getNesting()`
      - `NestingFactory`

  - ### setOrdering

    public void setOrdering(Ordering ordering)
    Defines the ordering to use to lay out the treemap.
    Specified by:
      `setOrdering` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `ordering` - the ordering to use
    See Also:
      - `TreeMapFieldSettings.getOrdering()`
      - `OrderingFactory`

  - ### setDepth

    public void setDepth(Depth depth)
    Defines the depth to use to lay out the treemap.
    Specified by:
      `setDepth` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `depth` - the depth to use
    See Also:
      - `DefaultTreeMapSettings.getDepth()`
      - `DepthFactory`

  - ### setLabeling

    public void setLabeling(Labeling labeling)
    Defines the labeling scheme to use to draw the treemap.
    Specified by:
      `setLabeling` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `labeling` - the labeling schem to use
    See Also:
      - `DefaultTreeMapFieldSettings.getLabeling()`
      - `LabelingFactory`

  - ### setRendering

    public void setRendering(Rendering rendering)
    Defines the rendering scheme to use to draw the treemap.
    Specified by:
      `setRendering` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `rendering` - the rendering scheme to use
    See Also:
      - `DefaultTreeMapSettings.getRendering()`
      - `RenderingFactory`

  - ### setLightSourceHeight

    public void setLightSourceHeight(double value)
    Sets the light source height used for drawing the cushions.
    Specified by:
      `setLightSourceHeight` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `value` - the height
    See Also:
      - `DefaultTreeMapSettings.getLightSourceHeight()`

  - ### setLightSourceAmbient

    public void setLightSourceAmbient(double value)
    Sets the light source ambient intensity used for drawing the cushions.
    Specified by:
      `setLightSourceAmbient` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `value` - the ambient intensity
    See Also:
      - `DefaultTreeMapSettings.getLightSourceAmbient()`

  - ### setLightSourceX

    public void setLightSourceX(double value)
    Sets the light source X position used for drawing the cushions.
    Specified by:
      `setLightSourceX` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `value` - the X position
    See Also:
      - `DefaultTreeMapSettings.getLightSourceX()`

  - ### setLightSourceY

    public void setLightSourceY(double value)
    Sets the light source Y position used for drawing the cushions.
    Specified by:
      `setLightSourceY` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `value` - the Y position
    See Also:
      - `DefaultTreeMapSettings.getLightSourceY()`

  - ### setLightSourceZ

    public void setLightSourceZ(double value)
    Sets the light source Z position used for drawing the cushions.
    Specified by:
      `setLightSourceZ` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `value` - the Z position
    See Also:
      - `DefaultTreeMapSettings.getLightSourceZ()`

  - ### setLabelingFont

    public void setLabelingFont(com.macrofocus.igraphics.CPFont<Font> font)
    Sets the font used for labeling.
    Specified by:
      `setLabelingFont` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `font` - the font to be used
    See Also:
      - `TreeMapFieldSettings.getLabelingFont()`

  - ### setLabelingForegroundColor

    public void setLabelingForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
    Sets the foreground color to use for drawing the labels.
    Specified by:
      `setLabelingForegroundColor` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `color` - the color to be used
    See Also:
      - `TreeMapFieldSettings.getLabelingForeground()`

  - ### setLabelingBackgroundColor

    public void setLabelingBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
    Sets the background color to use for drawing the labels.
    Specified by:
      `setLabelingBackgroundColor` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `color` - the color to be used
    See Also:
      - `TreeMapFieldSettings.getLabelingEffectColor()`

  - ### setHeaderFont

    public void setHeaderFont(com.macrofocus.igraphics.CPFont<Font> font)
    Sets the font used for labeling the headings.
    Specified by:
      `setHeaderFont` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `font` - the font to be used
    See Also:
      - `TreeMapFieldSettings.getHeaderFont()`

  - ### setHeaderForegroundColor

    public void setHeaderForegroundColor(com.macrofocus.igraphics.CPColor<Color> color)
    Sets the foreground color to use for drawing the headers.
    Specified by:
      `setHeaderForegroundColor` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `color` - the color to be used
    See Also:
      - `TreeMapFieldSettings.getHeaderForeground()`

  - ### setHeaderBackgroundColor

    public void setHeaderBackgroundColor(com.macrofocus.igraphics.CPColor<Color> color)
    Sets the background color to use for drawing the headers.
    Specified by:
      `setHeaderBackgroundColor` in interface `TreeMap<C,N,Row,Column,Color,Font>`
    Parameters:
      `color` - the color to be used
    See Also:
      - `TreeMapFieldSettings.getHeaderBackground()`