Package eu.webtoolkit.jwt
Class WPolygonArea
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractArea
eu.webtoolkit.jwt.WPolygonArea
An interactive area in a widget, specified by a polygon.
The area may be added to a WImage or WPaintedWidget to provide interactivity
on a polygon area of the image. The polygon is specified in pixel coordinates, and uses an
even-odd winding rule (overlaps create holes).
The polygon area corresponds to the HTML <area shape="poly"> tag.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty polygon.WPolygonArea(List<WPoint> points) Creates a polygon area with given vertices. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(double x, double y) Adds a point.voidaddPoint(int x, int y) Adds a point.voidAdds a point.voidAdds a point.Returns the polygon vertices.Returns the polygon vertices.protected StringvoidSets the polygon vertices.protected booleanupdateDom(DomElement element, boolean all) Methods inherited from class eu.webtoolkit.jwt.WAbstractArea
addStyleClass, addStyleClass, clicked, doubleClicked, enterPressed, escapePressed, getAlternateText, getCursor, getJsRef, getLink, getStyleClass, getToolTip, isHole, isTransformable, keyPressed, keyWentDown, keyWentUp, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, removeStyleClass, removeStyleClass, setAlternateText, setCursor, setCursor, setCursor, setHole, setLink, setObjectName, setStyleClass, setToolTip, setTransformableMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, tr
-
Constructor Details
-
WPolygonArea
public WPolygonArea()Creates an empty polygon.Defines an empty polygon.
-
WPolygonArea
Creates a polygon area with given vertices.The polygon is defined with vertices corresponding to
points. The polygon is closed by connecting the last point with the first point.
-
-
Method Details
-
addPoint
public void addPoint(int x, int y) Adds a point. -
addPoint
public void addPoint(double x, double y) Adds a point. -
addPoint
Adds a point. -
addPoint
Adds a point. -
setPoints
Sets the polygon vertices.The polygon is defined with vertices corresponding to
points. The polygon is closed by connecting the last point with the first point. -
getPointFs
Returns the polygon vertices.- See Also:
-
getPoints
Returns the polygon vertices.- See Also:
-
updateDom
- Overrides:
updateDomin classWAbstractArea
-
getUpdateAreaCoordsJS
- Specified by:
getUpdateAreaCoordsJSin classWAbstractArea
-