Class BasePainter
- java.lang.Object
-
- net.adoptopenjdk.icedteaweb.client.parts.splashscreen.impls.defaultsplashscreen2012.BasePainter
-
- All Implemented Interfaces:
java.util.Observer
- Direct Known Subclasses:
ErrorPainter
public class BasePainter extends java.lang.Object implements java.util.Observer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classBasePainter.MovingTextRunnerprivate classBasePainter.WaterLevelThread
-
Field Summary
Fields Modifier and Type Field Description private java.awt.PointaboutOffsetprivate static java.lang.StringalternativeICEDprivate java.awt.FontalternativeTextFontprivate static java.lang.StringalternativeTteaprivate static java.lang.StringalternativeWebprivate intanimationsPositionprotected static java.awt.ColorBACKGROUND_LIVE_COLORprotected java.awt.ColorbackgroundColorprotected booleancanWaveprivate static float[]dash1private static java.awt.BasicStrokedashedprivate intgreyTextIncrementprivate static java.lang.StringICEDprivate java.awt.FonticedFontprivate static LoggerLOGprotected BasicComponentSplashScreenmasterprotected TextWithWaterLeveloldTwlprotected static java.awt.ColorPLAIN_TEXT_LIVE_COLORprotected java.awt.ColorplainTextColorprivate java.awt.FontplainTextsFontprotected static java.awt.ColorPLUGIN_LIVE_COLORprotected java.awt.ColorpluginColorprivate java.awt.FontpluginFontprotected java.awt.image.BufferedImageprerenderedStuffprivate booleanshowInfoprivate booleanshowLeafprotected booleanshowNiceTextsprivate static java.lang.Stringteaprotected static java.awt.ColorTEA_LEAFS_STALKS_LIVE_COLORprotected static java.awt.ColorTEA_LIVE_COLORprotected java.awt.ColorteaColorprivate java.awt.FontteaFontprotected java.awt.ColorteaLeafsStalksColorprotected TextWithWaterLeveltwlstatic java.awt.ColorWATER_LIVE_COLORprotected java.awt.ColorwaterColorprivate intwaterLevelprivate static java.lang.Stringwebprivate intWEB_LEFT_ALIGMENTExperimentally measured best left position for painted parts of vectorsprivate intWEB_TOP_ALIGMENTExperimentally measured best top position for painted parts of vectorsprivate java.awt.FontwebFont
-
Constructor Summary
Constructors Constructor Description BasePainter(BasicComponentSplashScreen master)BasePainter(BasicComponentSplashScreen master, boolean startAnimation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustForSize(int width, int height)voidclearCachedWaterTextImage()protected java.awt.FontMetricsdrawBase(java.awt.Graphics2D g2d, InformationElement ic, java.lang.String version)protected voiddrawTextAroundCenter(java.awt.Graphics2D g2d, double heightOffset, java.lang.String msg)protected voidensurePrerenderedStuff()java.awt.PointgetAboutOffset()intgetAnimationsPosition()java.awt.ColorgetBackgroundColor()private java.lang.ThreadgetMovingTextThread()static doublegetRatio(double origSize, double currentSize)private doublegetRatioX()private doublegetRatioY()java.awt.ColorgetWaterColor()intgetWaterLevel()private java.lang.ThreadgetWaterLevelThread()voidincreaseAnimationPosition()private doubleminRatio()voidpaint(java.awt.Graphics g)protected voidpaintNiceTexts(java.awt.Graphics2D g2d)protected voidpaintPlainTexts(java.awt.Graphics2D g2d)protected voidpaintStillTo(java.awt.Graphics2D g2d, InformationElement ic, java.lang.String version)private voidprepareFonts(int w, int h)protected java.awt.image.BufferedImageprerenderStill()static doublescale(double origSize, double currentSize, double origValue)private intscaleMin(double origValue)private intscaleX(double origValue)private static doublescaleX(double currentSize, double origValue)private intscaleY(double origValue)private static doublescaleY(double currentSize, double origValue)private voidsetColors()private voidsetEnablings(int w, int h, java.lang.String version, InformationElement ic, java.awt.Graphics2D g2d)voidsetWaterLevel(int level)voidstartAnimationThreads()(package private) static java.lang.StringstripCommitFromVersion(java.lang.String version)voidupdate(java.util.Observable o, java.lang.Object arg)
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
master
protected final BasicComponentSplashScreen master
-
waterLevel
private int waterLevel
-
animationsPosition
private int animationsPosition
-
greyTextIncrement
private final int greyTextIncrement
- See Also:
- Constant Field Values
-
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
-
alternativeICED
private static final java.lang.String alternativeICED
- See Also:
- Constant Field Values
-
alternativeWeb
private static final java.lang.String alternativeWeb
- See Also:
- Constant Field Values
-
alternativeTtea
private static final java.lang.String alternativeTtea
- See Also:
- Constant Field Values
-
ICED
private static final java.lang.String ICED
- See Also:
- Constant Field Values
-
web
private static final java.lang.String web
- See Also:
- Constant Field Values
-
tea
private static final java.lang.String tea
- See Also:
- Constant Field Values
-
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
-
twl
protected TextWithWaterLevel twl
-
oldTwl
protected TextWithWaterLevel oldTwl
-
canWave
protected boolean canWave
-
aboutOffset
private java.awt.Point aboutOffset
-
dash1
private static final float[] dash1
-
dashed
private static final java.awt.BasicStroke dashed
-
-
Constructor Detail
-
BasePainter
public BasePainter(BasicComponentSplashScreen master)
-
BasePainter
public BasePainter(BasicComponentSplashScreen master, boolean startAnimation)
-
-
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:
updatein interfacejava.util.Observer
-
getAboutOffset
public java.awt.Point getAboutOffset()
-
getWaterColor
public java.awt.Color getWaterColor()
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
-
-