Package org.jCharts.imageMap
Class ImageMapArea
- java.lang.Object
-
- org.jCharts.imageMap.ImageMapArea
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CircleMapArea
,PolyMapArea
,RectMapArea
public abstract class ImageMapArea extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
legendLabel
private double
value
(package private) int[]
x
private java.lang.String
xAxisLabel
(package private) int[]
y
-
Constructor Summary
Constructors Constructor Description ImageMapArea(int numberOfPoints, double value, java.lang.String xAxisLabel, java.lang.String legendLabel)
ImageMapArea(int numberOfPoints, java.awt.geom.Point2D.Double point, java.lang.String legendLabel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract AreaShape
getAreaShape()
protected void
getCoordinates(java.lang.StringBuffer html)
Appends the coordinates to the passed html buffer.java.lang.String
getLengendLabel()
Returns the legend label represented by this map area.int
getNumberOfCoordinates()
Returns the number of x,y coordinate pairs stored for the areadouble
getValue()
Returns the data set value represented by this map.java.lang.String
getXAxisLabel()
Rather than create an AxisChart specifc map area class just for this field, i put it here.int
getXCoordinate(int index)
Returns the x coordinate at the specified index.int
getYCoordinate(int index)
Returns the y coordinate at the specified index.java.lang.String
toHTML(java.lang.String mapElementAttributes)
Returns a
-
-
-
Constructor Detail
-
ImageMapArea
ImageMapArea(int numberOfPoints, double value, java.lang.String xAxisLabel, java.lang.String legendLabel)
- Parameters:
numberOfPoints
-value
-xAxisLabel
-legendLabel
-
-
ImageMapArea
ImageMapArea(int numberOfPoints, java.awt.geom.Point2D.Double point, java.lang.String legendLabel)
- Parameters:
numberOfPoints
-point
-legendLabel
-
-
-
Method Detail
-
getAreaShape
abstract AreaShape getAreaShape()
- Returns:
- AreaShape
-
getNumberOfCoordinates
public final int getNumberOfCoordinates()
Returns the number of x,y coordinate pairs stored for the area- Returns:
- int
-
getXCoordinate
public final int getXCoordinate(int index)
Returns the x coordinate at the specified index. Not returned as a Point Object so we can avoid uneeded Object creation/destruction overhead.- Returns:
- int
-
getYCoordinate
public final int getYCoordinate(int index)
Returns the y coordinate at the specified index. Not returned as a Point Object so we can avoid uneeded Object creation/destruction overhead.- Returns:
- int
-
getValue
public final double getValue()
Returns the data set value represented by this map.- Returns:
- double
-
getXAxisLabel
public final java.lang.String getXAxisLabel()
Rather than create an AxisChart specifc map area class just for this field, i put it here. This is not applicable for PieCharts.- Returns:
- String will return NULL for PieCharts
-
getLengendLabel
public final java.lang.String getLengendLabel()
Returns the legend label represented by this map area. Will be NULL if you did not pass a name to the data set constructor.- Returns:
- String
-
getCoordinates
protected void getCoordinates(java.lang.StringBuffer html)
Appends the coordinates to the passed html buffer. This is needed to facilitate the 'circle' map areas 'radius' value.- Parameters:
html
- pass a reference to the StringBuffer so I can minimize Object creation
-
toHTML
public final java.lang.String toHTML(java.lang.String mapElementAttributes)
Returns a HTML element. The mapElementAttributes frees this method from having to declare all attributes of the HTML map element.- Parameters:
mapElementAttributes
- allows you to place any map attributes you want: href, alt, onClick, onMouseOver, etc...- Returns:
- String the HTML
-
-