Class AbstractShapeCustomizer
java.lang.Object
net.sf.jasperreports.charts.JRAbstractChartCustomizer
net.sf.jasperreports.customizers.shape.AbstractShapeCustomizer
- All Implemented Interfaces:
 JRChartCustomizer,NamedChartCustomizer
- Direct Known Subclasses:
 LegendShapeCustomizer,LineDotShapeCustomizer
Abstract customizer that provide the utility methods to work with shapes.
- Author:
 - Marco Orlandin (dejawho2@users.sourceforge.net)
 
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class net.sf.jasperreports.charts.JRAbstractChartCustomizer
chart, fillerFields inherited from interface net.sf.jasperreports.charts.JRChartCustomizer
CUSTOMIZER_CLASS_PROPERTY_PREFIX, CUSTOMIZER_PROPERTY_PREFIX - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected ShapeBuilds an ellipse shape.protected ShapebuildPolygon(ShapePoints shapePoints) Builds a polygon shape.protected ShapebuildPolyline(ShapePoints baseShape) Uses the points to build a polylineprotected ShapeBuilds a rectangle shape.protected ShapeBuilds the shape from the type and the points read from the respective configuration properties.protected Rectangle2DgetBounds(ShapePoints shape) protected IntegerReturns the height of the shape.protected abstract PointgetOffset(Dimension2D size) protected abstract PointgetOffset(Rectangle2D bounds) protected Dimension2DgetSize()Returns the width and height properties defined, if only one is defined it value will be used also for the other, if they are both undefined it will return null.protected IntegergetWidth()Returns the width of the shape.protected voidupdateItem(ItemsCounter itemsCounter, AbstractShapeCustomizer.ShapeSetter shapeSetter, int index) Apply the shaped defined in the configuration to the ShapeSetter in the specified index of the passed parameterprotected voidupdateItems(ItemsCounter itemsCounter, AbstractShapeCustomizer.ShapeSetter shapeSetter) Update all the items in the collectionMethods inherited from class net.sf.jasperreports.charts.JRAbstractChartCustomizer
getBooleanProperty, getCustomizerPropertyName, getDoubleProperty, getFieldValue, getFieldValue, getFloatProperty, getIntegerProperty, getParameterValue, getParameterValue, getProperty, getVariableValue, getVariableValue, init, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.charts.JRChartCustomizer
customize 
- 
Field Details
- 
PROPERTY_SHAPE_WIDTH
- See Also:
 
 - 
PROPERTY_SHAPE_HEIGHT
- See Also:
 
 - 
PROPERTY_SHAPE_TYPE
- See Also:
 
 - 
PROPERTY_SHAPE_POINTS
- See Also:
 
 
 - 
 - 
Constructor Details
- 
AbstractShapeCustomizer
public AbstractShapeCustomizer() 
 - 
 - 
Method Details
- 
getWidth
Returns the width of the shape.- Returns:
 - the width of the shape or null if it is not specified
 
 - 
getHeight
Returns the height of the shape.- Returns:
 - the height of the shape or null if it is not specified
 
 - 
buildShape
Builds the shape from the type and the points read from the respective configuration properties.- Returns:
 - the Shape or null if the configuration properties are not valid
 
 - 
getSize
Returns the width and height properties defined, if only one is defined it value will be used also for the other, if they are both undefined it will return null.- Returns:
 - a size or null if it is undefined
 
 - 
getBounds
 - 
getOffset
 - 
getOffset
 - 
buildEllipse
Builds an ellipse shape.- Returns:
 - the ellipse or null if its size is not specified
 
 - 
buildRectangle
Builds a rectangle shape.- Returns:
 - the rectangle or null if its size is not specified
 
 - 
buildPolygon
Builds a polygon shape.- Parameters:
 shapePoints- the points of the polygon- Returns:
 - the polygon or null if it can't be build from the current configuration
 
 - 
buildPolyline
Uses the points to build a polyline- Parameters:
 baseShape- the points of the polyline- Returns:
 - a polyline shape or null if it can't be build from the current configuration
 
 - 
updateItem
protected void updateItem(ItemsCounter itemsCounter, AbstractShapeCustomizer.ShapeSetter shapeSetter, int index) Apply the shaped defined in the configuration to the ShapeSetter in the specified index of the passed parameter - 
updateItems
protected void updateItems(ItemsCounter itemsCounter, AbstractShapeCustomizer.ShapeSetter shapeSetter) Update all the items in the collection 
 -