Package com.wisecoders.dbs.diagram.model
Class Rect
java.lang.Object
com.wisecoders.dbs.diagram.model.Rect
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancontains(double x, double y) booleancontains(double X, double Y, double W, double H) booleanbooleanstatic doubledist(double x1, double y1, double x2, double y2) doubledoubledoubledoubleintdoublegetWidth()intdoublegetX()intgetXInt()doublegetY()intgetYInt()voidgrow(double h, double v) booleaninside(double X, double Y) intersection(Rect r) booleanintersects(double rx, double ry, double rw, double rh) booleanintersects(Rect other) booleanintersectsY(double ry, double rh) voidpositionOnCell(int cellSize) voidsetBounds(double x, double y, double width, double height) voidvoidsetHeight(double height) voidsetLocation(double x, double y) voidsetSize(double width, double height) voidsetWidth(double width) voidsetX(double x) voidsetY(double y) toString()voidtranslate(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)
-