I am using GWT Generators and want to modify a css file with a Generator. The css file contains constants like the following (test/client/App.css):
@def LINE_WIDTH 100px;
I defined an interface (test/client/DeviceDensity.java):
public interface DeviceDensity extends CssResource {
String APP_CSS = "test/client/App.css";
}
Using a gwt generator I want to modify the constant LINE_WIDTH to be either 75px, 100px, 150px or 200px; depending on the value of a property phone.density which is defined in a module file as:
<define-property name="phone.density" values="lpdi,mdpi,hpdi,xhdpi" />
<property-provider name="phone.density"><![CDATA[
{
var ratio = window.devicePixelRatio;
if (ratio == 0.75) { return "lpdi"; }
else if (ratio == 1) {return "mdpi"; }
else if (ratio == 1.5) {return "hpdi"; }
return "xhdpi";
}
]]></property-provider>
How can I get the value of phone.density in a Generator and how can I modify the css constant LINE_WIDTH?