Class RoundedRectangle

  • All Implemented Interfaces:
    CanvasComponent, Figure, ShapedFigure, VisibleComponent, UserObjectContainer

    public class RoundedRectangle
    extends BasicFigure
    A figure that displays as a rounded rectangle. This is a convenience class for creating rectangles. It inherits from BasicFigure, and so contains a single RoundRectangle2D as its shape. It provides a useful set of constructors.
    Since:
    Ptolemy II 6.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    • Constructor Detail

      • RoundedRectangle

        public RoundedRectangle​(double x,
                                double y,
                                double width,
                                double height,
                                java.awt.Paint fill,
                                float lineWidth,
                                double arcWidth,
                                double arcHeight)
        Create a new rectangle with the given origin, size, fill, outline width, arc width, and arc height.
    • Method Detail

      • translate

        public void translate​(double x,
                              double y)
        Translate the rectangle the given distance
        Specified by:
        translate in interface Figure
        Overrides:
        translate in class AbstractFigure
        Parameters:
        x - The x value to be moved.
        y - The y value to be moved.