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.StringlegendLabelprivate doublevalue(package private) int[]xprivate java.lang.StringxAxisLabel(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 AreaShapegetAreaShape()protected voidgetCoordinates(java.lang.StringBuffer html)Appends the coordinates to the passed html buffer.java.lang.StringgetLengendLabel()Returns the legend label represented by this map area.intgetNumberOfCoordinates()Returns the number of x,y coordinate pairs stored for the areadoublegetValue()Returns the data set value represented by this map.java.lang.StringgetXAxisLabel()Rather than create an AxisChart specifc map area class just for this field, i put it here.intgetXCoordinate(int index)Returns the x coordinate at the specified index.intgetYCoordinate(int index)Returns the y coordinate at the specified index.java.lang.StringtoHTML(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
-
-