|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.engine.HotSpotMap
lt.monarch.chart.engine.SimpleHotSpotMap
lt.monarch.chart.servlet.ImageMap
public class ImageMap extends SimpleHotSpotMap
HotSpotMap class for HTML client side image map generation. It has to be configured with a list
of desired HTML links and associated chart entities. Only information for the desired link hot
spot areas is gathered. All other hot spots are ignored.
Also features a polygon optimizer, which decreases the number of polygon points up to the
configured limit, while trying to preserve the original polygon shape.
| Modifier and Type | Class and Description |
|---|
| Nested classes/interfaces inherited from class lt.monarch.chart.engine.SimpleHotSpotMap |
|---|
SimpleHotSpotMap.HotSpot |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<ImageMapLink> |
definedLinks
an array of defined links |
| Fields inherited from class lt.monarch.chart.engine.SimpleHotSpotMap |
|---|
map |
| Constructor and Description |
|---|
ImageMap()
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
buildHTMLdef(java.awt.geom.GeneralPath p)
Returns a HTML definition of tag parameters. |
protected java.lang.String |
buildHTMLdef(Rectangle2D r)
Returns a HTML definition of tag parameters. |
void |
defineLink(ImageMapLink link)
Adds a link and instructs the map to gather information on the entities, which are addressed by the link entity. |
void |
mapEntity(ChartEntity entity,
Polygon2D polygon)
Maps the chart entity to the specified polygon. |
void |
mapEntity(ChartEntity entity,
Rectangle2D rectangle)
Maps the chart entity to the specified Rectangle. |
void |
mapEntity(ChartEntity entity,
java.awt.Shape shape)
Maps the specified chart entity to the specified polygon. |
void |
mapLegend(boolean mapping)
Sets capability map legend to image map or not. |
java.lang.String |
renderMap()
Creates and returns the image map as an HTML string. |
void |
setMaxPolygonPoints(int count)
Sets the maximum number of acceptable polygon points for the polygon optimizer. |
void |
undefineLink(ImageMapLink link)
Removes the link and cleans up all associated hot spot information. |
| Methods inherited from class lt.monarch.chart.engine.SimpleHotSpotMap |
|---|
clear, clearEntity, findAllEntitiesAt, findEntitiesInside, findEntitiesIntersecting, findEntityAt, getEntityPosition, getEntityShape, getEntityShape, getObjectById, mapEntity, mapEntity, mapEntity |
| Methods inherited from class lt.monarch.chart.engine.HotSpotMap |
|---|
contains |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<ImageMapLink> definedLinks
| Constructor Detail |
|---|
public ImageMap()
| Method Detail |
|---|
public void setMaxPolygonPoints(int count)
count - number of polygon pointspublic void defineLink(ImageMapLink link)
link - link objectpublic void undefineLink(ImageMapLink link)
link - link object
public void mapEntity(ChartEntity entity,
Rectangle2D rectangle)
mapEntity in class SimpleHotSpotMapentity - the chart entityrectangle - the Rectangle
public void mapEntity(ChartEntity entity,
Polygon2D polygon)
entity - the chart entitypolygon - the polygon
public void mapEntity(ChartEntity entity,
java.awt.Shape shape)
mapEntity in class SimpleHotSpotMapentity - the chart entityshape - the shapepublic void mapLegend(boolean mapping)
mapping - boolean constantprotected java.lang.String buildHTMLdef(java.awt.geom.GeneralPath p)
shape="poly"
coords= plus list of the polygon points coordinate's. For example: shape="poly"
coords="15,21,24,54,25,75".
p - the polygon containing image map's coordinatesprotected java.lang.String buildHTMLdef(Rectangle2D r)
shape="rect"
coords= plus coordinates of top left and bottom right points of the rectangle. For
example: shape="rect" coords="15,21,24,54".
r - the rectangle containing image map's coordinatespublic java.lang.String renderMap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||