Package com.macrofocus.treemap
Class ParentTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractTreeMapNode<N,Row,Column,Color,Font>
-
- com.macrofocus.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.macrofocus.treemap.AbstractTreeMapNode
model
-
-
Constructor Summary
Constructors Constructor Description ParentTreeMapNode(java.lang.Object name, TreeMapModel<N,Row,Column,Color,Font> model, TreeMapField<N,Column> groupByField, TreeMapField<N,Column> childrenGroupByField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(N child)
N
findChild(java.lang.Object name)
java.awt.geom.GeneralPath
getCH(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)
int
getChildCount()
java.lang.Iterable<N>
getChildren()
TreeMapField<N,Column>
getChildrenGroupByField()
Returns the number of levels above this node -- the distance from the root to this node.java.lang.Iterable<N>
getChildrenOfTypeParent()
TreeMapField<N,Column>
getGroupByField()
Returns the number of levels above this node -- the distance from the root to this node.java.awt.geom.Ellipse2D
getMEC(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)
Find the minimal enclosing circle (MEC) of a set of pointsjava.awt.Shape
getNestedShape()
Gets the shape after nesting of the item in the map.java.lang.Object
getNodeName()
The name of this node.Row
getRow()
Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.boolean
hasNoChildren()
Tells whether this node contains children.boolean
isLeaf()
void
setNestedShape(java.awt.Shape shape)
Sets the shape after nesting of the item in the map.void
setShape(java.awt.Shape shape)
Sets the shape of the item in the map.-
Methods inherited from class com.macrofocus.treemap.AbstractTreeMapNode
getBounds, getColor, getCushionColor, getCushionImage, getLabelName, getLevel, getParent, getPath, getSelf, getShape, getSize, isRoot, normalizedToWorld, setColor, setParent, setSize, toString, worldToNormalized
-
-
-
-
Constructor Detail
-
ParentTreeMapNode
public ParentTreeMapNode(java.lang.Object name, TreeMapModel<N,Row,Column,Color,Font> model, TreeMapField<N,Column> groupByField, TreeMapField<N,Column> childrenGroupByField)
-
-
Method Detail
-
getRow
public Row getRow()
Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.
-
getGroupByField
public TreeMapField<N,Column> 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
public TreeMapField<N,Column> 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
public java.lang.Iterable<N> getChildren()
- Specified by:
getChildren
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
getChildrenOfTypeParent
public java.lang.Iterable<N> getChildrenOfTypeParent()
- Specified by:
getChildrenOfTypeParent
in classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
add
public void add(N child)
-
findChild
public N findChild(java.lang.Object name)
-
getNodeName
public java.lang.Object 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(java.awt.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 java.awt.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(java.awt.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 java.awt.geom.Ellipse2D getMEC(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)
Find the minimal enclosing circle (MEC) of a set of points
-
getCH
public java.awt.geom.GeneralPath getCH(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)
-
-