Mercurial > dive4elements > river
changeset 1930:de0c2bbb27f9
Cosmetics, docs.
flys-artifacts/trunk@3310 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 Nov 2011 14:09:29 +0000 |
parents | 6b0ae0f2cae6 |
children | 7c52e9cb2a72 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/StackFrames.java flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java |
diffstat | 4 files changed, 24 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Nov 23 14:04:01 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Nov 23 14:09:29 2011 +0000 @@ -1,3 +1,10 @@ +2011-11-23 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/datacage/templating/StackFrames.java, + src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java, + src/main/java/de/intevation/flys/exports/XYChartGenerator.java: + Cosmetics, docs. + 2011-11-23 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/DischargeTables.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java Wed Nov 23 14:04:01 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java Wed Nov 23 14:09:29 2011 +0000 @@ -39,6 +39,7 @@ public static final FunctionResolver FUNCTIONS = new FunctionResolver(); static { + /** Implementation of case-ignoring dc:contains. */ FUNCTIONS.addFunction("contains", 2, new XPathFunction() { @Override public Object evaluate(List args) throws XPathFunctionException {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/StackFrames.java Wed Nov 23 14:04:01 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/StackFrames.java Wed Nov 23 14:09:29 2011 +0000 @@ -63,6 +63,12 @@ return false; } + /** + * Get element (variable) key. + * Returns null if not found. + * @param key name to resolve + * @return resolution, null if not found. + */ public Object get(String key) { return get(key, null); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Nov 23 14:04:01 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Nov 23 14:09:29 2011 +0000 @@ -103,7 +103,7 @@ String format = getFormat(); int[] size = getSize(); - context.putContextValue("chart.width", size[0]); + context.putContextValue("chart.width", size[0]); context.putContextValue("chart.height", size[1]); if (format.equals(ChartExportHelper.FORMAT_PNG)) { @@ -115,9 +115,9 @@ context); } else if (format.equals(ChartExportHelper.FORMAT_PDF)) { - context.putContextValue("chart.marginLeft", 5f); - context.putContextValue("chart.marginRight", 5f); - context.putContextValue("chart.marginTop", 5f); + context.putContextValue("chart.marginLeft", 5f); + context.putContextValue("chart.marginRight", 5f); + context.putContextValue("chart.marginTop", 5f); context.putContextValue("chart.marginBottom", 5f); context.putContextValue( "chart.page.format", @@ -141,6 +141,9 @@ } + /** + * Generate the chart anew (including localized axis and all). + */ public JFreeChart generateChart() { logger.debug("XYChartGenerator.generateChart"); @@ -248,6 +251,9 @@ } + /** + * @param range the new range. + */ private void combineYRanges(Range range, int index) { Integer key = Integer.valueOf(index);