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 voidadd(N child)NfindChild(java.lang.Object name)java.awt.geom.GeneralPathgetCH(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)intgetChildCount()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.Ellipse2DgetMEC(TreeMapField<N,Column> xVariable, TreeMapField<N,Column> yVariable)Find the minimal enclosing circle (MEC) of a set of pointsjava.awt.ShapegetNestedShape()Gets the shape after nesting of the item in the map.java.lang.ObjectgetNodeName()The name of this node.RowgetRow()Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.booleanhasNoChildren()Tells whether this node contains children.booleanisLeaf()voidsetNestedShape(java.awt.Shape shape)Sets the shape after nesting of the item in the map.voidsetShape(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:TreeMapNodeReturns 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:TreeMapNodeReturns 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:
getChildCountin 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:
getChildrenin classAbstractTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
getChildrenOfTypeParent
public java.lang.Iterable<N> getChildrenOfTypeParent()
- Specified by:
getChildrenOfTypeParentin 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:
getNodeNamein 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:MutableTreeMapNodeSets the shape of the item in the map.- Specified by:
setShapein interfaceMutableTreeMapNode<N extends AbstractTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color>- Overrides:
setShapein 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: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>- Overrides:
getNestedShapein 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: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>- Overrides:
setNestedShapein 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)
-
-