Package eu.webtoolkit.jwt
Class WRectArea
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractArea
eu.webtoolkit.jwt.WRectArea
A interactive area in a widget, specified by a rectangle.
The area may be added to a WImage or WPaintedWidget to provide interactivity
on a rectangular area of the image. The rectangle is specified in pixel coordinates.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height.protected StringintgetWidth()Returns the width.intgetX()Returns the top-left X coordinate.intgetY()Returns the top-left Y coordinate.voidsetHeight(int height) Sets the height.voidsetWidth(int width) Sets the width.voidsetX(int x) Sets the top-left X coordinate.voidsetY(int y) Sets the top-left Y coordinate.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
-
WRectArea
public WRectArea()Default constructor.The default constructor creates a rectangular area spans the whole widget.
-
WRectArea
public WRectArea(int x, int y, int width, int height) Creates a rectangular area with given geometry.The arguments are in pixel units.
-
WRectArea
public WRectArea(double x, double y, double width, double height) Creates a rectangular area with given geometry.The arguments are in pixel units.
-
WRectArea
Creates a rectangular area with given geometry.The
rectargument is in pixel units.
-
-
Method Details
-
setX
public void setX(int x) Sets the top-left X coordinate. -
getX
public int getX()Returns the top-left X coordinate. -
setY
public void setY(int y) Sets the top-left Y coordinate. -
getY
public int getY()Returns the top-left Y coordinate. -
setWidth
public void setWidth(int width) Sets the width. -
getWidth
public int getWidth()Returns the width. -
setHeight
public void setHeight(int height) Sets the height. -
getHeight
public int getHeight()Returns the height. -
updateDom
- Overrides:
updateDomin classWAbstractArea
-
getUpdateAreaCoordsJS
- Specified by:
getUpdateAreaCoordsJSin classWAbstractArea
-