org.jCharts.imageMap

## Class ImageMapArea

- java.lang.Object
- - org.jCharts.imageMap.ImageMapArea

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    CircleMapArea, PolyMapArea, RectMapArea

      public abstract class ImageMapArea
      extends Object
      implements Serializable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private String` | `legendLabel`
    `private double` | `value`
    `(package private) int[]` | `x`
    `private String` | `xAxisLabel`
    `(package private) int[]` | `y`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImageMapArea(int numberOfPoints, double value, String xAxisLabel, String legendLabel)`
    `ImageMapArea(int numberOfPoints, Point2D.Double point, String legendLabel)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) abstract AreaShape` | `getAreaShape()`
    `protected void` | `getCoordinates(StringBuffer html)` Appends the coordinates to the passed html buffer.
    `String` | `getLengendLabel()` Returns the legend label represented by this map area.
    `int` | `getNumberOfCoordinates()` Returns the number of x,y coordinate pairs stored for the area
    `double` | `getValue()` Returns the data set value represented by this map.
    `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.
    `String` | `toHTML(String mapElementAttributes)` Returns a

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### x

          int[] x

    - #### y

          int[] y

    - #### value

          private double value

    - #### xAxisLabel

          private String xAxisLabel

    - #### legendLabel

          private String legendLabel

  - ### Constructor Detail

    - #### ImageMapArea

          ImageMapArea(int numberOfPoints,
                       double value,
                       String xAxisLabel,
                       String legendLabel)

      Parameters:
        `numberOfPoints` -
        `value` -
        `xAxisLabel` -
        `legendLabel` -

    - #### ImageMapArea

          ImageMapArea(int numberOfPoints,
                       Point2D.Double point,
                       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 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 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(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 String toHTML(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