Interface IArea
- All Superinterfaces:
IComponent<IArea>
Area component
An area of an IImagemap. Instead of the application processing the coordinates,
developers can add the IArea components as children of a IImagemap component thus defining a target.
The IImagemap component will translate the mouse pointer coordinates into a logical name e.g. The id of the area the user clicked.
If the coordinates in one area component overlap with another, the first one takes precedence.
- Author:
- katherine
- See Also:
-
Area
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeIArea.static enumInsert AdjacentdirectionforwithShape(Shape)}static classBuilds an updater of typeIAreaforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the coordination of this area.getShape()Returns the shape of this area.Returnsnullif not set.Returns the text as the tooltip.default StringReturns the client widget class.static IAreaReturns the instance with the given coordinates.static IAreaReturns the instance with the given id.withCoords(String coords) Returns a copy ofthisimmutable component with the specifiedcoords.Returns a copy ofthisimmutable component with the specifiedshape.default IAreawithShape(IArea.Shape shape) Returns a copy ofthisimmutable component with the specifiedshape.withTabindex(Integer tabindex) Returns a copy ofthisimmutable component with the specifiedtabindex.withTooltiptext(String tooltiptext) Returns a copy ofthisimmutable component with the specifiedtooltiptext.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.wgt.Area"- Specified by:
getWidgetClassin interfaceIComponent<IArea>- Returns:
-
getCoords
Returns the coordination of this area. -
withCoords
Returns a copy ofthisimmutable component with the specifiedcoords.Sets the
coordsof 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. If the coordinates in one IArea component overlap with another, the first one takes precedence.
- Returns:
- A modified copy of the
thisobject
-
getShape
Returns the shape of this area.Default:
null(means rectangle). -
withShape
Returns a copy ofthisimmutable component with the specifiedshape.Sets the
shapeof this IArea.- Parameters:
shape-"rectangle","rect","circle","cric","polygon","poly"ornull.- Returns:
- A modified copy of the
thisobject
-
withShape
Returns a copy ofthisimmutable component with the specifiedshape.Sets the
shapeof this IArea.- Parameters:
shape-IArea.Shape.RECTANGLE,IArea.Shape.CIRCLEorIArea.Shape.POLYGON.- Returns:
- A modified copy of the
thisobject
-
getTooltiptext
Returns the text as the tooltip.Default:
null. -
withTooltiptext
Returns a copy ofthisimmutable component with the specifiedtooltiptext.Sets the text as the tooltip.
- Parameters:
tooltiptext- The text as the tooltip.- Returns:
- A modified copy of the
thisobject
-
getTabindex
Returnsnullif not set.- Returns:
- the tab order of this component
-
withTabindex
Returns a copy ofthisimmutable component with the specifiedtabindex.Sets the tab order of this component. Removes the tabindex attribute if it's set to
null.- Parameters:
tabindex- The tab order of this component.- Returns:
- A modified copy of the
thisobject
-
of
Returns the instance with the given coordinates.- Parameters:
coords- The coordinates of this area.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-