Package eu.webtoolkit.jwt
Class WCircleArea
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractArea
eu.webtoolkit.jwt.WCircleArea
A interactive area in a widget, specified by a circle.
The area may be added to a WImage
or WPaintedWidget
to provide interactivity
on a circular area of the image. The circle is specified in pixel coordinates.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
ConstructorDescriptionDefault constructor.WCircleArea
(int x, int y, int radius) Creates a circular area with given geometry. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the center X coordinate.int
Returns the center Y coordinate.int
Returns the radius.protected String
void
setCenter
(int x, int y) Sets the center.void
Sets the center.void
Sets the center.void
setRadius
(int radius) Sets the radius.protected boolean
updateDom
(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, setStyleClass, setToolTip, setTransformable
Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WCircleArea
public WCircleArea()Default constructor.Specifies a circular area with center (0, 0) and radius 0.
-
WCircleArea
public WCircleArea(int x, int y, int radius) Creates a circular area with given geometry.The arguments are in pixel units.
-
-
Method Details
-
setCenter
Sets the center. -
setCenter
Sets the center. -
setCenter
public void setCenter(int x, int y) Sets the center. -
getCenterX
public int getCenterX()Returns the center X coordinate. -
getCenterY
public int getCenterY()Returns the center Y coordinate. -
setRadius
public void setRadius(int radius) Sets the radius. -
getRadius
public int getRadius()Returns the radius. -
updateDom
- Overrides:
updateDom
in classWAbstractArea
-
getUpdateAreaCoordsJS
- Specified by:
getUpdateAreaCoordsJS
in classWAbstractArea
-