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
ConstructorsModifierConstructorDescriptionprotected
AbstractTreeMapNode
(TreeMapModel<N, Row, Column, Color, Font> model) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
abstract N
com.macrofocus.geom.Rectangle2D
Gets the bounding rectangle of the item in the map.abstract int
com.macrofocus.igraphics.CPColor<Color>
getColor()
com.macrofocus.igraphics.CPColor<Color>
com.macrofocus.igraphics.CPImage
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
Gets the shape after nesting of the item in the map.abstract Object
The name of this node.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
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
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.toString()
protected Number
worldToNormalized
(Number value, TreeMapField columnIndex) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.treemap.MutableTreeMapNode
setSumSize
Methods 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:TreeMapNode
Corresponds to area in map. -
setSize
public void setSize(double size) Description copied from interface:MutableTreeMapNode
Sets 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. -
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 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:MutableTreeMapNode
Sets 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. -
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 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:TreeMapNode
Gets the bounding rectangle of the item in the map. -
toString
-
getCushionImage
public com.macrofocus.igraphics.CPImage getCushionImage() -
getCushionColor
-
getSelf
-