CyDAS Home funded by   Sponsor: DFG
CyDASGeneralControls Documentation Image Map Overview Class ImageMapData Documentation Section HowTo Section Online Analysis Section Download Section Resources Section About Section

CyDAS General Controls: Class ImageMapArea

The class ImageMapArea describes one area of an interactive map.

It corresponds to an HTML element like e.g. "<area shape="myshape" href="myHREF.html" coords="225,160,495,210" title="my title">", but provides further properties for use outside the web.

Overview


ImageMapArea
New() 
New(shape: Shapes, coords: Integer(), href: String)
New(shape: Shapes, coords: Integer(), href: String, command: String)
New(shape: Shapes, coords: Integer(), href: String, command: String, title: String)
New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String)
New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String, onclick: String)
New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String, onclick: String, tag: Object)
Shape: Shapes
Coords: Integer()
HREF: String
Command: String
Title: String
AltText: String
OnClick: String
Tag: Object
Target: String
clone(): Object {Implements ICloneable.Clone}
containsPoint(point: System.Drawing.Point): Boolean
toHTML(): String
transformCoordinates(addX: Integer, addY: Integer): Void

Programming Language

Availability

Constructors

Though all properties can be provided or changed after initialisation, the use of the parameterized constructors is recommended for clarity.

Public Sub New()

Instantiates a new ImageMapArea object.

Public Sub New(shape: Shapes, coords: Integer(), href: String)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Public Sub New(shape: Shapes, coords: Integer(), href: String, command: String)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Public Sub New(shape: Shapes, coords: Integer(), href: String, command: String, title: String)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Public Sub New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Public Sub New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String, onclick: String)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Public Sub New(shape: Shapes, coords: Integer(), href: String, command: String, title: String, alt: String, onclick: String, tag: Object)

Instantiates a new ImageMapArea object.

Parameters

Exception

Remarks

Interfaces

ICloneable

is implemented with the clone function.

Enumerations

The class provides enumerations for the Shape types of an ImageMap.

Enum Shapes

This enumeration describes the Shape types of an ImageMap. The acceptable types correspond to the types used with HTML image maps.
Value Meaning
rect rectangular
circle circular
poly polygonal

Properties

Shape As Shapes

Gets or sets the type of shape associated with this area. Acceptable values are defined by the Shapes enumeration.

Property Value

Remarks

Coords As Integer

Gets or sets the array with the coordinates describing the shape.

Property Value

Exceptions

Remarks

HREF As String

Gets or sets the URL the area is linked with.

Property Value

Remarks

Command As String

Gets or sets a command associated with the area.

Property Value

Remarks

Title As String

Gets or sets the  text to be displayed in a tooltip window when the mouse is over this area.

Property Value

Remarks

AltText As String

Gets or sets the text to be displayed in non-graphical browsers.

Property Value

Remarks

OnClick As String

Gets or sets the command to be executed by the browser (e.g. JavaScript) when this area is clicked.

Property Value

Remarks

Tag As Object

Gets or sets an object linked to the element.

Property Value

Remarks

Target As String

Gets or sets the name of a browser document window associated with the HTML link to be followed.

Property Value

Remarks

Methods

Public Function clone() As Object

Returns a clone of the ImageMapArea object.

Return Value

Parameters

Implements

Remarks

Public Function containsPoint(ByVal point As System.Drawing.Point) As Boolean

Checks if the coordinates of point are inside the area.

Return Value

Remarks

Public Function toHTML() As String

Returns an HTML representation of the area element.

Return Value

Parameters

Remarks

Examples

Public Function transformCoordinates(ByVal addX As Integer, ByVal addY As Integer)

Transforms the coordinates of the area by adding the given values to the x and y coordinates of the points of the area.

Return Value

Parameters

Remarks

Interaction with other classes

Classes using ImageMapArea

ImageMapArea objects are stored in an arraylist in an ImageMapData object. There, they represent the area portions of the image map.