Class ToEastChangeStrategy

  • All Implemented Interfaces:
    Rectangle2DChangeStrategy

    public class ToEastChangeStrategy
    extends Object
    A strategy which enlarges an existing rectangle to the east.
    • Constructor Detail

      • ToEastChangeStrategy

        public ToEastChangeStrategy​(Rectangle2D original,
                                    boolean ratioFixed,
                                    double ratio,
                                    Rectangle2D bounds)
        Creates a new change strategy which enlarges the specified original rectangle to the east. The given ratio is enforced when indicated by ratioFixed.
        Parameters:
        original - the original rectangle
        ratioFixed - indicates whether the rectangle's ratio will be fixed to the ratio
        ratio - the possibly fixed ratio of the rectangle created by this strategy
        bounds - the bounds within which the rectangle can be resized
      • ToEastChangeStrategy

        public ToEastChangeStrategy​(Rectangle2D original,
                                    boolean ratioFixed,
                                    double ratio,
                                    double maxX,
                                    double maxY)
        Creates a new change strategy which enlarges the specified original rectangle to the northeast. The given ratio is enforced when indicated by ratioFixed.
        Parameters:
        original - the original rectangle
        ratioFixed - indicates whether the rectangle's ratio will be fixed to the ratio
        ratio - the possibly fixed ratio of the rectangle created by this strategy
        maxX - the maximal x-coordinate of the right edge of the created rectangles; must be greater than or equal to the previous rectangle's width
        maxY - the maximal y-coordinate of the lower edge of the created rectangles; must be greater than or equal to the previous rectangle's height