Package com.reportmill.shape
Class RMShapePainter
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShapePainter
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
- Direct Known Subclasses:
RMEditorShapePainter
This class is responsible for rendering all the base shapes with AWT and Java2D.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An interface for shapes that want to define their own drawing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a default image to be used in case a shape image fill returns bogus null image.static BufferedImage
getImageForShape
(RMShape aShape, boolean alpha, float scale) Returns an image for the given shape (with an option to include transparency and/or scale image).static BufferedImage
getImageForShape
(RMShape aShape, Color aColor, float scale) Returns an image for the given shape, with given background color (null for clear) and scale.static boolean
Returns whether ShapePainter is printing.void
paintShape
(RMCrossTab aCrossTab, Graphics2D g) Paints a crosstab.void
paintShape
(RMGraph.BarLabel aBarLabel, Graphics2D g) Paint bar label.void
paintShape
(RMLabel aLabel, Graphics2D g) Draw label shape.void
paintShape
(RMLabels labels, Graphics2D g) Paint labels shapes.void
paintShape
(RMNestedDoc aDoc, Graphics2D g) Draw nested doc shape.void
paintShape
(RMPolygon aPolygon, Graphics2D g) Paints a polygon shape.void
paintShape
(RMShape aShape, Graphics2D g) Paints a simple shape.void
paintShape
(RMSound aSound, Graphics2D g) Paints a sound shape.void
paintShape
(RMSwitchShape aSwitchShape, Graphics2D g) Draw switch shape.void
paintShape
(RMTable aTable, Graphics2D g) Paints a table shape.void
paintShape
(RMTableRow aTableRow, Graphics2D g) Paints table row.void
paintShape
(RMText aText, Graphics2D g) Paints a text shape.void
paintShape_super
(RMShape aShape, Graphics2D g) Top-level specific shape paining (forwards call depending on class).void
paintShapeDeep
(RMShape aShape, Graphics2D g) Top-level generic shape painting (sets transform, recurses to children, paints this).void
paintShapeOver
(RMTableGroup aTableGroup, Graphics2D g) Paints table group button after child table has been drawn.void
paintShapeOver
(RMTable aTable, Graphics2D g) Paints stroke around table after all children have drawn.static void
setPrinting
(boolean aValue) Sets whether ShapePainter is printing.Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Constructor Details
-
RMShapePainter
public RMShapePainter()Creates a plain shape painter.
-
-
Method Details
-
isPrinting
public static boolean isPrinting()Returns whether ShapePainter is printing. -
setPrinting
public static void setPrinting(boolean aValue) Sets whether ShapePainter is printing. -
paintShapeDeep
Top-level generic shape painting (sets transform, recurses to children, paints this). -
paintShape_super
Top-level specific shape paining (forwards call depending on class). Broken out for RMShapePainter.Paint implementers. -
paintShape
Paints a simple shape. -
paintShape
Paints a text shape. -
paintShape
Paints a sound shape. -
paintShape
Paints a polygon shape. -
paintShape
Paints a table shape. -
paintShapeOver
Paints stroke around table after all children have drawn. -
paintShapeOver
Paints table group button after child table has been drawn. -
paintShape
Paints table row. -
paintShape
Paints a crosstab. -
paintShape
Paint bar label. -
paintShape
Draw switch shape. Implement this so RMEditorShapePainter can override it. -
paintShape
Draw label shape. Implement this so RMEditorShapePainter can override it. -
paintShape
Paint labels shapes. -
paintShape
Draw nested doc shape. -
getDefaultImage
Returns a default image to be used in case a shape image fill returns bogus null image. -
getImageForShape
Returns an image for the given shape (with an option to include transparency and/or scale image). -
getImageForShape
Returns an image for the given shape, with given background color (null for clear) and scale.
-