Package com.macrofocus.treemap
Class LeafTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractTreeMapNode<N,Row,Column,Color,Font>
-
- com.macrofocus.treemap.LeafTreeMapNode<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>,java.lang.Comparable<N>
public class LeafTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font> extends AbstractTreeMapNode<N,Row,Column,Color,Font> implements java.lang.Comparable<N>
A leaf node.
-
-
Field Summary
-
Fields inherited from class com.macrofocus.treemap.AbstractTreeMapNode
model
-
-
Constructor Summary
Constructors Constructor Description LeafTreeMapNode(Row row, TreeMapModel<N,Row,Column,Color,Font> model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(N newChild)intcompareTo(N o)booleanequals(java.lang.Object o)NfindChild(java.lang.Object name)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.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.inthashCode()booleanhasNoChildren()Tells whether this node contains children.booleanisLeaf()-
Methods inherited from class com.macrofocus.treemap.AbstractTreeMapNode
getBounds, getColor, getCushionColor, getCushionImage, getLabelName, getLevel, getNestedShape, getParent, getPath, getSelf, getShape, getSize, isRoot, normalizedToWorld, setColor, setNestedShape, setParent, setShape, setSize, toString, worldToNormalized
-
-
-
-
Method Detail
-
getRow
public Row getRow()
Gets the row in the underlying TableModel, -1 if it doesn't relate to a leaf node.
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
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.- Specified by:
getGroupByFieldin interfaceTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color>- 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.- Specified by:
getChildrenGroupByFieldin interfaceTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color>- Returns:
- the number of levels above this node
-
getChildren
public java.lang.Iterable<N> getChildren()
- Specified by:
getChildrenin classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
getChildrenOfTypeParent
public java.lang.Iterable<N> getChildrenOfTypeParent()
- Specified by:
getChildrenOfTypeParentin classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
add
public void add(N newChild)
-
findChild
public N findChild(java.lang.Object name)
-
hasNoChildren
public boolean hasNoChildren()
Tells whether this node contains children.- Specified by:
hasNoChildrenin interfaceTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color>- Returns:
- true if this node contains children, false otherwise
-
isLeaf
public boolean isLeaf()
-
getNodeName
public java.lang.Object getNodeName()
The name of this node.- Specified by:
getNodeNamein classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>- Returns:
- the name of this node.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-