Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/StyledAreaSeriesCollection.java @ 2032:5746c74c69cf
Added a transparency setting to area theme style.
flys-artifacts/trunk@3497 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 20 Dec 2011 15:06:41 +0000 |
parents | 3c3693e9c538 |
children | ca8997aa683e |
comparison
equal
deleted
inserted
replaced
2031:8e7e56db96a5 | 2032:5746c74c69cf |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | 2 |
3 import java.awt.Color; | |
3 import java.awt.Paint; | 4 import java.awt.Paint; |
4 | 5 |
5 import org.apache.log4j.Logger; | 6 import org.apache.log4j.Logger; |
6 | 7 |
7 import org.w3c.dom.Document; | 8 import org.w3c.dom.Document; |
71 | 72 |
72 /** | 73 /** |
73 * Blindly (for now) apply the postiviepaint of renderer. | 74 * Blindly (for now) apply the postiviepaint of renderer. |
74 */ | 75 */ |
75 protected void applyFillColor(StableXYDifferenceRenderer renderer) { | 76 protected void applyFillColor(StableXYDifferenceRenderer renderer) { |
76 Paint paint = ThemeUtil.parseFillColorField(theme); | 77 // Get color. |
77 if (paint != null) | 78 Color paint = ThemeUtil.parseFillColorField(theme); |
79 // Get half-transparency flag. | |
80 if (ThemeUtil.parseTransparency(theme)) { | |
81 paint = new Color(paint.getRed(), paint.getGreen(), paint.getBlue(), | |
82 128); | |
83 } | |
84 if (paint != null && this.getMode() == FILL_MODE.ABOVE) { | |
78 renderer.setPositivePaint(paint); | 85 renderer.setPositivePaint(paint); |
79 // TODO set negativepaint? Dependend on the over/under/between settings | 86 renderer.setNegativePaint(new Color(0,0,0,0)); |
87 } | |
88 else if (paint != null && this.getMode() == FILL_MODE.UNDER) { | |
89 renderer.setNegativePaint(paint); | |
90 renderer.setPositivePaint(new Color(0,0,0,0)); | |
91 } | |
92 else { | |
93 renderer.setPositivePaint(paint); | |
94 renderer.setNegativePaint(paint); | |
95 } | |
80 } | 96 } |
81 | 97 |
82 /** | 98 /** |
83 * Blindly (for now) apply the postiviepaint of renderer. | 99 * Blindly (for now) apply the postiviepaint of renderer. |
84 */ | 100 */ |