eu.webtoolkit.jwt
Class WRectArea

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WAbstractArea
          extended by 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.

See Also:
WImage.addArea(WAbstractArea area), WPaintedWidget.addArea(WAbstractArea area), WCircleArea, WPolygonArea

Constructor Summary
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
 int getHeight()
          Returns the height.
 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.
 
Methods inherited from class eu.webtoolkit.jwt.WAbstractArea
addStyleClass, clicked, doubleClicked, enterPressed, escapePressed, getAlternateText, getCursor, getLink, getRef, getResource, getStyleClass, getTarget, getToolTip, isHole, keyPressed, keyWentDown, keyWentUp, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, removeStyleClass, setAlternateText, setCursor, setHole, setLink, setRef, setResource, setStyleClass, setTarget, setToolTip
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getId, getObjectName, remove, setObjectName, tr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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

public WRectArea(WRectF rect)
Creates a rectangular area with given geometry.

The rect argument is in pixel units.

Method Detail

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.