|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttpp.Rectangle
public class Rectangle
A 'rubber band' rectangle used to select points in a ScatterPlotViewPanel. All coordinates are in data (rather than device) space
Constructor Summary | |
---|---|
Rectangle(double x1,
double y1,
double x2,
double y2)
|
|
Rectangle(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
|
Method Summary | |
---|---|
double |
centerX()
The x coordinate of the center of the rectangle |
double |
centerY()
The y coordinate of the center of the rectangle |
boolean |
contains(double x,
double y)
Is (x,y) inside the rectangle? |
void |
draw(java.awt.Graphics2D g)
|
void |
expandToInclude(double x,
double y)
Expand rectangle as required to include a point. |
double |
getX1()
|
double |
getX2()
|
double |
getY1()
|
double |
getY2()
|
double |
height()
|
RectangleMovementListener |
initialiseListener(ScatterPlotModel model)
Create a listener that is capable of updating a model in response to changes to this rectangle. |
boolean |
onCorner(double x,
double y,
double margin)
Is the given point on a corner, given the error margin. |
void |
scale(double zx,
double zy)
Increase the size of the rectangle by zx in the x direction, zy in the y. |
void |
scale(double ox,
double oy,
double dx,
double dy)
Scale the rectangle, by moving a corner from its original location (ox,oy) by a displacement of (dx,dy). |
void |
setX1(double x1)
|
void |
setX2(double x2)
|
void |
setY1(double y1)
|
void |
setY2(double y2)
|
java.lang.String |
toString()
|
void |
translate(double dx,
double dy)
Translate the position of the rectangle by the given amount |
double |
width()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rectangle(double x1, double y1, double x2, double y2)
public Rectangle(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
Method Detail |
---|
public double getX1()
public void setX1(double x1)
public double getX2()
public void setX2(double x2)
public double getY1()
public void setY1(double y1)
public double getY2()
public void setY2(double y2)
public void expandToInclude(double x, double y)
public void translate(double dx, double dy)
public void scale(double ox, double oy, double dx, double dy)
public void scale(double zx, double zy)
public double centerX()
public double centerY()
public boolean contains(double x, double y)
public double width()
public double height()
public void draw(java.awt.Graphics2D g)
public boolean onCorner(double x, double y, double margin)
public java.lang.String toString()
toString
in class java.lang.Object
public RectangleMovementListener initialiseListener(ScatterPlotModel model)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |