/**
* Parse a String value as an SVGAngle.
*/
protected void parse(String s) {
try {
AngleParser angleParser = new AngleParser();
angleParser.setAngleHandler(new DefaultAngleHandler() {
public void angleValue(float v) throws ParseException {
value = v;
}
public void deg() throws ParseException {
unitType = SVG_ANGLETYPE_DEG;
}
public void rad() throws ParseException {
unitType = SVG_ANGLETYPE_RAD;
}
public void grad() throws ParseException {
unitType = SVG_ANGLETYPE_GRAD;
}
});
unitType = SVG_ANGLETYPE_UNSPECIFIED;
angleParser.parse(s);
} catch (ParseException e) {
unitType = SVG_ANGLETYPE_UNKNOWN;
value = 0;
}
}