Class RectangleElementFactory


  • public class RectangleElementFactory
    extends AbstractContentElementFactory
    The drawable field element factory can be used to create elements that display Drawable elements.

    A drawable field expects the named datasource to contain Drawable objects.

    Once the desired properties are set, the factory can be reused to create similiar elements.

    Author:
    Thomas Morgner
    • Constructor Detail

      • RectangleElementFactory

        public RectangleElementFactory()
        DefaultConstructor.
    • Method Detail

      • getArcWidth

        public Float getArcWidth()
      • setArcWidth

        public void setArcWidth​(Float arcWidth)
      • getArcHeight

        public Float getArcHeight()
      • setArcHeight

        public void setArcHeight​(Float arcHeight)
      • createFilledRectangle

        public static Element createFilledRectangle​(float x,
                                                    float y,
                                                    float width,
                                                    float height,
                                                    Color color)
        A convenience method to create a filled rectangle element that scales its content-rectangle. Please note that beginning with PRD-3.5, you can and should create backgrounds for elements via the "background-color" stylekey on the band that contains the element.

        X, y, width and height can be positive numbers to give a absolute value or negative numbers for percentage values.

        Parameters:
        x - the x position of the element.
        y - the y position of the element.
        width - the width of the element.
        height - the height of the element.
        color - the fill color of the rectangle.
        Returns:
        the created element.