comparison artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents c4654863108d
children d9c89651bd67 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
145 * alt="StableXYDifferenceRendererSample.png" /> 145 * alt="StableXYDifferenceRendererSample.png" />
146 */ 146 */
147 public class StableXYDifferenceRenderer extends AbstractXYItemRenderer 147 public class StableXYDifferenceRenderer extends AbstractXYItemRenderer
148 implements XYItemRenderer, PublicCloneable { 148 implements XYItemRenderer, PublicCloneable {
149 149
150 private static Logger log = Logger.getLogger(StableXYDifferenceRenderer.class); 150 private static Logger log = Logger.getLogger(
151 StableXYDifferenceRenderer.class);
151 152
152 public static final int CALCULATE_POSITIVE_AREA = 1; 153 public static final int CALCULATE_POSITIVE_AREA = 1;
153 public static final int CALCULATE_NEGATIVE_AREA = 2; 154 public static final int CALCULATE_NEGATIVE_AREA = 2;
154 public static final int CALCULATE_ALL_AREA = 155 public static final int CALCULATE_ALL_AREA =
155 CALCULATE_POSITIVE_AREA | CALCULATE_NEGATIVE_AREA; 156 CALCULATE_POSITIVE_AREA | CALCULATE_NEGATIVE_AREA;
967 drawItemPass1(g2, dataArea, info, 968 drawItemPass1(g2, dataArea, info,
968 plot, domainAxis, rangeAxis, 969 plot, domainAxis, rangeAxis,
969 dataset, series, item, crosshairState); 970 dataset, series, item, crosshairState);
970 } 971 }
971 972
972 // Find geometric middle, calculate area and paint a string with it here. 973 // Find geometric middle, calculate area and paint
973 if (pass == 1 && this.labelArea && areaLabelNumberFormat != null && areaLabelTamplate != null) { 974 // a string with it here.
975 if (pass == 1
976 && this.labelArea
977 && areaLabelNumberFormat != null
978 && areaLabelTamplate != null
979 ) {
974 double center_x = centroid.getX(); 980 double center_x = centroid.getX();
975 double center_y = centroid.getY(); 981 double center_y = centroid.getY();
976 center_x = domainAxis.valueToJava2D(center_x, dataArea, 982 center_x = domainAxis.valueToJava2D(center_x, dataArea,
977 plot.getDomainAxisEdge()); 983 plot.getDomainAxisEdge());
978 center_y = rangeAxis.valueToJava2D(center_y, dataArea, 984 center_y = rangeAxis.valueToJava2D(center_y, dataArea,
1819 // Not-filled Shape: 1825 // Not-filled Shape:
1820 //result = new LegendItem(label, description, 1826 //result = new LegendItem(label, description,
1821 // toolTipText, urlText, line, stroke, paint); 1827 // toolTipText, urlText, line, stroke, paint);
1822 1828
1823 if (drawOutline) { 1829 if (drawOutline) {
1824 // TODO Include outline style in legenditem (there is a constructor for that) 1830 // TODO Include outline style in legenditem
1831 // (there is a constructor for that)
1825 } 1832 }
1826 1833
1827 // Filled Shape ("Area-Style"). 1834 // Filled Shape ("Area-Style").
1828 result = new LegendItem(label, description, 1835 result = new LegendItem(label, description,
1829 toolTipText, urlText, line, paint); 1836 toolTipText, urlText, line, paint);
1886 * @return A clone. 1893 * @return A clone.
1887 * 1894 *
1888 * @throws CloneNotSupportedException if the renderer cannot be cloned. 1895 * @throws CloneNotSupportedException if the renderer cannot be cloned.
1889 */ 1896 */
1890 public Object clone() throws CloneNotSupportedException { 1897 public Object clone() throws CloneNotSupportedException {
1891 StableXYDifferenceRenderer clone = (StableXYDifferenceRenderer) super.clone(); 1898 StableXYDifferenceRenderer clone =
1899 (StableXYDifferenceRenderer) super.clone();
1892 clone.legendShape = ShapeUtilities.clone(this.legendShape); 1900 clone.legendShape = ShapeUtilities.clone(this.legendShape);
1893 return clone; 1901 return clone;
1894 } 1902 }
1895 1903
1896 /** 1904 /**

http://dive4elements.wald.intevation.org