Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/jfreechart/PolygonRenderer.java @ 778:9a828e5a2390
Removed trailing whitespace
gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:58:51 +0000 |
parents | bc5901bb4525 |
children | b1f5f2a8840f |
comparison
equal
deleted
inserted
replaced
777:8009961db1cb | 778:9a828e5a2390 |
---|---|
56 protected String toString(Object label) { | 56 protected String toString(Object label) { |
57 return label.toString(); | 57 return label.toString(); |
58 } | 58 } |
59 } // class DefaultLabelGenerator | 59 } // class DefaultLabelGenerator |
60 | 60 |
61 public static final PolygonSeriesLabelGenerator | 61 public static final PolygonSeriesLabelGenerator |
62 DEFAULT_LABEL_GENERATOR_INSTANCE = new DefaultLabelGenerator(); | 62 DEFAULT_LABEL_GENERATOR_INSTANCE = new DefaultLabelGenerator(); |
63 | 63 |
64 protected PaintLookup lookup; | 64 protected PaintLookup lookup; |
65 protected PolygonSeriesLabelGenerator labelGenerator; | 65 protected PolygonSeriesLabelGenerator labelGenerator; |
66 | 66 |
67 public PolygonRenderer(PaintLookup lookup) { | 67 public PolygonRenderer(PaintLookup lookup) { |
68 this(lookup, null); | 68 this(lookup, null); |
69 } | 69 } |
70 | 70 |
71 public PolygonRenderer( | 71 public PolygonRenderer( |
72 PaintLookup lookup, | 72 PaintLookup lookup, |
73 PolygonSeriesLabelGenerator labelGenerator | 73 PolygonSeriesLabelGenerator labelGenerator |
74 ) { | 74 ) { |
75 this.lookup = lookup; | 75 this.lookup = lookup; |
76 this.labelGenerator = labelGenerator; | 76 this.labelGenerator = labelGenerator; |
77 } | 77 } |
133 | 133 |
134 for (int j = series.getItemCount()-1; j >= 0; --j) { | 134 for (int j = series.getItemCount()-1; j >= 0; --j) { |
135 final CompactXYItems ring = series.getItem(j); | 135 final CompactXYItems ring = series.getItem(j); |
136 LevelOrderIndices loi = new LevelOrderIndices(ring.size()-1); | 136 LevelOrderIndices loi = new LevelOrderIndices(ring.size()-1); |
137 Rectangle2D r = (Rectangle2D)loi.visit( | 137 Rectangle2D r = (Rectangle2D)loi.visit( |
138 new LevelOrderIndices.Visitor() | 138 new LevelOrderIndices.Visitor() |
139 { | 139 { |
140 ValueAxis da = plot.getDomainAxis(); | 140 ValueAxis da = plot.getDomainAxis(); |
141 ValueAxis ra = plot.getRangeAxis(); | 141 ValueAxis ra = plot.getRangeAxis(); |
142 RectangleEdge de = plot.getDomainAxisEdge(); | 142 RectangleEdge de = plot.getDomainAxisEdge(); |
143 RectangleEdge re = plot.getRangeAxisEdge(); | 143 RectangleEdge re = plot.getRangeAxisEdge(); |
144 Rectangle2D.Double r = new Rectangle2D.Double( | 144 Rectangle2D.Double r = new Rectangle2D.Double( |
145 0d, 0d, box.getWidth(), box.getHeight()); | 145 0d, 0d, box.getWidth(), box.getHeight()); |
146 | 146 |
147 public Object visit(int index) { | 147 public Object visit(int index) { |
148 r.x = da.valueToJava2D(ring.getX(index), area, de) | 148 r.x = da.valueToJava2D(ring.getX(index), area, de) |
149 - 0.5*box.getWidth(); | 149 - 0.5*box.getWidth(); |
150 r.y = ra.valueToJava2D(ring.getY(index), area, re) | 150 r.y = ra.valueToJava2D(ring.getY(index), area, re) |
151 + 0.5*box.getHeight(); | 151 + 0.5*box.getHeight(); |
152 | 152 |
153 for (Rectangle2D b: bboxes) { | 153 for (Rectangle2D b: bboxes) { |
169 } | 169 } |
170 | 170 |
171 protected Shape constructShape( | 171 protected Shape constructShape( |
172 PolygonPlot plot, | 172 PolygonPlot plot, |
173 Rectangle2D area, | 173 Rectangle2D area, |
174 PolygonSeries series, | 174 PolygonSeries series, |
175 boolean close | 175 boolean close |
176 ) { | 176 ) { |
177 ValueAxis da = plot.getDomainAxis(); | 177 ValueAxis da = plot.getDomainAxis(); |
178 ValueAxis ra = plot.getRangeAxis(); | 178 ValueAxis ra = plot.getRangeAxis(); |
179 RectangleEdge de = plot.getDomainAxisEdge(); | 179 RectangleEdge de = plot.getDomainAxisEdge(); |