org.zkoss.zul
Class Area

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zul.Area
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Component, Scope, ComponentCtrl

public class Area
extends AbstractComponent

An area of a Imagemap.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children
 
Field Summary
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
Area()
           
Area(java.lang.String coords)
           
 
Method Summary
 void beforeParentChanged(Component parent)
          Default: does nothing.
 java.lang.String getCoords()
          Returns the coordination of this area.
 java.lang.String getShape()
          Returns the shape of this area.
 java.lang.String getTooltiptext()
          Returns the text as the tooltip.
protected  boolean isChildable()
          Default: not childable.
protected  void renderProperties(ContentRenderer renderer)
          Called by (ComponentCtrl.redraw(java.io.Writer)) to render the properties, excluding the enclosing tag and children.
 void setCoords(java.lang.String coords)
          Sets the coords of this area.
 void setShape(java.lang.String shape)
          Sets the shape of this area.
 void setTooltiptext(java.lang.String tooltiptext)
          Sets the text as the tooltip.
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, clone, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Area

public Area()

Area

public Area(java.lang.String coords)
Method Detail

getShape

public java.lang.String getShape()
Returns the shape of this area.

Default: null (means rectangle).


setShape

public void setShape(java.lang.String shape)
              throws WrongValueException
Sets the shape of this area.

Throws:
WrongValueException - if shape is not one of null, "rect", "rectangle", "circle", "circ", "polygon", and "poly".

getCoords

public java.lang.String getCoords()
Returns the coordination of this area.


setCoords

public void setCoords(java.lang.String coords)
Sets the coords of this area. Its content depends on getShape():
circle
coords="x,y,r"
polygon
coords="x1,y1,x2,y2,x3,y3..."
The polygon is automatically closed, so it is not necessary to repeat the first coordination.
rectangle
coords="x1,y1,x2,y2"

Note: (0, 0) is the upper-left corner.


getTooltiptext

public java.lang.String getTooltiptext()
Returns the text as the tooltip.

Default: null.


setTooltiptext

public void setTooltiptext(java.lang.String tooltiptext)
Sets the text as the tooltip.


isChildable

protected boolean isChildable()
Default: not childable.

Overrides:
isChildable in class AbstractComponent

beforeParentChanged

public void beforeParentChanged(Component parent)
Description copied from class: AbstractComponent
Default: does nothing.

Specified by:
beforeParentChanged in interface ComponentCtrl
Overrides:
beforeParentChanged in class AbstractComponent
Parameters:
parent - the new parent. If null, it means detachment.
See Also:
ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)

renderProperties

protected void renderProperties(ContentRenderer renderer)
                         throws java.io.IOException
Description copied from class: AbstractComponent
Called by (ComponentCtrl.redraw(java.io.Writer)) to render the properties, excluding the enclosing tag and children.

Default: it renders AbstractComponent.getId() if it was assigned, and event names if listened (and listed in AbstractComponent.getClientEvents()).

Note: it doesn't render AbstractComponent.getWidgetClass(), AbstractComponent.getUuid() and AbstractComponent.getMold(), which are caller's job.

Overrides:
renderProperties in class AbstractComponent
Throws:
java.io.IOException


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo