Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java @ 2656:f1dcd5f94ffa
Parse more theme properties for linelabels.
flys-artifacts/trunk@4327 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 02 May 2012 15:09:04 +0000 |
parents | 8aaa7f4ce06a |
children | 1a044c51abe4 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java Wed May 02 08:50:01 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/XYStyle.java Wed May 02 15:09:04 2012 +0000 @@ -40,6 +40,7 @@ applyShowMinimum(r, idx); applyShowMaximum(r, idx); applyShowLineLabel(r, idx); + applyLineLabelFont(r, idx); return r; } @@ -61,6 +62,18 @@ ((EnhancedLineAndShapeRenderer)r).setShowLineLabel(showLabelLine, idx); } + + /** Tell the renderer which font (and -size and -style) to use for + * linelabels. */ + protected void applyLineLabelFont(XYLineAndShapeRenderer r, int idx) { + if (!(r instanceof EnhancedLineAndShapeRenderer)) { + return; + } + ((EnhancedLineAndShapeRenderer)r).setLineLabelFont(ThemeUtil.parseLineLabelFont(theme), idx); + } + + + /** Set stroke of series. */ protected void applyLineSize(XYLineAndShapeRenderer r, int idx) { int size = ThemeUtil.parseLineWidth(theme); r.setSeriesStroke( @@ -69,6 +82,7 @@ } + /** Set stroke strength of series. */ protected void applyLineType(XYLineAndShapeRenderer r, int idx) { int size = ThemeUtil.parseLineWidth(theme); float[] dashes = ThemeUtil.parseLineStyle(theme);