DhImageMap Class

DhImageMap Class

This Package | All Packages

DhElement
  |
  +--DhBaseContainer
    |
    +--DhImageMap
public class DhImageMap
extends DhBaseContainer

Represents an image map. An image map contains several DhHotSpot items that describe the areas in the image that the user can click to navigate.

Constructors
Name Description
DhImageMap() Creates a DhImageMap object.
DhImageMap( String strName ) Creates a DhImageMap object.

Methods
Name Description
addHotSpot( DhHotSpot hs ) Adds a DhHotSpot object to this image map.
addHotSpot( int nShape, String strCoords, String strUrl ) Adds a DhHotSpot object to this image map.
addHotSpot( int nShape, String strCoords, DhHyperlink hlUrl ) Adds a DhHotSpot object to this image map.
getHotSpots() Retrieves an array of the DhHotSpot objects contained in this image map.
getName() Retrieves the name for this image map.
removeHotSpot( DhHotSpot hs ) Removes the specified DhHotSpot from the image map.
setName( String strName ) Sets the name for this image map.

Constructors

DhImageMap.DhImageMap

Syntax 1
public DhImageMap();
Description

Creates a DhImageMap object. The name of the image map is generated automatically.



Syntax 2
public DhImageMap( String strName );
Parameters
strName
The name of the image map.
Description

Creates a DhImageMap object. This constructor creates a map with a specified name.

Methods

DhImageMap.addHotSpot

Syntax 1
public void addHotSpot( DhHotSpot hs );
Parameters
hs
The DhHotSpot to add.
Description

Adds a DhHotSpot object to this image map.



Syntax 2
public void addHotSpot( int nShape, String strCoords, String strUrl );
Parameters
nShape
The shape of the hot spot. Can be any one of DhHotSpot.SHAPE_RECTANGLE, DhHotSpot.SHAPE_POLYGON, or DhHotSpot.SHAPE_CIRCLE.
strCoords
The coordinate string for this hotspot. For details, see DhHotSpot.
strUrl
The URL to navigate to if the hot spot is selected.
Description

Adds a DhHotSpot object to this image map.



Syntax 3
public void addHotSpot( int nShape, String strCoords, DhHyperlink hlUrl );
Parameters
nShape
The shape of the hot spot. Can be any one of DhHotSpot.SHAPE_RECTANGLE, DhHotSpot.SHAPE_POLYGON, or DhHotSpot.SHAPE_CIRCLE.
strCoords
The coordinate string for this hotspot. For details, see DhHotSpot.
hlUrl
The URL to navigate to if the hot spot is selected.
Description

Adds a DhHotSpot object to this image map.

DhImageMap.getHotSpots

Syntax
public synchronized DhHotSpot[] getHotSpots();
Return Value

Returns the DhHotSpot array.

Description

Retrieves an array of the DhHotSpot objects contained in this image map.

DhImageMap.getName

Syntax
public String getName();
Return Value

Returns the image map name.

Description

Retrieves the name for this image map.

DhImageMap.removeHotSpot

Syntax
public synchronized void removeHotSpot( DhHotSpot hs );
Parameters
hs
The DhHotSpot to remove.
Description

Removes the specified DhHotSpot from the image map.

DhImageMap.setName

Syntax
public void setName( String strName );
Parameters
strName
The name of the image map.
Description

Sets the name for this image map.