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.Rectangle2D
getBounds()
Gets the bounding rectangle of the item in the map.TreeMapField
getChildrenGroupByField()
Returns the number of levels above this node -- the distance from the root to this node.com.macrofocus.igraphics.CPColor
getColor()
TreeMapField
getGroupByField()
Returns the number of levels above this node -- the distance from the root to this node.int
getLevel()
Returns the number of levels above this node -- the distance from the root to this node.java.awt.Shape
getNestedShape()
Gets the shape after nesting of the item in the map.java.awt.Shape
getShape()
Gets the shape of the item in the map.double
getSize()
Corresponds to area in map.boolean
hasNoChildren()
Tells whether this node contains children.boolean
isLeaf()
void
setColor(com.macrofocus.igraphics.CPColor c)
Sets the color of the item in the map.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.void
setSize(double size)
Sets the size of the item.java.lang.String
toString()
-
-
-
Method Detail
-
setSize
public void setSize(double size)
Description copied from interface:MutableTreeMapNode
Sets the size of the item.- Specified by:
setSize
in interfaceMutableTreeMapNode
- Parameters:
size
- the size of the item.
-
setColor
public void setColor(com.macrofocus.igraphics.CPColor c)
Description copied from interface:MutableTreeMapNode
Sets the color of the item in the map.- Specified by:
setColor
in interfaceMutableTreeMapNode
- Parameters:
c
- the color of the item in the map.
-
getColor
public com.macrofocus.igraphics.CPColor getColor()
- Specified by:
getColor
in interfaceTreeMapNode
-
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
- Parameters:
shape
- the shape of the item in the map.
-
getSize
public double getSize()
Description copied from interface:TreeMapNode
Corresponds to area in map.- Specified by:
getSize
in interfaceTreeMapNode
- Returns:
- the area
-
getShape
public java.awt.Shape getShape()
Description copied from interface:TreeMapNode
Gets the shape of the item in the map.- Specified by:
getShape
in interfaceTreeMapNode
- 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
- 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
- Returns:
- the shape of the item in the map.
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
Description copied from interface:TreeMapNode
Gets the bounding rectangle of the item in the map.- Specified by:
getBounds
in interfaceTreeMapNode
- Returns:
- the bounding rectangle of the item in the map.
-
getLevel
public int getLevel()
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:
getLevel
in interfaceTreeMapNode
- Returns:
- the number of levels above this node
-
getGroupByField
public TreeMapField 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
- Returns:
- the number of levels above this node
-
getChildrenGroupByField
public TreeMapField 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
- Returns:
- the number of levels above this node
-
hasNoChildren
public boolean hasNoChildren()
Description copied from interface:TreeMapNode
Tells whether this node contains children.- Specified by:
hasNoChildren
in interfaceTreeMapNode
- Returns:
- true if this node contains children, false otherwise
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfaceTreeMapNode
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-