Class RMShapePainterJ2D

    • Constructor Summary

      Constructors 
      Constructor Description
      RMShapePainterJ2D​(java.awt.Graphics2D aGr)
      Creates a new RMShapePainterJ2D.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clip​(java.awt.Shape s)  
      RMShapePainter clone()
      Standard clone implementation.
      void dispose()  
      void draw​(java.awt.Shape s)  
      void drawButton​(double x, double y, double w, double h, boolean isPressed)
      Draws a button for the given rect with an option for pressed.
      void drawButton​(RMRect aRect, boolean isPressed)
      Draws a button for the given rect with an option for pressed.
      void drawGlyphVector​(java.awt.font.GlyphVector g, float x, float y)  
      boolean drawImage​(java.awt.Image img, int x, int y, int w, int h)  
      boolean drawImage​(java.awt.Image img, java.awt.geom.AffineTransform xform)  
      void drawLine​(double x1, double y1, double x2, double y2)  
      void drawRect​(double x, double y, double w, double h)  
      void drawString​(java.lang.String str, double x, double y)  
      void fill​(java.awt.Shape s)  
      void fill3DRect​(double x, double y, double w, double h, boolean raised)  
      void fillRect​(double x, double y, double w, double h)  
      float getAlignmentX()
      Returns the horizontal alignment.
      float getAlignmentY()
      Returns the vertical alignment.
      java.awt.geom.Rectangle2D getBounds()
      Returns the painting bounds (can be null).
      java.awt.Shape getClip()  
      java.awt.Rectangle getClipBounds()  
      java.awt.Color getColor()  
      java.awt.Font getFont()  
      double getFontAscent()
      Returns the ascender for the current font.
      java.awt.Graphics2D getGraphics()
      Returns the graphics.
      double getOpacity()
      Returns the opacity.
      java.awt.Paint getPaint()  
      float getScale()
      Returns the default scale.
      java.awt.geom.Rectangle2D getStringBounds​(java.lang.String aString)
      Returns the string bounds for current font.
      java.awt.Stroke getStroke()  
      boolean isEditing()
      Returns whether painting is for editor.
      boolean isGrowToFit()
      Returns whether painter should scale painting of shape up to fit bounds
      boolean isPrinting()
      Returns whether shape painting is really printing.
      boolean isSelected​(RMShape aShape)
      Returns whether given shape is selected.
      boolean isShrinkToFit()
      Returns whether painter should scale painting of shape down to fit bounds
      boolean isSuperSelected​(RMShape aShape)
      Returns whether given shape is super selected.
      boolean isSuperSelectedShape​(RMShape aShape)
      Returns whether given shape is THE super selected shape.
      void paintShape​(RMShape aShape)
      Paints a simple shape.
      void rotate​(double theta)  
      void scale​(double sx, double sy)  
      void sendPaintShape​(RMShape aShape)
      Paints a child shape.
      void setAlignmentX​(float aValue)
      Sets the horizontal alignment.
      void setAlignmentY​(float aValue)
      Sets the vertical alignment.
      boolean setAntialiasing​(boolean aValue)
      Sets whether antialiasing.
      void setBounds​(double x, double y, double w, double h)
      Sets the painting bounds.
      void setBounds​(java.awt.geom.Rectangle2D aRect)
      Sets the painting bounds (can be null).
      void setClip​(java.awt.Shape clip)  
      void setColor​(java.awt.Color c)  
      void setFont​(java.awt.Font font)  
      void setGrowToFit​(boolean aValue)
      Returns whether painter should scale painting of shape up to fit bounds
      void setOpacity​(double aValue)
      Sets the opacity.
      void setPaint​(java.awt.Paint paint)  
      void setPrinting​(boolean aValue)
      Sets whether shape painting is really printing.
      void setScale​(float aValue)
      Sets the default scale.
      void setShrinkToFit​(boolean aValue)
      Returns whether painter should scale painting of shape down to fit bounds
      void setStroke​(java.awt.Stroke s)  
      java.lang.String toString()
      Standard toString implementation.
      void transform​(java.awt.geom.AffineTransform Tx)  
      void translate​(double tx, double ty)  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RMShapePainterJ2D

        public RMShapePainterJ2D​(java.awt.Graphics2D aGr)
        Creates a new RMShapePainterJ2D.
    • Method Detail

      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Returns the painting bounds (can be null).
      • setBounds

        public void setBounds​(java.awt.geom.Rectangle2D aRect)
        Sets the painting bounds (can be null).
      • setBounds

        public void setBounds​(double x,
                              double y,
                              double w,
                              double h)
        Sets the painting bounds.
      • getAlignmentX

        public float getAlignmentX()
        Returns the horizontal alignment.
      • setAlignmentX

        public void setAlignmentX​(float aValue)
        Sets the horizontal alignment.
      • getAlignmentY

        public float getAlignmentY()
        Returns the vertical alignment.
      • setAlignmentY

        public void setAlignmentY​(float aValue)
        Sets the vertical alignment.
      • getScale

        public float getScale()
        Returns the default scale.
      • setScale

        public void setScale​(float aValue)
        Sets the default scale.
      • isGrowToFit

        public boolean isGrowToFit()
        Returns whether painter should scale painting of shape up to fit bounds
      • setGrowToFit

        public void setGrowToFit​(boolean aValue)
        Returns whether painter should scale painting of shape up to fit bounds
      • isShrinkToFit

        public boolean isShrinkToFit()
        Returns whether painter should scale painting of shape down to fit bounds
      • setShrinkToFit

        public void setShrinkToFit​(boolean aValue)
        Returns whether painter should scale painting of shape down to fit bounds
      • isPrinting

        public boolean isPrinting()
        Returns whether shape painting is really printing.
        Specified by:
        isPrinting in interface RMPainter
      • setPrinting

        public void setPrinting​(boolean aValue)
        Sets whether shape painting is really printing.
      • isEditing

        public boolean isEditing()
        Returns whether painting is for editor.
        Specified by:
        isEditing in interface RMShapePainter
      • isSelected

        public boolean isSelected​(RMShape aShape)
        Returns whether given shape is selected.
        Specified by:
        isSelected in interface RMShapePainter
      • getColor

        public java.awt.Color getColor()
        Specified by:
        getColor in interface RMPainter
      • setColor

        public void setColor​(java.awt.Color c)
        Specified by:
        setColor in interface RMPainter
      • getFont

        public java.awt.Font getFont()
        Specified by:
        getFont in interface RMPainter
      • setFont

        public void setFont​(java.awt.Font font)
        Specified by:
        setFont in interface RMPainter
      • getPaint

        public java.awt.Paint getPaint()
        Specified by:
        getPaint in interface RMPainter
      • setPaint

        public void setPaint​(java.awt.Paint paint)
        Specified by:
        setPaint in interface RMPainter
      • getStroke

        public java.awt.Stroke getStroke()
        Specified by:
        getStroke in interface RMPainter
      • setStroke

        public void setStroke​(java.awt.Stroke s)
        Specified by:
        setStroke in interface RMPainter
      • getOpacity

        public double getOpacity()
        Returns the opacity.
        Specified by:
        getOpacity in interface RMPainter
      • setOpacity

        public void setOpacity​(double aValue)
        Sets the opacity.
        Specified by:
        setOpacity in interface RMPainter
      • draw

        public void draw​(java.awt.Shape s)
        Specified by:
        draw in interface RMPainter
      • fill

        public void fill​(java.awt.Shape s)
        Specified by:
        fill in interface RMPainter
      • drawLine

        public void drawLine​(double x1,
                             double y1,
                             double x2,
                             double y2)
        Specified by:
        drawLine in interface RMPainter
      • fillRect

        public void fillRect​(double x,
                             double y,
                             double w,
                             double h)
        Specified by:
        fillRect in interface RMPainter
      • drawRect

        public void drawRect​(double x,
                             double y,
                             double w,
                             double h)
        Specified by:
        drawRect in interface RMPainter
      • fill3DRect

        public void fill3DRect​(double x,
                               double y,
                               double w,
                               double h,
                               boolean raised)
        Specified by:
        fill3DRect in interface RMPainter
      • drawButton

        public void drawButton​(RMRect aRect,
                               boolean isPressed)
        Draws a button for the given rect with an option for pressed.
        Specified by:
        drawButton in interface RMPainter
      • drawButton

        public void drawButton​(double x,
                               double y,
                               double w,
                               double h,
                               boolean isPressed)
        Draws a button for the given rect with an option for pressed.
        Specified by:
        drawButton in interface RMPainter
      • drawImage

        public boolean drawImage​(java.awt.Image img,
                                 java.awt.geom.AffineTransform xform)
        Specified by:
        drawImage in interface RMPainter
      • drawImage

        public boolean drawImage​(java.awt.Image img,
                                 int x,
                                 int y,
                                 int w,
                                 int h)
        Specified by:
        drawImage in interface RMPainter
      • drawString

        public void drawString​(java.lang.String str,
                               double x,
                               double y)
        Specified by:
        drawString in interface RMPainter
      • drawGlyphVector

        public void drawGlyphVector​(java.awt.font.GlyphVector g,
                                    float x,
                                    float y)
        Specified by:
        drawGlyphVector in interface RMPainter
      • translate

        public void translate​(double tx,
                              double ty)
        Specified by:
        translate in interface RMPainter
      • rotate

        public void rotate​(double theta)
        Specified by:
        rotate in interface RMPainter
      • scale

        public void scale​(double sx,
                          double sy)
        Specified by:
        scale in interface RMPainter
      • transform

        public void transform​(java.awt.geom.AffineTransform Tx)
        Specified by:
        transform in interface RMPainter
      • getStringBounds

        public java.awt.geom.Rectangle2D getStringBounds​(java.lang.String aString)
        Returns the string bounds for current font.
        Specified by:
        getStringBounds in interface RMPainter
      • getFontAscent

        public double getFontAscent()
        Returns the ascender for the current font.
        Specified by:
        getFontAscent in interface RMPainter
      • getClipBounds

        public java.awt.Rectangle getClipBounds()
        Specified by:
        getClipBounds in interface RMPainter
      • getClip

        public java.awt.Shape getClip()
        Specified by:
        getClip in interface RMPainter
      • setClip

        public void setClip​(java.awt.Shape clip)
        Specified by:
        setClip in interface RMPainter
      • clip

        public void clip​(java.awt.Shape s)
        Specified by:
        clip in interface RMPainter
      • dispose

        public void dispose()
        Specified by:
        dispose in interface RMPainter
      • setAntialiasing

        public boolean setAntialiasing​(boolean aValue)
        Sets whether antialiasing.
        Specified by:
        setAntialiasing in interface RMPainter
      • getGraphics

        public java.awt.Graphics2D getGraphics()
        Returns the graphics.
        Specified by:
        getGraphics in interface RMPainter
      • toString

        public java.lang.String toString()
        Standard toString implementation.
        Overrides:
        toString in class java.lang.Object