Mercurial > dive4elements > river
changeset 9353:217e8e59c386
sinfo flowdepth multiple pairs allowed; bugfix arrayOutOfRange hasTkh==false && useTkh==true
line wrap: on
line diff
--- a/artifacts/doc/conf/jasper/templates/bundu.bezugswst.result3.jrxml Tue Jul 31 17:17:46 2018 +0200 +++ b/artifacts/doc/conf/jasper/templates/bundu.bezugswst.result3.jrxml Tue Jul 31 17:53:41 2018 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 4.5.0 --> -<!-- 2018-07-31T13:58:05 --> +<!-- 2018-07-31T17:35:45 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="545" leftMargin="30" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/>
--- a/artifacts/doc/conf/jasper/templates/sinfo.flowdepth.jrxml Tue Jul 31 17:17:46 2018 +0200 +++ b/artifacts/doc/conf/jasper/templates/sinfo.flowdepth.jrxml Tue Jul 31 17:53:41 2018 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.5.1.final using JasperReports Library version 4.5.0 --> -<!-- 2018-07-31T13:59:08 --> +<!-- 2018-07-31T17:35:59 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="842" pageHeight="595" columnWidth="515" leftMargin="60" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> @@ -8,7 +8,7 @@ <style name="htmlStyle" markup="html" fontName="Roboto"> <box topPadding="2" leftPadding="5" rightPadding="5"/> </style> - <field name="meta:totalpagesoffset" class="java.lang.Integer"/> + <field name="meta:totalpages" class="java.lang.Integer"/> <field name="meta:startpageoffset" class="java.lang.Integer"/> <field name="meta:header" class="java.lang.String"/> <field name="meta:calcMode" class="java.lang.String"/> @@ -259,7 +259,7 @@ <reportElement style="htmlStyle" x="705" y="0" width="57" height="15"/> <box leftPadding="0"/> <textElement textAlignment="Left"/> - <textFieldExpression><![CDATA["/ " +( $V{PAGE_NUMBER} +(($F{meta:totalpagesoffset} != null) ? $F{meta:totalpagesoffset} : 0) )]]></textFieldExpression> + <textFieldExpression><![CDATA["/ " + ( $V{PAGE_NUMBER}+( ($F{meta:totalpages} != null) ? $F{meta:totalpages} -$V{PAGE_NUMBER} : 0 ) )]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement style="htmlStyle" x="650" y="0" width="55" height="15"/>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractCommonExporter.java Tue Jul 31 17:17:46 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/common/AbstractCommonExporter.java Tue Jul 31 17:53:41 2018 +0200 @@ -75,7 +75,7 @@ final RiverInfo river = results.getRiver(); - final Class<?> lastResultType = null; + Class<?> lastResultType = null; for (final AbstractCalculationExportableResult result : results.getResults()) { @@ -87,6 +87,7 @@ } else exportContext.writeCSVLine(new String[] { "#" }); + lastResultType = resultType; result.writeCsv(exportContext); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/WaterlevelSoundingCurrentPairSelectState.java Tue Jul 31 17:17:46 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/WaterlevelSoundingCurrentPairSelectState.java Tue Jul 31 17:53:41 2018 +0200 @@ -22,6 +22,6 @@ private static final long serialVersionUID = 1L; public WaterlevelSoundingCurrentPairSelectState() { - super("sinfo_flowdepth_twin_panel", FlowDepthDevelopmentAccess.FIELD_DIFFID_CURRENT); + super("sinfo_flowdepth_development_twin_panel", FlowDepthDevelopmentAccess.FIELD_DIFFID_CURRENT); } } \ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/WaterlevelSoundingHistoricalPairSelectState.java Tue Jul 31 17:17:46 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/WaterlevelSoundingHistoricalPairSelectState.java Tue Jul 31 17:53:41 2018 +0200 @@ -21,6 +21,6 @@ private static final long serialVersionUID = 1L; public WaterlevelSoundingHistoricalPairSelectState() { - super("sinfo_flowdepth_twin_panel", FlowDepthDevelopmentAccess.FIELD_DIFFID_HIST); + super("sinfo_flowdepth_development_twin_panel", FlowDepthDevelopmentAccess.FIELD_DIFFID_HIST); } } \ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/TableDataPanel.java Tue Jul 31 17:17:46 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/TableDataPanel.java Tue Jul 31 17:53:41 2018 +0200 @@ -16,7 +16,6 @@ import org.dive4elements.river.client.client.FLYSConstants; import org.dive4elements.river.client.client.services.CSVExportService; import org.dive4elements.river.client.client.services.CSVExportServiceAsync; -import org.dive4elements.river.client.shared.model.DataList; import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.NumberFormat; @@ -201,9 +200,9 @@ for (int j = 0; j < sItem.length; j++) { // See above, display 'as is' from server, but keep value // in machine-usable way (float), to allow numeric sorting. - String item = sItem[j]; - String encodedText = SafeHtmlUtils.htmlEscapeAllowEntities(item); - + final String item = sItem[j]; + final String encodedText = SafeHtmlUtils.htmlEscapeAllowEntities(item); + r.setAttribute(displayField[j], encodedText); if (fields[j].getType() == ListGridFieldType.TEXT) { r.setAttribute(String.valueOf(j), item);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Tue Jul 31 17:17:46 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Tue Jul 31 17:53:41 2018 +0200 @@ -30,8 +30,8 @@ import org.dive4elements.river.client.client.ui.minfo.SedLoadSQTiPanel; import org.dive4elements.river.client.client.ui.sinfo.CollisionLoadEpochPanel; import org.dive4elements.river.client.client.ui.sinfo.CollisionLoadYearPanel; +import org.dive4elements.river.client.client.ui.sinfo.DiffPairTwinPanel; import org.dive4elements.river.client.client.ui.sinfo.FlowDepthMinMaxTwinPanel; -import org.dive4elements.river.client.client.ui.sinfo.FlowDepthTwinPanel; import org.dive4elements.river.client.client.ui.sq.SQPeriodPanel; import org.dive4elements.river.client.client.ui.uinfo.Limit5SalixBehaviour; import org.dive4elements.river.client.client.ui.uinfo.LoadSedimentHeightPanel; @@ -212,12 +212,13 @@ return new StaticDataPanel(); } else if (uiProvider.equals("uinfo.salix.supraregional.table")) { return new SupraRegionalTablePanel(); - } + } else if ("sinfo_flowdepth_development_twin_panel".equals(uiProvider)) + return new DiffPairTwinPanel(user, 1, getMSG().sinfo_flow_depth_development_twin_panel_max_count_msg()); - if ("sinfo_flowdepth_twin_panel".equals(uiProvider)) - return new FlowDepthTwinPanel(user, 1, getMSG().sinfo_flow_depth_development_twin_panel_max_count_msg()); + else if ("sinfo_flowdepth_twin_panel".equals(uiProvider)) + return new DiffPairTwinPanel(user, 9999, ""); - if ("sinfo_flowdepthminmax_twin_panel".equals(uiProvider)) + else if ("sinfo_flowdepthminmax_twin_panel".equals(uiProvider)) return new FlowDepthMinMaxTwinPanel(user); // GWT.log("Picked default provider.");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sinfo/DiffPairTwinPanel.java Tue Jul 31 17:53:41 2018 +0200 @@ -0,0 +1,33 @@ +/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ +package org.dive4elements.river.client.client.ui.sinfo; + +import org.dive4elements.river.client.client.ui.DatacageTwinPanel; +import org.dive4elements.river.client.client.ui.DefaultDatacageTwinPanelInfo; +import org.dive4elements.river.client.client.ui.NilDatacageTwinPanelInfo; +import org.dive4elements.river.client.shared.model.User; + +/** + * @author Gernot Belger + */ +public final class DiffPairTwinPanel extends DatacageTwinPanel { + + private static final long serialVersionUID = 1L; + + private static final DefaultDatacageTwinPanelInfo SOUNDING_INFO = new DefaultDatacageTwinPanelInfo(MSG.sinfo_columnlabel_soundings(), "bedheight", + "sinfo_flowdepth_minfo_heights"); + + private static final NilDatacageTwinPanelInfo WATERLEVEL_INFO = new NilDatacageTwinPanelInfo(MSG.sinfo_columnlabel_waterlevels(), + "sinfo_flowdepth_waterlevels"); + + public DiffPairTwinPanel(final User user, final int maxCount, final String msgMaxCount) { + super(user, new FlowDepthTwinPanelValidator(), new WaterlevelSoundingSelectionController(MSG), SOUNDING_INFO, WATERLEVEL_INFO, maxCount, msgMaxCount); + } +} \ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sinfo/FlowDepthTwinPanel.java Tue Jul 31 17:17:46 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde - * Software engineering by - * Björnsen Beratende Ingenieure GmbH - * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt - * - * This file is Free Software under the GNU AGPL (>=v3) - * and comes with ABSOLUTELY NO WARRANTY! Check out the - * documentation coming with Dive4Elements River for details. - */ -package org.dive4elements.river.client.client.ui.sinfo; - -import org.dive4elements.river.client.client.ui.DatacageTwinPanel; -import org.dive4elements.river.client.client.ui.DefaultDatacageTwinPanelInfo; -import org.dive4elements.river.client.client.ui.NilDatacageTwinPanelInfo; -import org.dive4elements.river.client.shared.model.User; - -/** - * @author Gernot Belger - */ -public final class FlowDepthTwinPanel extends DatacageTwinPanel { - - private static final long serialVersionUID = 1L; - - private static final DefaultDatacageTwinPanelInfo SOUNDING_INFO = new DefaultDatacageTwinPanelInfo(MSG.sinfo_columnlabel_soundings(), "bedheight", - "sinfo_flowdepth_minfo_heights"); - - private static final NilDatacageTwinPanelInfo WATERLEVEL_INFO = new NilDatacageTwinPanelInfo(MSG.sinfo_columnlabel_waterlevels(), - "sinfo_flowdepth_waterlevels"); - - public FlowDepthTwinPanel(final User user, final int maxCount, final String msgMaxCount) { - super(user, new FlowDepthTwinPanelValidator(), new WaterlevelSoundingSelectionController(MSG), SOUNDING_INFO, WATERLEVEL_INFO, maxCount, msgMaxCount); - } -} \ No newline at end of file