Class RectangleReadOnly

    • Constructor Detail

      • RectangleReadOnly

        public RectangleReadOnly​(float llx,
                                 float lly,
                                 float urx,
                                 float ury)
        Constructs a RectangleReadOnly -object.
        Parameters:
        llx - lower left x
        lly - lower left y
        urx - upper right x
        ury - upper right y
      • RectangleReadOnly

        public RectangleReadOnly​(float llx,
                                 float lly,
                                 float urx,
                                 float ury,
                                 int rotation)
        Constructs a RectangleReadOnly -object.
        Parameters:
        llx - lower left x
        lly - lower left y
        urx - upper right x
        ury - upper right y
        rotation - the rotation of the Rectangle (0, 90, 180, 270)
        Since:
        iText 5.0.6
      • RectangleReadOnly

        public RectangleReadOnly​(float urx,
                                 float ury)
        Constructs a RectangleReadOnly-object starting from the origin (0, 0).
        Parameters:
        urx - upper right x
        ury - upper right y
      • RectangleReadOnly

        public RectangleReadOnly​(float urx,
                                 float ury,
                                 int rotation)
        Constructs a RectangleReadOnly-object starting from the origin (0, 0) and with a specific rotation (valid values are 0, 90, 180, 270).
        Parameters:
        urx - upper right x
        ury - upper right y
        rotation - the rotation
        Since:
        iText 5.0.6
      • RectangleReadOnly

        public RectangleReadOnly​(Rectangle rect)
        Constructs a RectangleReadOnly -object.
        Parameters:
        rect - another Rectangle
    • Method Detail

      • throwReadOnlyError

        private void throwReadOnlyError()
        Throws an error because of the read only nature of this object.
      • setRotation

        public void setRotation​(int rotation)
        Sets the rotation of the rectangle. Valid values are 0, 90, 180, and 270.
        Overrides:
        setRotation in class Rectangle
        Parameters:
        rotation - the new rotation value
        Since:
        iText 5.0.6
      • setLeft

        public void setLeft​(float llx)
        Sets the lower left x-coordinate.
        Overrides:
        setLeft in class Rectangle
        Parameters:
        llx - the new value
      • setRight

        public void setRight​(float urx)
        Sets the upper right x-coordinate.
        Overrides:
        setRight in class Rectangle
        Parameters:
        urx - the new value
      • setTop

        public void setTop​(float ury)
        Sets the upper right y-coordinate.
        Overrides:
        setTop in class Rectangle
        Parameters:
        ury - the new value
      • setBottom

        public void setBottom​(float lly)
        Sets the lower left y-coordinate.
        Overrides:
        setBottom in class Rectangle
        Parameters:
        lly - the new value
      • normalize

        public void normalize()
        Normalizes the rectangle. Switches lower left with upper right if necessary.
        Overrides:
        normalize in class Rectangle
      • setBackgroundColor

        public void setBackgroundColor​(BaseColor value)
        Sets the backgroundcolor of the rectangle.
        Overrides:
        setBackgroundColor in class Rectangle
        Parameters:
        value - the new value
      • setGrayFill

        public void setGrayFill​(float value)
        Sets the grayscale of the rectangle.
        Overrides:
        setGrayFill in class Rectangle
        Parameters:
        value - the new value
      • setBorder

        public void setBorder​(int border)
        Enables/Disables the border on the specified sides. The border is specified as an integer bitwise combination of the constants: LEFT, RIGHT, TOP, BOTTOM.
        Overrides:
        setBorder in class Rectangle
        Parameters:
        border - the new value
        See Also:
        enableBorderSide(int), disableBorderSide(int)
      • setUseVariableBorders

        public void setUseVariableBorders​(boolean useVariableBorders)
        Sets a parameter indicating if the rectangle has variable borders
        Overrides:
        setUseVariableBorders in class Rectangle
        Parameters:
        useVariableBorders - indication if the rectangle has variable borders
      • enableBorderSide

        public void enableBorderSide​(int side)
        Enables the border on the specified side.
        Overrides:
        enableBorderSide in class Rectangle
        Parameters:
        side - the side to enable. One of LEFT, RIGHT, TOP, BOTTOM
      • disableBorderSide

        public void disableBorderSide​(int side)
        Disables the border on the specified side.
        Overrides:
        disableBorderSide in class Rectangle
        Parameters:
        side - the side to disable. One of LEFT, RIGHT, TOP, BOTTOM
      • setBorderWidth

        public void setBorderWidth​(float borderWidth)
        Sets the borderwidth of the table.
        Overrides:
        setBorderWidth in class Rectangle
        Parameters:
        borderWidth - the new value
      • setBorderWidthLeft

        public void setBorderWidthLeft​(float borderWidthLeft)
        Sets the width of the left border
        Overrides:
        setBorderWidthLeft in class Rectangle
        Parameters:
        borderWidthLeft - a width
      • setBorderWidthRight

        public void setBorderWidthRight​(float borderWidthRight)
        Sets the width of the right border
        Overrides:
        setBorderWidthRight in class Rectangle
        Parameters:
        borderWidthRight - a width
      • setBorderWidthTop

        public void setBorderWidthTop​(float borderWidthTop)
        Sets the width of the top border
        Overrides:
        setBorderWidthTop in class Rectangle
        Parameters:
        borderWidthTop - a width
      • setBorderWidthBottom

        public void setBorderWidthBottom​(float borderWidthBottom)
        Sets the width of the bottom border
        Overrides:
        setBorderWidthBottom in class Rectangle
        Parameters:
        borderWidthBottom - a width
      • setBorderColor

        public void setBorderColor​(BaseColor borderColor)
        Sets the color of the border.
        Overrides:
        setBorderColor in class Rectangle
        Parameters:
        borderColor - a BaseColor
      • setBorderColorLeft

        public void setBorderColorLeft​(BaseColor borderColorLeft)
        Sets the color of the left border.
        Overrides:
        setBorderColorLeft in class Rectangle
        Parameters:
        borderColorLeft - a BaseColor
      • setBorderColorRight

        public void setBorderColorRight​(BaseColor borderColorRight)
        Sets the color of the right border
        Overrides:
        setBorderColorRight in class Rectangle
        Parameters:
        borderColorRight - a BaseColor
      • setBorderColorTop

        public void setBorderColorTop​(BaseColor borderColorTop)
        Sets the color of the top border.
        Overrides:
        setBorderColorTop in class Rectangle
        Parameters:
        borderColorTop - a BaseColor
      • setBorderColorBottom

        public void setBorderColorBottom​(BaseColor borderColorBottom)
        Sets the color of the bottom border.
        Overrides:
        setBorderColorBottom in class Rectangle
        Parameters:
        borderColorBottom - a BaseColor
      • cloneNonPositionParameters

        public void cloneNonPositionParameters​(Rectangle rect)
        Copies each of the parameters, except the position, from a Rectangle object
        Overrides:
        cloneNonPositionParameters in class Rectangle
        Parameters:
        rect - Rectangle to copy from
      • softCloneNonPositionParameters

        public void softCloneNonPositionParameters​(Rectangle rect)
        Copies each of the parameters, except the position, from a Rectangle object if the value is set there.
        Overrides:
        softCloneNonPositionParameters in class Rectangle
        Parameters:
        rect - Rectangle to copy from
      • toString

        public java.lang.String toString()
        Description copied from interface: Element
        Gets the content of the text element.
        Specified by:
        toString in interface Element
        Overrides:
        toString in class Rectangle
        Returns:
        String version of the most important rectangle properties
        See Also:
        Object.toString()