Package org.jCharts.imageMap
Class ImageMapArea
java.lang.Object
org.jCharts.imageMap.ImageMapArea
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CircleMapArea
,PolyMapArea
,RectMapArea
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImageMapArea
(int numberOfPoints, double value, String xAxisLabel, String legendLabel) ImageMapArea
(int numberOfPoints, Point2D.Double point, String legendLabel) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract AreaShape
protected void
getCoordinates
(StringBuffer html) Appends the coordinates to the passed html buffer.final String
Returns the legend label represented by this map area.final int
Returns the number of x,y coordinate pairs stored for the areafinal double
getValue()
Returns the data set value represented by this map.final String
Rather than create an AxisChart specifc map area class just for this field, i put it here.final int
getXCoordinate
(int index) Returns the x coordinate at the specified index.final int
getYCoordinate
(int index) Returns the y coordinate at the specified index.final String
Returns a
-
Field Details
-
x
int[] x -
y
int[] y -
value
private double value -
xAxisLabel
-
legendLabel
-
-
Constructor Details
-
ImageMapArea
- Parameters:
numberOfPoints
-value
-xAxisLabel
-legendLabel
-
-
ImageMapArea
ImageMapArea(int numberOfPoints, Point2D.Double point, String legendLabel) - Parameters:
numberOfPoints
-point
-legendLabel
-
-
-
Method Details
-
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
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
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
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
Returns a<area shape="..." coords="....." + mapElementAttributes >
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
-