Interface IArea
-
- All Superinterfaces:
IComponent<IArea>
public interface IArea extends IComponent<IArea>
ImmutableArea
componentAn area of an
IImagemap
. Instead of the application processing the coordinates, developers can add theIArea
components as children of aIImagemap
component thus defining a target. TheIImagemap
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 Classes Modifier and Type Interface Description static class
IArea.Builder
Builds instances of typeIArea
.static class
IArea.Shape
Insert Adjacentdirection
forwithShape(Shape)
}static class
IArea.Updater
Builds an updater of typeIArea
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getCoords()
Returns the coordination of this area.java.lang.String
getShape()
Returns the shape of this area.java.lang.Integer
getTabindex()
Returnsnull
if not set.java.lang.String
getTooltiptext()
Returns the text as the tooltip.default java.lang.String
getWidgetClass()
Returns the client widget class.static IArea
of(java.lang.String coords)
Returns the instance with the given coordinates.static IArea
ofId(java.lang.String id)
Returns the instance with the given id.IArea
withCoords(java.lang.String coords)
Returns a copy ofthis
immutable component with the specifiedcoords
.IArea
withShape(java.lang.String shape)
Returns a copy ofthis
immutable component with the specifiedshape
.default IArea
withShape(IArea.Shape shape)
Returns a copy ofthis
immutable component with the specifiedshape
.IArea
withTabindex(java.lang.Integer tabindex)
Returns a copy ofthis
immutable component with the specifiedtabindex
.IArea
withTooltiptext(java.lang.String tooltiptext)
Returns a copy ofthis
immutable 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:
getWidgetClass
in 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 ofthis
immutable component with the specifiedcoords
.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. If the coordinates in one IArea component overlap with another, the first one takes precedence.
- Returns:
- A modified copy of the
this
object
-
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 ofthis
immutable component with the specifiedshape
.Sets the
shape
of this IArea.- Parameters:
shape
-"rectangle"
,"rect"
,"circle"
,"cric"
,"polygon"
,"poly"
ornull
.- Returns:
- A modified copy of the
this
object
-
withShape
default IArea withShape(IArea.Shape shape)
Returns a copy ofthis
immutable component with the specifiedshape
.Sets the
shape
of this IArea.- Parameters:
shape
-IArea.Shape.RECTANGLE
,IArea.Shape.CIRCLE
orIArea.Shape.POLYGON
.- Returns:
- A modified copy of the
this
object
-
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 ofthis
immutable component with the specifiedtooltiptext
.Sets the text as the tooltip.
- Parameters:
tooltiptext
- The text as the tooltip.- Returns:
- A modified copy of the
this
object
-
getTabindex
@Nullable java.lang.Integer getTabindex()
Returnsnull
if not set.- Returns:
- the tab order of this component
-
withTabindex
IArea withTabindex(@Nullable java.lang.Integer tabindex)
Returns a copy ofthis
immutable 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
this
object
-
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
-
-