Package com.wisecoders.dbs.diagram.model
Class Rect
java.lang.Object
com.wisecoders.dbs.diagram.model.Rect
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
contains
(double x, double y) boolean
contains
(double X, double Y, double W, double H) boolean
boolean
static double
dist
(double x1, double y1, double x2, double y2) double
double
double
double
int
double
getWidth()
int
double
getX()
int
getXInt()
double
getY()
int
getYInt()
void
grow
(double h, double v) boolean
inside
(double X, double Y) intersection
(Rect r) boolean
intersects
(double rx, double ry, double rw, double rh) boolean
intersects
(Rect other) boolean
intersectsY
(double ry, double rh) void
positionOnCell
(int cellSize) void
setBounds
(double x, double y, double width, double height) void
void
setHeight
(double height) void
setLocation
(double x, double y) void
setSize
(double width, double height) void
setWidth
(double width) void
setX
(double x) void
setY
(double y) toString()
void
translate
(double dx, double dy)
-
Constructor Details
-
Rect
public Rect() -
Rect
-
Rect
public Rect(double x, double y, double width, double height)
-
-
Method Details
-
setLocation
public void setLocation(double x, double y) -
setBounds
public void setBounds(double x, double y, double width, double height) -
setBounds
-
setSize
public void setSize(double width, double height) -
translate
public void translate(double dx, double dy) -
positionOnCell
public void positionOnCell(int cellSize) -
intersects
public boolean intersects(double rx, double ry, double rw, double rh) -
intersectsY
public boolean intersectsY(double ry, double rh) -
intersects
-
grow
public void grow(double h, double v) -
add
-
getX
public double getX() -
setX
public void setX(double x) -
getY
public double getY() -
setY
public void setY(double y) -
getWidth
public double getWidth() -
setWidth
public void setWidth(double width) -
getHeight
public double getHeight() -
setHeight
public void setHeight(double height) -
getXInt
public int getXInt() -
getYInt
public int getYInt() -
getWidthInt
public int getWidthInt() -
getHeightInt
public int getHeightInt() -
contains
-
contains
-
contains
public boolean contains(double X, double Y, double W, double H) -
contains
public boolean contains(double x, double y) -
inside
public boolean inside(double X, double Y) -
toString
-
getCenterX
public double getCenterX() -
getCenterY
public double getCenterY() -
intersection
-
distance
-
dist
public static double dist(double x1, double y1, double x2, double y2)
-