Class AbstractJ2DShape

  • All Implemented Interfaces:
    Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener
    Direct Known Subclasses:
    AbstractXYChart, Barcode, CategoryChart, PieChart

    public abstract class AbstractJ2DShape
    extends RMShape
    This is the base class for all of our reporting components that prefer to render themselves using Java2D. This is convenient for bridging j2d-based libraries (like JFreeChart) into the reporting module, but the trade-off is that these components will be included as raster images in PDF exports of a report. Because the rasterized images will likely be printed, they are rendered at 300dpi, making them rather large, which means that the PDFs are fairly hefty.
    • Field Detail

      • DEFAULT_COLORS

        public static final java.lang.String[] DEFAULT_COLORS
      • RasterDPI

        public static java.lang.ThreadLocal<java.lang.Double> RasterDPI
      • dirty

        protected boolean dirty
    • Constructor Detail

      • AbstractJ2DShape

        public AbstractJ2DShape()
    • Method Detail

      • setDirty

        protected void setDirty()
        Call this to mark the cached raster buffer as dirty and repaint
      • paintShape

        public void paintShape​(RMShapePainter aPntr)
        Description copied from class: RMShape
        Basic shape painting - paints shape fill and stroke.
        Overrides:
        paintShape in class RMShape
      • render

        protected abstract void render​(java.awt.Graphics2D g,
                                       int width,
                                       int height)
        This is where implementations of AbstractJ2DShape actuall paint themselves to a graphics context.
      • getDefaultColorCodes

        public static java.lang.String[] getDefaultColorCodes()
      • getDefaultColors

        public static java.awt.Color[] getDefaultColors()