Package com.treemap
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTreeMapNode(TreeMapModel<N, Row, Column, Color, Font> model) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcom.macrofocus.igraphics.CPColor<Color> abstract Ncom.macrofocus.geom.Rectangle2DGets the bounding rectangle of the item in the map.abstract intcom.macrofocus.igraphics.CPColor<Color> getColor()com.macrofocus.igraphics.CPColor<Color> com.macrofocus.igraphics.CPImageThe label of this node.intgetLevel()Returns the number of levels above this node -- the distance from the root to this node.com.macrofocus.geom.ShapeGets the shape after nesting of the item in the map.abstract ObjectThe name of this node.getPath()abstract RowgetRow()Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.protected NgetSelf()com.macrofocus.geom.ShapegetShape()Gets the shape of the item in the map.doublegetSize()Corresponds to area in map.booleanisRoot()protected NumbernormalizedToWorld(Number value, TreeMapField columnIndex) voidSets the color of the item in the map.voidsetNestedShape(com.macrofocus.geom.Shape shape) Sets the shape after nesting of the item in the map.voidvoidsetShape(com.macrofocus.geom.Shape shape) Sets the shape of the item in the map.voidsetSize(double size) Sets the size of the item.toString()protected NumberworldToNormalized(Number value, TreeMapField columnIndex) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.treemap.MutableTreeMapNode
setSumSizeMethods inherited from interface com.treemap.TreeMapNode
getChildrenGroupByField, getGroupByField, getSumSize, hasNoChildren, isLeaf
-
Field Details
-
model
-
-
Constructor Details
-
AbstractTreeMapNode
-
-
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. -
getParent
-
isRoot
public boolean isRoot() -
getChildren
-
getChildrenOfTypeParent
-
getPath
-
add
-
setParent
-
findChild
-
getNodeName
The name of this node.- Returns:
- the name of this node.
-
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
The label of this node.- Returns:
- the label of this node.
-
getColor
-
worldToNormalized
-
normalizedToWorld
-
getSize
public double getSize()Description copied from interface:TreeMapNodeCorresponds to area in map. -
setSize
public void setSize(double size) Description copied from interface:MutableTreeMapNodeSets the size of the item. -
getShape
public com.macrofocus.geom.Shape getShape()Description copied from interface:TreeMapNodeGets the shape of the item in the map. -
getNestedShape
public com.macrofocus.geom.Shape getNestedShape()Description copied from interface:TreeMapNodeGets the shape after nesting of the item in the map.- Specified by:
getNestedShapein interfaceTreeMapNode<N extends AbstractTreeMapNode<N,Row, Column, Color, Font>, Row, Column, Color> - Returns:
- the shape of the item in the map.
-
setColor
Description copied from interface:MutableTreeMapNodeSets the color of the item in the map. -
setShape
public void setShape(com.macrofocus.geom.Shape shape) Description copied from interface:MutableTreeMapNodeSets the shape of the item in the map. -
setNestedShape
public void setNestedShape(com.macrofocus.geom.Shape shape) Description copied from interface:MutableTreeMapNodeSets the shape after nesting of the item in the map.- Specified by:
setNestedShapein interfaceMutableTreeMapNode<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:TreeMapNodeGets the bounding rectangle of the item in the map. -
toString
-
getCushionImage
public com.macrofocus.igraphics.CPImage getCushionImage() -
getCushionColor
-
computeCushionColor
-
getSelf
-