Class JDRoundRectangle


public class JDRoundRectangle extends JDRectangular
JDraw Rectangle graphic object.
  • Constructor Details

    • JDRoundRectangle

      public JDRoundRectangle(String objectName, int x, int y, int w, int h)
      Contructs a JDRoundRectangle.
      Parameters:
      objectName - Object name
      x - Up left corner x coordinate
      y - Up left corner y coordinate
      w - Rectangle width
      h - Rectangle height
  • Method Details

    • copy

      public JDObject copy(int x, int y)
      Description copied from class: JDObject
      Returns a copy of this object at the specified location.
      Specified by:
      copy in class JDObject
      Parameters:
      x - Horizontal position of the copied object (pixel)
      y - Vertical Position of the copied object (pixel)
      Returns:
      The copy of this object.
    • isInsideObject

      public boolean isInsideObject(int x, int y)
      Overrides:
      isInsideObject in class JDObject
      Parameters:
      x - X coordinate (pixel)
      y - Y coordinate (pixel)
      Returns:
      whether the specified point is inside this object.
    • convertToPolyline

      public JDPolyline convertToPolyline()
    • getStep

      public int getStep()
      Returns:
      the interpolation of rounded corner.
      See Also:
    • setStep

      public void setStep(int s)
      Sets the interpolation step of the rounded corner.
      Parameters:
      s - Interpolation step
    • getCornerWidth

      public int getCornerWidth()
      Returns:
      the rounded corner width.
      See Also:
    • setCornerWidth

      public void setCornerWidth(int w)
      Sets the rounded corner width.
      Parameters:
      w - Corner width