Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java @ 2662:bdc86e61428c
Respect show line label bg setting.
flys-artifacts/trunk@4337 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 03 May 2012 07:48:12 +0000 |
parents | 1a044c51abe4 |
children | 9cea02b51241 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java Thu May 03 05:59:52 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java Thu May 03 07:48:12 2012 +0000 @@ -247,7 +247,6 @@ g2.draw(shape); } } - // TODO labeling of waterlevels could happen here, too. } // if (getItemShapeVisible(dataset, series, item)) double xx = transX1; @@ -271,16 +270,17 @@ : xYSeries.getKey().toString(); // TODO Force water of some German rivers to flow direction mountains. Font oldFont = g2.getFont(); - // or do we have to do it via getPaint? Color oldColor = g2.getColor(); g2.setFont(this.getLineLabelFont(series)); g2.setColor(this.getLineLabelTextColor(series)); g2.setBackground(Color.black); - // TODO if bg-bool ... - drawTextBox(g2, waterlevelLabel, (float)xx, (float)yy-3f, - getLineLabelBGColor(series)); + // Fill background. + if (isShowLineLabelBG(series)) { + drawTextBox(g2, waterlevelLabel, (float)xx, (float)yy-3f, + getLineLabelBGColor(series)); + } g2.drawString(waterlevelLabel, (float)xx, (float)yy-3f);