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 void
add(N newChild)
int
compareTo(N o)
boolean
equals(java.lang.Object o)
N
findChild(java.lang.Object name)
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.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.int
hashCode()
boolean
hasNoChildren()
Tells whether this node contains children.boolean
isLeaf()
-
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:
getChildCount
in classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
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.- Specified by:
getGroupByField
in 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: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.- Specified by:
getChildrenGroupByField
in 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:
getChildren
in classAbstractTreeMapNode<N extends LeafTreeMapNode<N,Row,Column,Color,Font>,Row,Column,Color,Font>
-
getChildrenOfTypeParent
public java.lang.Iterable<N> getChildrenOfTypeParent()
- Specified by:
getChildrenOfTypeParent
in 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:
hasNoChildren
in 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:
getNodeName
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-