# HG changeset patch # User Ingo Weinzierl # Date 1271316005 0 # Node ID bcdcce146c14c2261238e6ec6bd2690b7184a2a3 # Parent 3ab5754e72e3fa0957d3ed6c6c8580f37a0e39af Read a system property to adjust the percentage that defines the size of a gap in charts (issue175). gnv-artifacts/trunk@930 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 3ab5754e72e3 -r bcdcce146c14 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Tue Apr 13 14:35:30 2010 +0000 +++ b/gnv-artifacts/ChangeLog Thu Apr 15 07:20:05 2010 +0000 @@ -1,3 +1,13 @@ +2010-04-15 Ingo Weinzierl + + Issue175 + + * src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java, + src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java: Read + percentage that defines the gap size in charts from system property + "chart.gap.percentage". The default value is 5 (percent) if this property + is not existing. + 2010-04-13 Tim Englich * src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java (getWMS): diff -r 3ab5754e72e3 -r bcdcce146c14 gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java Tue Apr 13 14:35:30 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java Thu Apr 15 07:20:05 2010 +0000 @@ -65,13 +65,19 @@ /** * Percentage used for gap detection. Its value is {@value}. */ - public static final int GAP_SIZE = 5; // in percent + public static int GAP_SIZE = 5; // in percent /** * Logger used for logging with log4j. */ private static Logger log = Logger.getLogger(TimeSeriesChart.class); + static { + /* The percentage defining the width of a gap should be configured in + * conf.xml instead of being configured in a system property */ + GAP_SIZE = Integer.getInteger("chart.gap.percentage", GAP_SIZE); + } + /** * Constructor used to create TimeSeries charts. diff -r 3ab5754e72e3 -r bcdcce146c14 gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java Tue Apr 13 14:35:30 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java Thu Apr 15 07:20:05 2010 +0000 @@ -49,7 +49,7 @@ /** * Constant used for gap detection. Its value is {@value}. */ - protected final double PERCENTAGE = 5.0; + protected static int PERCENTAGE = 5; /** * Constnat used for gap detection in @see #gridDetection. @@ -68,6 +68,12 @@ */ protected Map values; + static { + /* The percentage defining the width of a gap should be configured in + * conf.xml instead of being configured in a system property */ + PERCENTAGE = Integer.getInteger("chart.gap.percentage", PERCENTAGE); + } + /** * Constructor used to create xy-charts.