Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.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 | fa363aac788b |
children | 4d8959a4b49d |
comparison
equal
deleted
inserted
replaced
2655:60925be3c84f | 2656:f1dcd5f94ffa |
---|---|
1 package de.intevation.flys.jfree; | 1 package de.intevation.flys.jfree; |
2 | 2 |
3 import java.awt.Color; | 3 import java.awt.Color; |
4 import java.awt.Graphics2D; | 4 import java.awt.Graphics2D; |
5 import java.awt.Font; | |
5 import java.awt.Paint; | 6 import java.awt.Paint; |
6 import java.awt.Shape; | 7 import java.awt.Shape; |
7 import java.awt.geom.Rectangle2D; | 8 import java.awt.geom.Rectangle2D; |
8 import java.util.HashMap; | 9 import java.util.HashMap; |
9 import java.util.Map; | 10 import java.util.Map; |
42 | 43 |
43 protected Map<Integer, Double> seriesMinimum; | 44 protected Map<Integer, Double> seriesMinimum; |
44 protected Map<Integer, Double> seriesMinimumX; | 45 protected Map<Integer, Double> seriesMinimumX; |
45 protected Map<Integer, Double> seriesMaximum; | 46 protected Map<Integer, Double> seriesMaximum; |
46 | 47 |
48 protected Map<Integer, Font> lineLabelFonts; | |
49 | |
47 | 50 |
48 public EnhancedLineAndShapeRenderer(boolean lines, boolean shapes) { | 51 public EnhancedLineAndShapeRenderer(boolean lines, boolean shapes) { |
49 super(lines, shapes); | 52 super(lines, shapes); |
50 this.isMinimumShapeVisible = new BooleanList(); | 53 this.isMinimumShapeVisible = new BooleanList(); |
51 this.isMaximumShapeVisible = new BooleanList(); | 54 this.isMaximumShapeVisible = new BooleanList(); |
52 this.showLineLabel = new BooleanList(); | 55 this.showLineLabel = new BooleanList(); |
53 this.seriesMinimum = new HashMap<Integer, Double>(); | 56 this.seriesMinimum = new HashMap<Integer, Double>(); |
54 this.seriesMaximum = new HashMap<Integer, Double>(); | 57 this.seriesMaximum = new HashMap<Integer, Double>(); |
55 this.seriesMinimumX = new HashMap<Integer, Double>(); | 58 this.seriesMinimumX = new HashMap<Integer, Double>(); |
59 this.lineLabelFonts = new HashMap<Integer, Font>(); | |
56 } | 60 } |
57 | 61 |
58 | 62 |
59 public boolean getItemShapeVisible(XYDataset dataset, int series, int item){ | 63 public boolean getItemShapeVisible(XYDataset dataset, int series, int item){ |
60 if (super.getItemShapeVisible(series, item)) { | 64 if (super.getItemShapeVisible(series, item)) { |
304 /** Sets whether or not a label should be shown for series. */ | 308 /** Sets whether or not a label should be shown for series. */ |
305 public void setShowLineLabel(boolean showLineLabel, int series) { | 309 public void setShowLineLabel(boolean showLineLabel, int series) { |
306 this.showLineLabel.setBoolean(series, showLineLabel); | 310 this.showLineLabel.setBoolean(series, showLineLabel); |
307 } | 311 } |
308 | 312 |
313 public void setLineLabelFont(Font font, int series) { | |
314 this.lineLabelFonts.put(series, font); | |
315 } | |
316 | |
317 public Font getLineLabelFont(int series) { | |
318 return this.lineLabelFonts.get(series); | |
319 } | |
320 | |
309 | 321 |
310 /** | 322 /** |
311 * True if the given item of given dataset has the smallest | 323 * True if the given item of given dataset has the smallest |
312 * X value within this set. | 324 * X value within this set. |
313 */ | 325 */ |