Class RMShapePainter

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable
    Direct Known Subclasses:
    RMEditorShapePainter

    public class RMShapePainter
    extends RMObject
    This class is responsible for rendering all the base shapes with AWT and Java2D.
    • Constructor Detail

      • RMShapePainter

        public RMShapePainter()
        Creates a plain shape painter.
    • Method Detail

      • isPrinting

        public static boolean isPrinting()
        Returns whether ShapePainter is printing.
      • setPrinting

        public static void setPrinting​(boolean aValue)
        Sets whether ShapePainter is printing.
      • paintShapeDeep

        public void paintShapeDeep​(RMShape aShape,
                                   java.awt.Graphics2D g)
        Top-level generic shape painting (sets transform, recurses to children, paints this).
      • paintShape_super

        public void paintShape_super​(RMShape aShape,
                                     java.awt.Graphics2D g)
        Top-level specific shape paining (forwards call depending on class). Broken out for RMShapePainter.Paint implementers.
      • paintShape

        public void paintShape​(RMShape aShape,
                               java.awt.Graphics2D g)
        Paints a simple shape.
      • paintShape

        public void paintShape​(RMText aText,
                               java.awt.Graphics2D g)
        Paints a text shape.
      • paintShape

        public void paintShape​(RMSound aSound,
                               java.awt.Graphics2D g)
        Paints a sound shape.
      • paintShape

        public void paintShape​(RMPolygon aPolygon,
                               java.awt.Graphics2D g)
        Paints a polygon shape.
      • paintShape

        public void paintShape​(RMTable aTable,
                               java.awt.Graphics2D g)
        Paints a table shape.
      • paintShapeOver

        public void paintShapeOver​(RMTable aTable,
                                   java.awt.Graphics2D g)
        Paints stroke around table after all children have drawn.
      • paintShapeOver

        public void paintShapeOver​(RMTableGroup aTableGroup,
                                   java.awt.Graphics2D g)
        Paints table group button after child table has been drawn.
      • paintShape

        public void paintShape​(RMTableRow aTableRow,
                               java.awt.Graphics2D g)
        Paints table row.
      • paintShape

        public void paintShape​(RMCrossTab aCrossTab,
                               java.awt.Graphics2D g)
        Paints a crosstab.
      • paintShape

        public void paintShape​(RMGraph.BarLabel aBarLabel,
                               java.awt.Graphics2D g)
        Paint bar label.
      • paintShape

        public void paintShape​(RMSwitchShape aSwitchShape,
                               java.awt.Graphics2D g)
        Draw switch shape. Implement this so RMEditorShapePainter can override it.
      • paintShape

        public void paintShape​(RMLabel aLabel,
                               java.awt.Graphics2D g)
        Draw label shape. Implement this so RMEditorShapePainter can override it.
      • paintShape

        public void paintShape​(RMLabels labels,
                               java.awt.Graphics2D g)
        Paint labels shapes.
      • paintShape

        public void paintShape​(RMNestedDoc aDoc,
                               java.awt.Graphics2D g)
        Draw nested doc shape.
      • getDefaultImage

        public java.awt.Image getDefaultImage()
        Returns a default image to be used in case a shape image fill returns bogus null image.
      • getImageForShape

        public static java.awt.image.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).
      • getImageForShape

        public static java.awt.image.BufferedImage getImageForShape​(RMShape aShape,
                                                                    java.awt.Color aColor,
                                                                    float scale)
        Returns an image for the given shape, with given background color (null for clear) and scale.