|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--netcharts.server.util.ImageMapCreator
Basic Image Map Creator implementation. This class produces a MAP tag suitable for inclusion in an HTML page. Each of the MapElements passed to createImageMap will result in a corresponding AREA tag within the resultant MAP tag. Each of these AREA tags have the HREF defined in the MapElement, as well as its target. The parameters onMouseOver and onMouseOut to the method createImageMap allow for the creation of OnMouseOver and OnMouseOut attributes on the resultant AREA tags. The text of these attributes can include information that is specific to the MapElement corresponding to the AREA tag. Namely, the MapElement's HREF, target, or label can be inserted anywhere in the OnMouseOver or OnMouseOut text. This can be accomplished by using the value of LABEL_REPLACE, HREF_REPLACE, or TARGET_REPLACE in the text of your onMouseOver or onMouseOut parameter. For example:
ImageMapCreator.createImageMap(sgi.getMap(), sgi.getUniqueID(), "return popup('" + ImageMapCreator.LABEL_REPLACE + "')", "return popdown()", "javascript://");
The preceeding code would create an onMouseOver attribute in each AREA tag
that had that specific MapElement's label inserted in the javascript call to
popup. It would also create onMouseOut attributes which made a
call to the javascript function popdown. As in:
<AREA COORDS="23,45,12,45" onMouseOver="return popup('245.56')" onMouseOut="return popdown()" HREF="http://www.visualmining.com">
| Field Summary | |
static java.lang.String |
HREF_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the url value of the MapElement. |
static java.lang.String |
INDEX_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the selectedItemIndex value of the MapElement. |
static java.lang.String |
LABEL_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the label value of the MapElement. |
static java.lang.String |
LABELS_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the selectedItemLabels value of the MapElement. |
static java.lang.String |
PARAM_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the selectedItemParam value of the MapElement. |
static java.lang.String |
TARGET_REPLACE
The text in the onMouseOver or onMouseOut String that will be replaced by the target value of the MapElement. |
| Constructor Summary | |
ImageMapCreator()
|
|
| Method Summary | |
static java.lang.String |
createImageMap(MapElement[] mapElements,
java.lang.String mapName,
java.lang.String onMouseOver,
java.lang.String onMouseOut,
java.lang.String defaultHref)
Creates an image map using the given parameters. |
static java.lang.String |
createImageMap(MapElement[] mapElements,
java.lang.String mapName,
java.lang.String onMouseOver,
java.lang.String onMouseOut,
java.lang.String alt,
java.lang.String defaultHref)
Creates an image map using the given parameters. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String LABEL_REPLACE
public static final java.lang.String HREF_REPLACE
public static final java.lang.String TARGET_REPLACE
public static final java.lang.String INDEX_REPLACE
public static final java.lang.String PARAM_REPLACE
public static final java.lang.String LABELS_REPLACE
| Constructor Detail |
public ImageMapCreator()
| Method Detail |
public static java.lang.String createImageMap(MapElement[] mapElements,
java.lang.String mapName,
java.lang.String onMouseOver,
java.lang.String onMouseOut,
java.lang.String defaultHref)
mapElements - Array of MapElement objects. MapElements contain
a shape that specifies coordinates for the area tag in the image map.
It also provides target, href, label information.mapName - The name of the image map.onMouseOver - String containing javascript to run on the onMouseOver
event of the area tag.onMouseOut - String containing javascript to run on the onMouseOut
event of the area tag.defaultHref - Href to use if one isn't defined for the area tag.
public static java.lang.String createImageMap(MapElement[] mapElements,
java.lang.String mapName,
java.lang.String onMouseOver,
java.lang.String onMouseOut,
java.lang.String alt,
java.lang.String defaultHref)
mapElements - Array of MapElement objects. MapElements contain
a shape that specifies coordinates for the area tag in the image map.
It also provides target, href, label information.mapName - The name of the image map.onMouseOver - String containing javascript to run on the onMouseOver
event of the area tag.onMouseOut - String containing javascript to run on the onMouseOut
event of the area tag.alt - String containing text for alt and title attributes of the area tag.defaultHref - Href to use if one isn't defined for the area tag.
|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2007 |
Last Modified: Jun 14, 2007 |