1 42 43 package org.jfree.xml.parser.coretypes; 44 45 46 import java.awt.geom.Point2D ; 47 48 import org.jfree.xml.parser.AbstractXmlReadHandler; 49 import org.xml.sax.Attributes ; 50 import org.xml.sax.SAXException ; 51 52 55 public class Point2DReadHandler extends AbstractXmlReadHandler { 56 57 58 private Point2D point; 59 60 63 public Point2DReadHandler() { 64 super(); 65 } 66 67 74 protected void startParsing(final Attributes attrs) throws SAXException { 75 final String x = attrs.getValue("x"); 76 final String y = attrs.getValue("y"); 77 this.point = new Point2D.Double (Double.parseDouble(x), 78 Double.parseDouble(y)); 79 } 80 81 86 public Point2D getPoint2D() { 87 return this.point; 88 } 89 90 95 public Object getObject() { 96 return this.point; 97 } 98 99 } 100 | Popular Tags |