Class RectangleShape

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TOOL_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      RectangleShape()
      Deprecated.
      RectangleShape​(java.awt.geom.RectangularShape rect)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean alterShape​(java.awt.geom.Rectangle2D newBounds)
      Directly modify the shape's frame so that it fits tightly within the new framing rectangle.
      java.awt.geom.GeneralPath convertToPath()
      Convert this shape to a GeneralPath
      java.awt.geom.RectangularShape getRect()  
      java.awt.Shape getShape()
      The AWT shape this delegate produces
      java.lang.String getToolKey()  
      boolean isSymmetric()  
      void setRect​(java.awt.geom.RectangularShape rect)  
      void translateShape​(double dX, double dY)
      Move the shape using the provided offsets.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RectangleShape

        @Deprecated
        public RectangleShape()
        Deprecated.
        For serialization clean copy
      • RectangleShape

        public RectangleShape​(java.awt.geom.RectangularShape rect)
    • Method Detail

      • alterShape

        public boolean alterShape​(java.awt.geom.Rectangle2D newBounds)
        Description copied from class: ShapeDelegate
        Directly modify the shape's frame so that it fits tightly within the new framing rectangle.
        Specified by:
        alterShape in class ShapeDelegate
        Parameters:
        newBounds - The new bounding rectangle for the shape.
        Returns:
        false if the shape was unable to alter itself into the given rectangle.
      • translateShape

        public void translateShape​(double dX,
                                   double dY)
        Description copied from class: ShapeDelegate
        Move the shape using the provided offsets. Default implementation calls alterShape.
        Overrides:
        translateShape in class ShapeDelegate
      • getShape

        public java.awt.Shape getShape()
        Description copied from class: ShapeDelegate
        The AWT shape this delegate produces
        Specified by:
        getShape in class ShapeDelegate
      • getRect

        public java.awt.geom.RectangularShape getRect()
      • setRect

        public void setRect​(java.awt.geom.RectangularShape rect)
      • convertToPath

        public java.awt.geom.GeneralPath convertToPath()
        Description copied from class: ShapeDelegate
        Convert this shape to a GeneralPath
        Overrides:
        convertToPath in class ShapeDelegate