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, Area

public class Area
extends AbstractComponent
implements Area

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 class org.zkoss.zk.ui.AbstractComponent
_visible
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Area()
           
Area(java.lang.String coords)
           
 
Method Summary
 java.lang.String getCoords()
          Returns the coordination of this area.
 java.lang.String getOuterAttrs()
          Returns the attributes for generating the HTML tag; never return null.
 java.lang.String getShape()
          Returns the shape of this area.
 java.lang.String getTooltiptext()
          Returns the text as the tooltip.
 void setCoords(java.lang.String coords)
          Sets the coords of this area.
 void setId(java.lang.String id)
          Sets the ID.
 void setParent(Component parent)
          Sets the parent component.
 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, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, invalidate, isAsapRequired, isChildable, isInvalidated, isListenerAvailable, isVisible, newChildren, newExtraCtrl, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setMold, setPage, setPageBefore, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
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 final java.lang.String getShape()
Returns the shape of this area.

Default: null (means rectangle).


setShape

public final 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", "ploygon", and "poly".

getCoords

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


setCoords

public final 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.

Specified by:
getTooltiptext in interface Area

setTooltiptext

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

Specified by:
setTooltiptext in interface Area

getOuterAttrs

public java.lang.String getOuterAttrs()
Returns the attributes for generating the HTML tag; never return null.

Used only by component developers.


setId

public void setId(java.lang.String id)
Description copied from interface: Component
Sets the ID. The scope of uniqunes depends on whether this component is a root component. Refer to Component.getId() for more details.

When a component is constructed, an ID is generated automatically. Thus, calling this method only you need to identify a component.

Specified by:
setId in interface Component
Overrides:
setId in class AbstractComponent
Parameters:
id - the identifier. It cannot be empty. If null, it means the previous ID is removed (aka., reset) and an anonymous ID is assigned.
See Also:
Page

setParent

public void setParent(Component parent)
Description copied from interface: Component
Sets the parent component.

Note: Component.setParent(org.zkoss.zk.ui.Component) always calls back Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and/or Component.removeChild(org.zkoss.zk.ui.Component), while Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.removeChild(org.zkoss.zk.ui.Component) always calls back Component.setParent(org.zkoss.zk.ui.Component), if the parent is changed. Thus, you don't need to override both Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.setParent(org.zkoss.zk.ui.Component), if you want to customize the behavior.

Specified by:
setParent in interface Component
Overrides:
setParent in class AbstractComponent


Copyright © 2005-2009 Potix Corporation. All Rights Reserved.