Class RectangleElementFactory
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
-
- org.pentaho.reporting.engine.classic.core.elementfactory.AbstractContentElementFactory
-
- org.pentaho.reporting.engine.classic.core.elementfactory.RectangleElementFactory
-
public class RectangleElementFactory extends AbstractContentElementFactory
The drawable field element factory can be used to create elements that displayDrawable
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 Summary
Constructors Constructor Description RectangleElementFactory()
DefaultConstructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
createElement()
Creates a new drawable field element based on the defined properties.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.Float
getArcHeight()
Float
getArcWidth()
void
setArcHeight(Float arcHeight)
void
setArcWidth(Float arcWidth)
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.AbstractContentElementFactory
applyStyle, getFillColor, getKeepAspectRatio, getScale, getShouldDraw, getShouldFill, getStroke, setFillColor, setKeepAspectRatio, setScale, setShouldDraw, setShouldFill, setStroke
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.elementfactory.ElementFactory
applyElementName, getAbsolutePosition, getAvoidPagebreaks, getBackgroundColor, getBooleanValue, getBorderBottomColor, getBorderBottomLeftRadius, getBorderBottomLeftRadiusHeight, getBorderBottomLeftRadiusWidth, getBorderBottomRightRadius, getBorderBottomRightRadiusHeight, getBorderBottomRightRadiusWidth, getBorderBottomStyle, getBorderBottomWidth, getBorderBreakColor, getBorderBreakStyle, getBorderBreakWidth, getBorderColor, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRadius, getBorderRadiusHeight, getBorderRadiusWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderStyle, getBorderTopColor, getBorderTopLeftRadius, getBorderTopLeftRadiusHeight, getBorderTopLeftRadiusWidth, getBorderTopRightRadius, getBorderTopRightRadiusHeight, getBorderTopRightRadiusWidth, getBorderTopStyle, getBorderTopWidth, getBorderWidth, getColor, getDynamicHeight, getFontSmooth, getHeight, getHorizontalAlignment, getHRefTarget, getHRefTitle, getHRefWindow, getLayoutCachable, getMaximumHeight, getMaximumSize, getMaximumWidth, getMinimumHeight, getMinimumSize, getMinimumWidth, getName, getOrphans, getOverflowX, getOverflowY, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredSize, getUseMinChunkWidth, getVerticalAlignment, getVisible, getWidowOrphanOptOut, getWidows, getWidth, getX, getY, setAbsolutePosition, setAvoidPagebreaks, setBackgroundColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadiusHeight, setBorderBottomLeftRadiusWidth, setBorderBottomRightRadius, setBorderBottomRightRadiusHeight, setBorderBottomRightRadiusWidth, setBorderBottomStyle, setBorderBottomWidth, setBorderBreakColor, setBorderBreakStyle, setBorderBreakWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRadius, setBorderRadiusHeight, setBorderRadiusWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadiusHeight, setBorderTopLeftRadiusWidth, setBorderTopRightRadius, setBorderTopRightRadiusHeight, setBorderTopRightRadiusWidth, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setColor, setDynamicHeight, setFontSmooth, setHeight, setHorizontalAlignment, setHRefTarget, setHRefTitle, setHRefWindow, setLayoutCachable, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setName, setOrphans, setOverflowX, setOverflowY, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPreferredSize, setUseMinChunkWidth, setVerticalAlignment, setVisible, setWidowOrphanOptOut, setWidows, setWidth, setX, setY
-
-
-
-
Method Detail
-
getArcWidth
public Float getArcWidth()
-
setArcWidth
public void setArcWidth(Float arcWidth)
-
getArcHeight
public Float getArcHeight()
-
setArcHeight
public void setArcHeight(Float arcHeight)
-
createElement
public Element createElement()
Creates a new drawable field element based on the defined properties.- Specified by:
createElement
in classElementFactory
- Returns:
- the generated elements
- Throws:
IllegalStateException
- if the field name is not set.- See Also:
ElementFactory.createElement()
-
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.
-
-