Class MyMutableTreeMapNode
- java.lang.Object
-
- com.macrofocus.treemap.voronoi.debug.MyMutableTreeMapNode
-
- All Implemented Interfaces:
MutableTreeMapNode,TreeMapNode
public class MyMutableTreeMapNode extends java.lang.Object implements MutableTreeMapNode
-
-
Constructor Summary
Constructors Constructor Description MyMutableTreeMapNode(java.lang.String name, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBounds()Gets the bounding rectangle of the item in the map.TreeMapFieldgetChildrenGroupByField()Returns the number of levels above this node -- the distance from the root to this node.com.macrofocus.igraphics.CPColorgetColor()TreeMapFieldgetGroupByField()Returns the number of levels above this node -- the distance from the root to this node.intgetLevel()Returns the number of levels above this node -- the distance from the root to this node.java.awt.ShapegetNestedShape()Gets the shape after nesting of the item in the map.java.awt.ShapegetShape()Gets the shape of the item in the map.doublegetSize()Corresponds to area in map.booleanhasNoChildren()Tells whether this node contains children.booleanisLeaf()voidsetColor(com.macrofocus.igraphics.CPColor c)Sets the color of the item in the map.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.voidsetSize(double size)Sets the size of the item.java.lang.StringtoString()
-
-
-
Method Detail
-
setSize
public void setSize(double size)
Description copied from interface:MutableTreeMapNodeSets the size of the item.- Specified by:
setSizein interfaceMutableTreeMapNode- Parameters:
size- the size of the item.
-
setColor
public void setColor(com.macrofocus.igraphics.CPColor c)
Description copied from interface:MutableTreeMapNodeSets the color of the item in the map.- Specified by:
setColorin interfaceMutableTreeMapNode- Parameters:
c- the color of the item in the map.
-
getColor
public com.macrofocus.igraphics.CPColor getColor()
- Specified by:
getColorin interfaceTreeMapNode
-
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- Parameters:
shape- the shape of the item in the map.
-
getSize
public double getSize()
Description copied from interface:TreeMapNodeCorresponds to area in map.- Specified by:
getSizein interfaceTreeMapNode- Returns:
- the area
-
getShape
public java.awt.Shape getShape()
Description copied from interface:TreeMapNodeGets the shape of the item in the map.- Specified by:
getShapein interfaceTreeMapNode- 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- 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- Returns:
- the shape of the item in the map.
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
Description copied from interface:TreeMapNodeGets the bounding rectangle of the item in the map.- Specified by:
getBoundsin interfaceTreeMapNode- Returns:
- the bounding rectangle of the item in the map.
-
getLevel
public int getLevel()
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:
getLevelin interfaceTreeMapNode- Returns:
- the number of levels above this node
-
getGroupByField
public TreeMapField 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- Returns:
- the number of levels above this node
-
getChildrenGroupByField
public TreeMapField 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- Returns:
- the number of levels above this node
-
hasNoChildren
public boolean hasNoChildren()
Description copied from interface:TreeMapNodeTells whether this node contains children.- Specified by:
hasNoChildrenin interfaceTreeMapNode- Returns:
- true if this node contains children, false otherwise
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfaceTreeMapNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-