Class Rect

java.lang.Object
com.wisecoders.dbs.diagram.model.Rect

public class Rect extends Object
  • Constructor Details

    • Rect

      public Rect()
    • Rect

      public Rect(Rect other)
    • 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

      public void setBounds(Rect other)
    • 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

      public boolean intersects(Rect other)
    • grow

      public void grow(double h, double v)
    • add

      public void add(Rect r)
    • 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

      public boolean contains(Rect p)
    • contains

      public boolean contains(Point p)
    • 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

      public String toString()
      Overrides:
      toString in class Object
    • getCenterX

      public double getCenterX()
    • getCenterY

      public double getCenterY()
    • intersection

      public Rect intersection(Rect r)
    • distance

      public double distance(Rect other)
    • dist

      public static double dist(double x1, double y1, double x2, double y2)