[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TImageMap.php (sommaire)

TImageMap and related class file.

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TImageMap.php 1397 2006-09-07 07:55:53Z wei $
Poids: 748 lignes (21 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 7 classes

TImageMap:: (10 méthodes):
  addParsedObject()
  addAttributesToRender()
  render()
  raisePostBackEvent()
  getHotSpotMode()
  setHotSpotMode()
  getHotSpots()
  getTarget()
  setTarget()
  onClick()

TImageMapEventParameter:: (2 méthodes):
  __construct()
  getPostBackValue()

THotSpotCollection:: (22 méthodes):
  insertAt()
  getViewState()
  setViewState()
  getAccessKey()
  setAccessKey()
  getAlternateText()
  setAlternateText()
  getHotSpotMode()
  setHotSpotMode()
  getNavigateUrl()
  setNavigateUrl()
  getPostBackValue()
  setPostBackValue()
  getTabIndex()
  setTabIndex()
  getCausesValidation()
  setCausesValidation()
  getValidationGroup()
  setValidationGroup()
  getTarget()
  setTarget()
  render()

TCircleHotSpot:: (8 méthodes):
  getShape()
  getCoordinates()
  getRadius()
  setRadius()
  getX()
  setX()
  getY()
  setY()

TRectangleHotSpot:: (10 méthodes):
  getShape()
  getCoordinates()
  getBottom()
  setBottom()
  getLeft()
  setLeft()
  getRight()
  setRight()
  getTop()
  setTop()

TPolygonHotSpot:: (3 méthodes):
  getShape()
  getCoordinates()
  setCoordinates()

THotSpotMode:: (0 méthodes):


Classe: TImageMap  - X-Ref

TImageMap class

TImageMap represents an image on a page. Hotspot regions can be defined
within the image. Depending on the {@link setHotSpotMode HotSpotMode},
clicking on the hotspots may trigger a postback or navigate to a specified
URL. The hotspots defined may be accessed via {@link getHotSpots HotSpots}.
Each hotspot is described as a {@link THotSpot}, which can be a circle,
rectangle, polygon, etc. To add hotspot in a template, use the following,
<code>
<com:TImageMap>
<com:TCircleHotSpot ... />
<com:TRectangleHotSpot ... />
<com:TPolygonHotSpot ... />
</com:TImageMap>
</code>

addParsedObject($object)   X-Ref
Processes an object that is created during parsing template.
This method adds {@link THotSpot} objects into the hotspot collection
of the imagemap.

param: string|TComponent text string or component parsed and instantiated in template

addAttributesToRender($writer)   X-Ref
Adds attribute name-value pairs to renderer.
This overrides the parent implementation with additional imagemap specific attributes.

param: THtmlWriter the writer used for the rendering purpose

render($writer)   X-Ref
Renders this imagemap.

param: THtmlWriter

raisePostBackEvent($param)   X-Ref
Raises the postback event.
This method is required by {@link IPostBackEventHandler} interface.
This method is mainly used by framework and control developers.

param: TEventParameter the event parameter

getHotSpotMode()   X-Ref

return: THotSpotMode the behavior of hotspot regions in this imagemap when they are clicked. Defaults to THotSpotMode::NotSet.

setHotSpotMode($value)   X-Ref
Sets the behavior of hotspot regions in this imagemap when they are clicked.
If an individual hotspot has a mode other than 'NotSet', the mode set in this
imagemap will be ignored. By default, 'NotSet' is equivalent to 'Navigate'.

param: THotSpotMode the behavior of hotspot regions in this imagemap when they are clicked.

getHotSpots()   X-Ref

return: THotSpotCollection collection of hotspots defined in this imagemap.

getTarget()   X-Ref

return: string  the target window or frame to display the new page when a hotspot region is clicked within the imagemap. Defaults to ''.

setTarget($value)   X-Ref

param: string  the target window or frame to display the new page when a hotspot region is clicked within the imagemap.

onClick($param)   X-Ref
Raises <b>OnClick</b> event.
This method is invoked when a hotspot region is clicked within the imagemap.
If you override this method, be sure to call the parent implementation
so that the event handler can be invoked.

param: TImageMapEventParameter event parameter to be passed to the event handlers

Classe: TImageMapEventParameter  - X-Ref

TImageMapEventParameter class.

TImageMapEventParameter represents a postback event parameter
when a hotspot is clicked and posts back in a {@link TImageMap}.
To retrieve the post back value associated with the hotspot being clicked,
access {@link getPostBackValue PostBackValue}.

__construct($postBackValue)   X-Ref
Constructor.

param: string post back value associated with the hotspot clicked

getPostBackValue()   X-Ref

return: string post back value associated with the hotspot clicked

Classe: THotSpotCollection  - X-Ref

THotSpotCollection class.

THotSpotCollection represents a collection of hotspots in an imagemap.

insertAt($index,$item)   X-Ref
Inserts an item at the specified position.
This overrides the parent implementation by inserting only {@link THotSpot}.

param: integer the speicified position.
param: mixed new item

getViewState($key,$defaultValue=null)   X-Ref
Returns a viewstate value.

This function is very useful in defining getter functions for component properties
that must be kept in viewstate.
param: string the name of the viewstate value to be returned
param: mixed the default value. If $key is not found in viewstate, $defaultValue will be returned
return: mixed the viewstate value corresponding to $key

setViewState($key,$value,$defaultValue=null)   X-Ref
Sets a viewstate value.

This function is very useful in defining setter functions for control properties
that must be kept in viewstate.
Make sure that the viewstate value must be serializable and unserializable.
param: string the name of the viewstate value
param: mixed the viewstate value to be set
param: mixed default value. If $value===$defaultValue, the item will be cleared from the viewstate.

getAccessKey()   X-Ref

return: string the access key that allows you to quickly navigate to the HotSpot region. Defaults to ''.

setAccessKey($value)   X-Ref

param: string the access key that allows you to quickly navigate to the HotSpot region.

getAlternateText()   X-Ref

return: string the alternate text to display for a HotSpot object. Defaults to ''.

setAlternateText($value)   X-Ref

param: string the alternate text to display for a HotSpot object.

getHotSpotMode()   X-Ref

return: THotSpotMode the behavior of a HotSpot object when it is clicked. Defaults to THotSpotMode::NotSet.

setHotSpotMode($value)   X-Ref

param: THotSpotMode the behavior of a HotSpot object when it is clicked.

getNavigateUrl()   X-Ref

return: string the URL to navigate to when a HotSpot object is clicked. Defaults to ''.

setNavigateUrl($value)   X-Ref

param: string the URL to navigate to when a HotSpot object is clicked.

getPostBackValue()   X-Ref

return: string a value that is post back when the HotSpot is clicked. Defaults to ''.

setPostBackValue($value)   X-Ref

param: string a value that is post back when the HotSpot is clicked.

getTabIndex()   X-Ref

return: integer the tab index of the HotSpot region. Defaults to 0.

setTabIndex($value)   X-Ref

param: integer the tab index of the HotSpot region.

getCausesValidation()   X-Ref

return: boolean whether postback event trigger by this hotspot will cause input validation, default is true

setCausesValidation($value)   X-Ref

param: boolean whether postback event trigger by this hotspot will cause input validation

getValidationGroup()   X-Ref

return: string the group of validators which the hotspot causes validation upon postback

setValidationGroup($value)   X-Ref

param: string the group of validators which the hotspot causes validation upon postback

getTarget()   X-Ref

return: string  the target window or frame to display the new page when the HotSpot region

setTarget($value)   X-Ref

param: string  the target window or frame to display the new page when the HotSpot region

render($writer)   X-Ref
Renders this hotspot.

param: THtmlWriter

Classe: TCircleHotSpot  - X-Ref

Class TCircleHotSpot.

TCircleHotSpot defines a circular hot spot region in a {@link TImageMap}
control.

getShape()   X-Ref

return: string shape of this hotspot.

getCoordinates()   X-Ref

return: string coordinates defining this hotspot shape

getRadius()   X-Ref

return: integer radius of the circular HotSpot region. Defaults to 0.

setRadius($value)   X-Ref

param: integer radius of the circular HotSpot region.

getX()   X-Ref

return: integer the X coordinate of the center of the circular HotSpot region. Defaults to 0.

setX($value)   X-Ref

param: integer the X coordinate of the center of the circular HotSpot region.

getY()   X-Ref

return: integer the Y coordinate of the center of the circular HotSpot region. Defaults to 0.

setY($value)   X-Ref

param: integer the Y coordinate of the center of the circular HotSpot region.

Classe: TRectangleHotSpot  - X-Ref

Class TRectangleHotSpot.

TRectangleHotSpot defines a rectangle hot spot region in a {@link
TImageMap} control.

getShape()   X-Ref

return: string shape of this hotspot.

getCoordinates()   X-Ref

return: string coordinates defining this hotspot shape

getBottom()   X-Ref

return: integer the Y coordinate of the bottom side of the rectangle HotSpot region. Defaults to 0.

setBottom($value)   X-Ref

param: integer the Y coordinate of the bottom side of the rectangle HotSpot region.

getLeft()   X-Ref

return: integer the X coordinate of the right side of the rectangle HotSpot region. Defaults to 0.

setLeft($value)   X-Ref

param: integer the X coordinate of the right side of the rectangle HotSpot region.

getRight()   X-Ref

return: integer the X coordinate of the right side of the rectangle HotSpot region. Defaults to 0.

setRight($value)   X-Ref

param: integer the X coordinate of the right side of the rectangle HotSpot region.

getTop()   X-Ref

return: integer the Y coordinate of the top side of the rectangle HotSpot region. Defaults to 0.

setTop($value)   X-Ref

param: integer the Y coordinate of the top side of the rectangle HotSpot region.

Classe: TPolygonHotSpot  - X-Ref

Class TPolygonHotSpot.

TPolygonHotSpot defines a polygon hot spot region in a {@link
TImageMap} control.

getShape()   X-Ref

return: string shape of this hotspot.

getCoordinates()   X-Ref

return: string coordinates of the vertices defining the polygon.

setCoordinates($value)   X-Ref

param: string coordinates of the vertices defining the polygon.

Classe: THotSpotMode  - X-Ref

THotSpotMode class.
THotSpotMode defines the enumerable type for the possible hot spot modes.

The following enumerable values are defined:
- NotSet: the mode is not specified
- Navigate: clicking on the hotspot will redirect the browser to a different page
- PostBack: clicking on the hotspot will cause a postback
- Inactive: the hotspot is inactive (not clickable)



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7