Class BasePainter

  • All Implemented Interfaces:
    java.util.Observer
    Direct Known Subclasses:
    ErrorPainter

    public class BasePainter
    extends java.lang.Object
    implements java.util.Observer
    • Field Detail

      • LOG

        private static final Logger LOG
      • waterLevel

        private int waterLevel
      • animationsPosition

        private int animationsPosition
      • TEA_LIVE_COLOR

        protected static final java.awt.Color TEA_LIVE_COLOR
      • BACKGROUND_LIVE_COLOR

        protected static final java.awt.Color BACKGROUND_LIVE_COLOR
      • TEA_LEAFS_STALKS_LIVE_COLOR

        protected static final java.awt.Color TEA_LEAFS_STALKS_LIVE_COLOR
      • PLUGIN_LIVE_COLOR

        protected static final java.awt.Color PLUGIN_LIVE_COLOR
      • WATER_LIVE_COLOR

        public static final java.awt.Color WATER_LIVE_COLOR
      • PLAIN_TEXT_LIVE_COLOR

        protected static final java.awt.Color PLAIN_TEXT_LIVE_COLOR
      • teaColor

        protected java.awt.Color teaColor
      • backgroundColor

        protected java.awt.Color backgroundColor
      • teaLeafsStalksColor

        protected java.awt.Color teaLeafsStalksColor
      • pluginColor

        protected java.awt.Color pluginColor
      • waterColor

        protected java.awt.Color waterColor
      • plainTextColor

        protected java.awt.Color plainTextColor
      • prerenderedStuff

        protected java.awt.image.BufferedImage prerenderedStuff
      • teaFont

        private java.awt.Font teaFont
      • icedFont

        private java.awt.Font icedFont
      • webFont

        private java.awt.Font webFont
      • pluginFont

        private java.awt.Font pluginFont
      • plainTextsFont

        private java.awt.Font plainTextsFont
      • alternativeTextFont

        private java.awt.Font alternativeTextFont
      • WEB_TOP_ALIGMENT

        private final int WEB_TOP_ALIGMENT
        Experimentally measured best top position for painted parts of vectors
        See Also:
        Constant Field Values
      • WEB_LEFT_ALIGMENT

        private final int WEB_LEFT_ALIGMENT
        Experimentally measured best left position for painted parts of vectors
        See Also:
        Constant Field Values
      • showNiceTexts

        protected boolean showNiceTexts
      • showLeaf

        private boolean showLeaf
      • showInfo

        private boolean showInfo
      • canWave

        protected boolean canWave
      • aboutOffset

        private java.awt.Point aboutOffset
      • dash1

        private static final float[] dash1
      • dashed

        private static final java.awt.BasicStroke dashed
    • Method Detail

      • paintNiceTexts

        protected void paintNiceTexts​(java.awt.Graphics2D g2d)
      • paintPlainTexts

        protected void paintPlainTexts​(java.awt.Graphics2D g2d)
      • scaleMin

        private int scaleMin​(double origValue)
      • minRatio

        private double minRatio()
      • scaleY

        private int scaleY​(double origValue)
      • scaleX

        private int scaleX​(double origValue)
      • getRatioY

        private double getRatioY()
      • getRatioX

        private double getRatioX()
      • scaleY

        private static double scaleY​(double currentSize,
                                     double origValue)
      • scaleX

        private static double scaleX​(double currentSize,
                                     double origValue)
      • scale

        public static double scale​(double origSize,
                                   double currentSize,
                                   double origValue)
      • getRatio

        public static double getRatio​(double origSize,
                                      double currentSize)
      • increaseAnimationPosition

        public void increaseAnimationPosition()
      • ensurePrerenderedStuff

        protected void ensurePrerenderedStuff()
      • paint

        public void paint​(java.awt.Graphics g)
      • adjustForSize

        public final void adjustForSize​(int width,
                                        int height)
      • setEnablings

        private void setEnablings​(int w,
                                  int h,
                                  java.lang.String version,
                                  InformationElement ic,
                                  java.awt.Graphics2D g2d)
      • startAnimationThreads

        public final void startAnimationThreads()
      • prepareFonts

        private void prepareFonts​(int w,
                                  int h)
      • setColors

        private void setColors()
      • prerenderStill

        protected java.awt.image.BufferedImage prerenderStill()
      • paintStillTo

        protected void paintStillTo​(java.awt.Graphics2D g2d,
                                    InformationElement ic,
                                    java.lang.String version)
      • drawTextAroundCenter

        protected void drawTextAroundCenter​(java.awt.Graphics2D g2d,
                                            double heightOffset,
                                            java.lang.String msg)
      • getMovingTextThread

        private java.lang.Thread getMovingTextThread()
      • stripCommitFromVersion

        static java.lang.String stripCommitFromVersion​(java.lang.String version)
      • getWaterLevelThread

        private java.lang.Thread getWaterLevelThread()
      • drawBase

        protected java.awt.FontMetrics drawBase​(java.awt.Graphics2D g2d,
                                                InformationElement ic,
                                                java.lang.String version)
      • getWaterLevel

        public int getWaterLevel()
      • setWaterLevel

        public void setWaterLevel​(int level)
      • getAnimationsPosition

        public int getAnimationsPosition()
      • clearCachedWaterTextImage

        public void clearCachedWaterTextImage()
      • update

        public void update​(java.util.Observable o,
                           java.lang.Object arg)
        Specified by:
        update in interface java.util.Observer
      • getAboutOffset

        public java.awt.Point getAboutOffset()
      • getWaterColor

        public java.awt.Color getWaterColor()
      • getBackgroundColor

        public java.awt.Color getBackgroundColor()