Package com.treemap
Class ParentTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
java.lang.Object
com.treemap.AbstractTreeMapNode<N,Row,Column,Color,Font>
com.treemap.ParentTreeMapNode<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>
public class ParentTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
extends AbstractTreeMapNode<N,Row,Column,Color,Font>
A parent node.
-
Field Summary
Fields inherited from class com.treemap.AbstractTreeMapNode
model
-
Constructor Summary
ConstructorsConstructorDescriptionParentTreeMapNode
(Object name, TreeMapModel<N, Row, Column, Color, Font> model, TreeMapField<N, Column> groupByField, TreeMapField<N, Column> childrenGroupByField) -
Method Summary
Modifier and TypeMethodDescriptionvoid
com.macrofocus.geom.GeneralPath
getCH
(TreeMapField<N, Column> xVariable, TreeMapField<N, Column> yVariable) int
Returns the number of levels above this node -- the distance from the root to this node.Returns the number of levels above this node -- the distance from the root to this node.com.macrofocus.geom.Ellipse2D
getMEC
(TreeMapField<N, Column> xVariable, TreeMapField<N, Column> yVariable) Find the minimal enclosing circle (MEC) of a set of pointscom.macrofocus.geom.Shape
Gets the shape after nesting of the item in the map.The name of this node.getRow()
Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.double
boolean
Tells whether this node contains children.boolean
isLeaf()
void
setNestedShape
(com.macrofocus.geom.Shape shape) Sets the shape after nesting of the item in the map.void
setShape
(com.macrofocus.geom.Shape shape) Sets the shape of the item in the map.void
setSumSize
(double sumSize) Methods inherited from class com.treemap.AbstractTreeMapNode
getBounds, getColor, getCushionColor, getCushionImage, getLabelName, getLevel, getParent, getPath, getSelf, getShape, getSize, isRoot, normalizedToWorld, setColor, setParent, setSize, toString, worldToNormalized
-
Constructor Details
-
ParentTreeMapNode
public ParentTreeMapNode(Object name, TreeMapModel<N, Row, Column, Color, Font> model, TreeMapField<N, Column> groupByField, TreeMapField<N, Column> childrenGroupByField)
-
-
Method Details
-
setSumSize
public void setSumSize(double sumSize) -
getSumSize
public double getSumSize() -
getRow
Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node. -
getGroupByField
Description copied from interface:TreeMapNode
Returns the number of levels above this node -- the distance from the root to this node. If this node is the root, returns 0.- Returns:
- the number of levels above this node
-
getChildrenGroupByField
Description copied from interface:TreeMapNode
Returns the number of levels above this node -- the distance from the root to this node. If this node is the root, returns 0.- Returns:
- the number of levels above this node
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font>
-
hasNoChildren
public boolean hasNoChildren()Tells whether this node contains children.- Returns:
- true if this node contains children, false otherwise
-
isLeaf
public boolean isLeaf() -
getChildren
- Specified by:
getChildren
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font>
-
getChildrenOfTypeParent
- Specified by:
getChildrenOfTypeParent
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font>
-
add
-
findChild
-
getNodeName
The name of this node.- Specified by:
getNodeName
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font> - Returns:
- the name of this node.
-
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 interfaceMutableTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color> - Overrides:
setShape
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font> - Parameters:
shape
- 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> - Overrides:
getNestedShape
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font> - Returns:
- 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> - Overrides:
setNestedShape
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,
Row, Column, Color, Font>, Row, Column, Color, Font> - Parameters:
shape
- the shape of the item in the map.
-
getMEC
public com.macrofocus.geom.Ellipse2D getMEC(TreeMapField<N, Column> xVariable, TreeMapField<N, Column> yVariable) Find the minimal enclosing circle (MEC) of a set of points -
getCH
public com.macrofocus.geom.GeneralPath getCH(TreeMapField<N, Column> xVariable, TreeMapField<N, Column> yVariable)
-