Package eu.webtoolkit.jwt
Class WRectArea
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractArea
eu.webtoolkit.jwt.WRectArea
public class WRectArea extends WAbstractArea
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 Constructor Description WRectArea()
Default constructor.WRectArea(double x, double y, double width, double height)
Creates a rectangular area with given geometry.WRectArea(int x, int y, int width, int height)
Creates a rectangular area with given geometry.WRectArea(WRectF rect)
Creates a rectangular area with given geometry. -
Method Summary
Modifier and Type Method Description int
getHeight()
Returns the height.protected java.lang.String
getUpdateAreaCoordsJS()
int
getWidth()
Returns the width.int
getX()
Returns the top-left X coordinate.int
getY()
Returns the top-left Y coordinate.void
setHeight(int height)
Sets the height.void
setWidth(int width)
Sets the width.void
setX(int x)
Sets the top-left X coordinate.void
setY(int y)
Sets the top-left Y coordinate.protected boolean
updateDom(DomElement element, boolean all)
Methods inherited from class eu.webtoolkit.jwt.WAbstractArea
addStyleClass, clicked, doubleClicked, enterPressed, escapePressed, getAlternateText, getCursor, getJsRef, getLink, getRef, getResource, getStyleClass, getTarget, getToolTip, isHole, isTransformable, keyPressed, keyWentDown, keyWentUp, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, remove, removeStyleClass, setAlternateText, setCursor, setCursor, setCursor, setHole, setLink, setRef, setResource, setStyleClass, setTarget, setToolTip, setTransformable
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getId, getObjectName, setFormData, setObjectName, tr
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
rect
argument 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:
updateDom
in classWAbstractArea
-
getUpdateAreaCoordsJS
protected java.lang.String getUpdateAreaCoordsJS()- Specified by:
getUpdateAreaCoordsJS
in classWAbstractArea
-