Interface IArea
-
- All Superinterfaces:
IComponent<IArea>
public interface IArea extends IComponent<IArea>
ImmutableAreacomponentAn area of an
IImagemap. Instead of the application processing the coordinates, developers can add theIAreacomponents as children of aIImagemapcomponent thus defining a target. TheIImagemapcomponent 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 Classes Modifier and Type Interface Description static classIArea.BuilderBuilds instances of typeIArea.static classIArea.ShapeInsert AdjacentdirectionforwithShape(Shape)}static classIArea.UpdaterBuilds an updater of typeIAreaforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetCoords()Returns the coordination of this area.java.lang.StringgetShape()Returns the shape of this area.java.lang.IntegergetTabindex()Returnsnullif not set.java.lang.StringgetTooltiptext()Returns the text as the tooltip.default java.lang.StringgetWidgetClass()Returns the client widget class.static IAreaof(java.lang.String coords)Returns the instance with the given coordinates.static IAreaofId(java.lang.String id)Returns the instance with the given id.IAreawithCoords(java.lang.String coords)Returns a copy ofthisimmutable component with the specifiedcoords.IAreawithShape(java.lang.String shape)Returns a copy ofthisimmutable component with the specifiedshape.default IAreawithShape(IArea.Shape shape)Returns a copy ofthisimmutable component with the specifiedshape.IAreawithTabindex(java.lang.Integer tabindex)Returns a copy ofthisimmutable component with the specifiedtabindex.IAreawithTooltiptext(java.lang.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 Detail
-
DEFAULT
static final IArea DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Area"- Specified by:
getWidgetClassin interfaceIComponent<IArea>- Returns:
-
getCoords
@Nullable java.lang.String getCoords()
Returns the coordination of this area.
-
withCoords
IArea withCoords(@Nullable java.lang.String coords)
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
@Nullable java.lang.String getShape()
Returns the shape of this area.Default:
null(means rectangle).
-
withShape
IArea withShape(@Nullable java.lang.String shape)
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
default IArea withShape(IArea.Shape shape)
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
@Nullable java.lang.String getTooltiptext()
Returns the text as the tooltip.Default:
null.
-
withTooltiptext
IArea withTooltiptext(@Nullable java.lang.String tooltiptext)
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
@Nullable java.lang.Integer getTabindex()
Returnsnullif not set.- Returns:
- the tab order of this component
-
withTabindex
IArea withTabindex(@Nullable java.lang.Integer tabindex)
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
static IArea of(java.lang.String coords)
Returns the instance with the given coordinates.- Parameters:
coords- The coordinates of this area.
-
ofId
static IArea ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-