[Dive4elements-commits] [PATCH] Added new themes for W and Q markers in Historical Discharge WQ charts
Wald Commits
scm-commit at wald.intevation.org
Mon Oct 29 06:54:56 CET 2012
# HG changeset patch
# User Ingo Weinzierl <ingo.weinzierl at intevation.de>
# Date 1351490088 -3600
# Node ID 7140bb0f92b01f2cf6043a4d55e9b6b0c58abace
# Parent 8b49888159747dc28de7a327becf1a6a93bea657
Added new themes for W and Q markers in Historical Discharge WQ charts.
ThemeUtil.parseLineColorField() will now use parseColor() to parse the color string.
This enables using hex colors in theme configs.
diff -r 8b4988815974 -r 7140bb0f92b0 flys-artifacts/doc/conf/default-themes.xml
--- a/flys-artifacts/doc/conf/default-themes.xml Mon Oct 29 05:59:27 2012 +0100
+++ b/flys-artifacts/doc/conf/default-themes.xml Mon Oct 29 06:54:48 2012 +0100
@@ -81,7 +81,7 @@
<theme name="HistoricalDischargeWQCurve">
<inherits>
- <inherit from="DischargeCurve" />
+ <inherit from="HiddenColorLines" />
</inherits>
<fields>
<field name="linecolor" type="Color" display="Linienfarbe"
@@ -89,6 +89,38 @@
</fields>
</theme>
+ <theme name="HistoricalDischargeWQW">
+ <inherits>
+ <inherit from="HiddenColorLines" />
+ </inherits>
+ <fields>
+ <field name="linecolor" type="Color" display="Linienfarbe"
+ default="#0000FF" />
+ <field name="showlines" type="boolean" display="Linie anzeigen"
+ default="true" hidden="true" />
+ <field name="showpoints" type="boolean" display="Datenpunkte anzeigen"
+ default="false" hidden="true" />
+ <field name="pointsize" type="int" display="Punktdicke"
+ default="5" hidden="true" />
+ </fields>
+ </theme>
+
+ <theme name="HistoricalDischargeWQQ">
+ <inherits>
+ <inherit from="HiddenColorLines" />
+ </inherits>
+ <fields>
+ <field name="linecolor" type="Color" display="Linienfarbe"
+ default="204, 204, 204" />
+ <field name="showlines" type="boolean" display="Linie anzeigen"
+ default="true" hidden="true" />
+ <field name="showpoints" type="boolean" display="Datenpunkte anzeigen"
+ default="false" hidden="true" />
+ <field name="pointsize" type="int" display="Punktdicke"
+ default="5" hidden="true" />
+ </fields>
+ </theme>
+
<!-- Discharge Longitudinal Section -->
<theme name="LongitudinalSectionW">
diff -r 8b4988815974 -r 7140bb0f92b0 flys-artifacts/doc/conf/second-themes.xml
--- a/flys-artifacts/doc/conf/second-themes.xml Mon Oct 29 05:59:27 2012 +0100
+++ b/flys-artifacts/doc/conf/second-themes.xml Mon Oct 29 06:54:48 2012 +0100
@@ -72,6 +72,37 @@
</inherits>
</theme>
+ <theme name="HistoricalDischargeWQW">
+ <inherits>
+ <inherit from="DischargeCurve" />
+ </inherits>
+ <fields>
+ <field name="linecolor" type="Color" display="Linienfarbe"
+ default="204, 204, 204" />
+ <field name="showlines" type="boolean" display="Linie anzeigen"
+ default="true" hidden="true" />
+ <field name="showpoints" type="boolean" display="Datenpunkte anzeigen"
+ default="false" hidden="true" />
+ <field name="pointsize" type="int" display="Punktdicke"
+ default="5" hidden="true" />
+ </fields>
+ </theme>
+
+ <theme name="HistoricalDischargeWQQ">
+ <inherits>
+ <inherit from="DischargeCurve" />
+ </inherits>
+ <fields>
+ <field name="linecolor" type="Color" display="Linienfarbe"
+ default="104, 104, 104" />
+ <field name="showlines" type="boolean" display="Linie anzeigen"
+ default="true" hidden="true" />
+ <field name="showpoints" type="boolean" display="Datenpunkte anzeigen"
+ default="false" hidden="true" />
+ <field name="pointsize" type="int" display="Punktdicke"
+ default="5" hidden="true" />
+ </fields>
+ </theme>
<!-- Discharge Longitudinal Section -->
<theme name="LongitudinalSectionW">
diff -r 8b4988815974 -r 7140bb0f92b0 flys-artifacts/doc/conf/themes.xml
--- a/flys-artifacts/doc/conf/themes.xml Mon Oct 29 05:59:27 2012 +0100
+++ b/flys-artifacts/doc/conf/themes.xml Mon Oct 29 06:54:48 2012 +0100
@@ -133,6 +133,8 @@
<mapping from="historical_discharge.historicalw" to="HistoricalDischargeCurveW" />
<mapping from="historical_discharge.historicalw.diff" to="HistoricalDischargeCurveWDiff" />
<mapping from="historical_discharge.wq.curve" to="HistoricalDischargeWQCurve" />
+ <mapping from="historical_discharge.wq.w" to="HistoricalDischargeWQW" />
+ <mapping from="historical_discharge.wq.q" to="HistoricalDischargeWQQ" />
<mapping from="cross_section" to="CrossSection" />
<mapping from="cross_section_water_line" to="CrossSectionWaterLine" />
<mapping from="computed_discharge_curve.q" to="ComputedDischargeCurve" />
diff -r 8b4988815974 -r 7140bb0f92b0 flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledValueMarker.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledValueMarker.java Mon Oct 29 05:59:27 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledValueMarker.java Mon Oct 29 06:54:48 2012 +0100
@@ -19,7 +19,7 @@
public StyledValueMarker(double value, Document theme) {
super(value);
- Color color = ThemeUtil.parsePointColor(theme);
+ Color color = ThemeUtil.parseLineColorField(theme);
if(color == null) {
color = Color.BLACK;
}
diff -r 8b4988815974 -r 7140bb0f92b0 flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Mon Oct 29 05:59:27 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/ThemeUtil.java Mon Oct 29 06:54:48 2012 +0100
@@ -592,7 +592,7 @@
String lineColorStr = getLineColorString(theme);
logger.debug("parseLineColorField: lineColorStr = " +
(lineColorStr == null ? "null" : lineColorStr));
- return parseRGB(lineColorStr);
+ return parseColor(lineColorStr);
}
More information about the Dive4elements-commits
mailing list