# Class AbstractTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color, Font>

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

Type Parameters:
  `N` - the type of nodes

All Implemented Interfaces:
  `MutableTreeMapNode<N,Column,Color,Font>, TreeMapNode<N,Column,Color,Font>`

Direct Known Subclasses:
  `LeafTreeMapNode, ParentTreeMapNode`

public abstract class AbstractTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color, Font> extends Object implements MutableTreeMapNode<N,Column,Color,Font>
This class provides a skeletal implementation of the TreeMapNode interface to minimize the effort required to implement this interface.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final TreeMapModel<N,Row,Column,Color,Font>`
  `model`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractTreeMapNode(TreeMapModel<N,Row,Column,Color,Font> model)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `add(N newChild)`
  `com.macrofocus.igraphics.CPColor<Color>`
  `computeCushionColor()`
  `abstract N`
  `findChild(Object name)`
  `com.macrofocus.geom.Rectangle2D`
  `getBounds()`
  Gets the bounding rectangle of the item in the map.
  `abstract int`
  `getChildCount()`
  `abstract Iterable<N>`
  `getChildren()`
  `abstract Iterable<N>`
  `getChildrenOfTypeParent()`
  `com.macrofocus.igraphics.CPColor<Color>`
  `getColor()`
  `com.macrofocus.igraphics.CPColor<Color>`
  `getCushionColor()`
  `com.macrofocus.igraphics.CPImage`
  `getCushionImage()`
  `String`
  `getLabelName()`
  The label of this node.
  `int`
  `getLevel()`
  Returns the number of levels above this node -- the distance from the root to this node.
  `com.macrofocus.geom.Shape`
  `getNestedShape()`
  Gets the shape after nesting of the item in the map.
  `abstract Object`
  `getNodeName()`
  The name of this node.
  `N`
  `getParent()`
  `AbstractTreeMapNode[]`
  `getPath()`
  `abstract Row`
  `getRow()`
  Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.
  `protected N`
  `getSelf()`
  `com.macrofocus.geom.Shape`
  `getShape()`
  Gets the shape of the item in the map.
  `double`
  `getSize()`
  Corresponds to area in map.
  `boolean`
  `isRoot()`
  `protected Number`
  `normalizedToWorld(Number value, TreeMapField columnIndex)`
  `void`
  `setColor(com.macrofocus.igraphics.CPColor<Color> c)`
  Sets the color of the item in the map.
  `void`
  `setNestedShape(com.macrofocus.geom.Shape shape)`
  Sets the shape after nesting of the item in the map.
  `void`
  `setParent(N parent)`
  `void`
  `setShape(com.macrofocus.geom.Shape shape)`
  Sets the shape of the item in the map.
  `void`
  `setSize(double size)`
  Sets the size of the item.
  `String`
  `toString()`
  `protected Number`
  `worldToNormalized(Number value, TreeMapField columnIndex)`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface MutableTreeMapNode

  `setSumSize`

  ### Methods inherited from interface TreeMapNode

  `getChildrenGroupByField, getGroupByField, getSumSize, hasNoChildren, isLeaf`

- ## Field Details

  - ### model

    protected final TreeMapModel<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color, Font> model

- ## Constructor Details

  - ### AbstractTreeMapNode

    protected AbstractTreeMapNode(TreeMapModel<N,Row,Column,Color,Font> model)

- ## Method Details

  - ### getChildCount

    public abstract int getChildCount()

  - ### getLevel

    public int getLevel()
    Returns the number of levels above this node -- the distance from the root to this node. If this node is the root, returns 0.
    Specified by:
      `getLevel` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Returns:
      the number of levels above this node

  - ### getParent

    public N getParent()

  - ### isRoot

    public boolean isRoot()

  - ### getChildren

    public abstract Iterable<N> getChildren()

  - ### getChildrenOfTypeParent

    public abstract Iterable<N> getChildrenOfTypeParent()

  - ### getPath

    public AbstractTreeMapNode[] getPath()

  - ### add

    public abstract void add(N newChild)

  - ### setParent

    public void setParent(N parent)

  - ### findChild

    public abstract N findChild(Object name)

  - ### getNodeName

    public abstract Object getNodeName()
    The name of this node.
    Returns:
      the name of this node.

  - ### getRow

    public abstract Row getRow()
    Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.
    Returns:
      the row in the TableModel.

  - ### getLabelName

    public String getLabelName()
    The label of this node.
    Returns:
      the label of this node.

  - ### getColor

    public com.macrofocus.igraphics.CPColor<Color> getColor()
    Specified by:
      `getColor` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`

  - ### worldToNormalized

    protected Number worldToNormalized(Number value, TreeMapField columnIndex)

  - ### normalizedToWorld

    protected Number normalizedToWorld(Number value, TreeMapField columnIndex)

  - ### getSize

    public double getSize()
    Description copied from interface: `TreeMapNode`
    Corresponds to area in map.
    Specified by:
      `getSize` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Returns:
      the area

  - ### setSize

    public void setSize(double size)
    Description copied from interface: `MutableTreeMapNode`
    Sets the size of the item.
    Specified by:
      `setSize` in interface `MutableTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Parameters:
      `size` - the size of the item.

  - ### getShape

    public com.macrofocus.geom.Shape getShape()
    Description copied from interface: `TreeMapNode`
    Gets the shape of the item in the map.
    Specified by:
      `getShape` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Returns:
      the shape of the item in the map.

  - ### getNestedShape

    public com.macrofocus.geom.Shape getNestedShape()
    Description copied from interface: `TreeMapNode`
    Gets the shape after nesting of the item in the map.
    Specified by:
      `getNestedShape` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Returns:
      the shape of the item in the map.

  - ### setColor

    public void setColor(com.macrofocus.igraphics.CPColor<Color> c)
    Description copied from interface: `MutableTreeMapNode`
    Sets the color of the item in the map.
    Specified by:
      `setColor` in interface `MutableTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Parameters:
      `c` - the color of the item in the map.

  - ### setShape

    public void setShape(com.macrofocus.geom.Shape shape)
    Description copied from interface: `MutableTreeMapNode`
    Sets the shape of the item in the map.
    Specified by:
      `setShape` in interface `MutableTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Parameters:
      `shape` - the shape of the item in the map.

  - ### setNestedShape

    public void setNestedShape(com.macrofocus.geom.Shape shape)
    Description copied from interface: `MutableTreeMapNode`
    Sets the shape after nesting of the item in the map.
    Specified by:
      `setNestedShape` in interface `MutableTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Parameters:
      `shape` - the shape of the item in the map.

  - ### getBounds

    public com.macrofocus.geom.Rectangle2D getBounds()
    Description copied from interface: `TreeMapNode`
    Gets the bounding rectangle of the item in the map.
    Specified by:
      `getBounds` in interface `TreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>, Row, Column, Color>`
    Returns:
      the bounding rectangle of the item in the map.

  - ### toString

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

  - ### getCushionImage

    public com.macrofocus.igraphics.CPImage getCushionImage()

  - ### getCushionColor

    public com.macrofocus.igraphics.CPColor<Color> getCushionColor()

  - ### computeCushionColor

    public com.macrofocus.igraphics.CPColor<Color> computeCushionColor()

  - ### getSelf

    protected N getSelf()