Package org.zkoss.zul
Class Area
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zul.Area
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Component,Scope,ComponentCtrl
public class Area extends AbstractComponent
An area of aImagemap.- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children, AbstractComponent.ForwardInfo, AbstractComponent.TargetInfo
-
-
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
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeParentChanged(Component parent)Default: If parent is null, execute the @Destroy method if any.java.lang.StringgetCoords()Returns the coordination of this area.java.lang.StringgetShape()Returns the shape of this area.java.lang.IntegergetTabindexInteger()Returns null if not set.java.lang.StringgetTooltiptext()Returns the text as the tooltip.protected booleanisChildable()Default: not childable.protected voidrenderProperties(ContentRenderer renderer)Called by (ComponentCtrl.redraw(java.io.Writer)) to render the properties, excluding the enclosing tag and children.voidsetCoords(java.lang.String coords)Sets the coords of this area.voidsetShape(java.lang.String shape)Sets the shape of this area.voidsetTabindex(java.lang.Integer tabindex)Sets the tab order of this component.voidsetTooltiptext(java.lang.String tooltiptext)Sets the text as the tooltip.-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, clone, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getPropertyAccess, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
-
-
-
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 WrongValueExceptionSets the shape of this area.- Throws:
WrongValueException- if shape is not one of null, "rect", "rectangle", "circle", "circ", "polygon", and "poly".
-
getTabindexInteger
public java.lang.Integer getTabindexInteger()
Returns null if not set.- Returns:
- the tab order of this component
- Since:
- 8.0.2
-
setTabindex
public void setTabindex(java.lang.Integer tabindex)
Sets the tab order of this component. Removes the tabindex attribute if it's set to null.- Parameters:
tabindex-
-
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 ongetShape():- 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:
isChildablein classAbstractComponent
-
beforeParentChanged
public void beforeParentChanged(Component parent)
Description copied from class:AbstractComponentDefault: If parent is null, execute the @Destroy method if any.- Specified by:
beforeParentChangedin interfaceComponentCtrl- Overrides:
beforeParentChangedin classAbstractComponent- 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:AbstractComponentCalled 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 inAbstractComponent.getClientEvents()).Note: it doesn't render
AbstractComponent.getWidgetClass(),AbstractComponent.getUuid()andAbstractComponent.getMold(), which are caller's job.- Overrides:
renderPropertiesin classAbstractComponent- Throws:
java.io.IOException
-
-