S-PLUS Connect/Java v1.0

com.insightful.gdevice
Class SCanvasRectangle

java.lang.Object
  extended bycom.insightful.gdevice.SCanvasRectangle
All Implemented Interfaces:
Serializable

public class SCanvasRectangle
extends Object
implements Serializable

SCanvasRectangle represents a rectangle within a virtual SCanvas. It is represented relative to the virtual graphsheet, so it represents the same rectangle, no matter how the SCanvas is scrolled or resized.

See Also:
Serialized Form

Constructor Summary
SCanvasRectangle(float x, float y, float width, float height)
           
 
Method Summary
 boolean contains(float x, float y)
          Checks whether this rectangle contains the specified points.
 boolean equals(Object obj)
           
 SCanvasPoint getFirstCorner()
          Returns SCanvasPoint for the first point where the mouse is initially pressed, as the rectangle is swept.
 float getHeight()
           
 int getHeight(SCanvasAWT canvas)
          Return the height of the rectangle, in the virtual graphsheet of the given SCanvas
 int getLeft(SCanvasAWT canvas)
          Return the X coordinate of the left of the rectangle, in the virtual graphsheet of the given SCanvas
 SCanvasPoint getSecondCorner()
          returns SCanvasPoint for the second point where the mouse is released, as the rectangle is swept.
 int getTop(SCanvasAWT canvas)
          Return the Y coordinate of the top of the rectangle, in the virtual graphsheet of the given SCanvas
 float getWidth()
           
 int getWidth(SCanvasAWT canvas)
          Return the width of the rectangle, in the virtual graphsheet of the given SCanvas
 Rectangle getWindowRect(SCanvasAWT c)
           
 float getX()
           
 float getY()
           
 float maxX()
           
 float maxY()
           
 float minX()
           
 float minY()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCanvasRectangle

public SCanvasRectangle(float x,
                        float y,
                        float width,
                        float height)
Method Detail

equals

public boolean equals(Object obj)

getFirstCorner

public SCanvasPoint getFirstCorner()
Returns SCanvasPoint for the first point where the mouse is initially pressed, as the rectangle is swept.


getSecondCorner

public SCanvasPoint getSecondCorner()
returns SCanvasPoint for the second point where the mouse is released, as the rectangle is swept.


getLeft

public int getLeft(SCanvasAWT canvas)
Return the X coordinate of the left of the rectangle, in the virtual graphsheet of the given SCanvas


getTop

public int getTop(SCanvasAWT canvas)
Return the Y coordinate of the top of the rectangle, in the virtual graphsheet of the given SCanvas


getWidth

public int getWidth(SCanvasAWT canvas)
Return the width of the rectangle, in the virtual graphsheet of the given SCanvas


getHeight

public int getHeight(SCanvasAWT canvas)
Return the height of the rectangle, in the virtual graphsheet of the given SCanvas


getWindowRect

public Rectangle getWindowRect(SCanvasAWT c)

contains

public boolean contains(float x,
                        float y)
Checks whether this rectangle contains the specified points.


getX

public float getX()

getY

public float getY()

getWidth

public float getWidth()

getHeight

public float getHeight()

minX

public float minX()

maxX

public float maxX()

minY

public float minY()

maxY

public float maxY()

S-PLUS Connect/Java v1.0

Copyright © 2000, 2002 Insightful Corporation
Warning: Classes not documented in the S-PLUS Programmer's Guide may change in future releases.