hillion 02/04/24 06:01:27
Modified: resources/org/apache/batik/dom/svg/resources
Messages.properties
sources/org/apache/batik/dom/svg AbstractSVGMatrix.java
SVGExternalResourcesRequiredSupport.java
SVGLocatableSupport.java SVGOMAltGlyphElement.java
SVGOMAnimateTransformElement.java
SVGOMColorProfileElement.java SVGOMDocument.java
SVGOMGlyphRefElement.java SVGOMMaskElement.java
SVGOMSVGElement.java SVGOMStyleElement.java
SVGOMTextElement.java SVGOMViewElement.java
SVGZoomAndPanSupport.java
sources/org/apache/batik/util SVGConstants.java
Log:
Implemented some new SVG DOM methods.
Revision Changes Path
1.5 +2 -0
xml-batik/resources/org/apache/batik/dom/svg/resources/Messages.properties
Index: Messages.properties
===================================================================
RCS file:
/home/cvs/xml-batik/resources/org/apache/batik/dom/svg/resources/Messages.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Messages.properties 23 Apr 2002 17:10:13 -0000 1.4
+++ Messages.properties 24 Apr 2002 13:01:26 -0000 1.5
@@ -29,3 +29,5 @@
noninvertiblematrix = \
The matrix is not invertible.
+readonly.rect = \
+This SVGRect is readonly.
1.2 +9 -8
xml-batik/sources/org/apache/batik/dom/svg/AbstractSVGMatrix.java
Index: AbstractSVGMatrix.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/AbstractSVGMatrix.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractSVGMatrix.java 15 Apr 2002 10:16:12 -0000 1.1
+++ AbstractSVGMatrix.java 24 Apr 2002 13:01:26 -0000 1.2
@@ -21,7 +21,7 @@
* interface.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: AbstractSVGMatrix.java,v 1.1 2002/04/15 10:16:12 hillion Exp $
+ * @version $Id: AbstractSVGMatrix.java,v 1.2 2002/04/24 13:01:26 hillion Exp $
*/
public abstract class AbstractSVGMatrix implements SVGMatrix {
@@ -184,12 +184,8 @@
try {
return new SVGOMMatrix(getAffineTransform().createInverse());
} catch (NoninvertibleTransformException e) {
- class Ex extends SVGException {
- Ex(String str) {
- super(SVGException.SVG_MATRIX_NOT_INVERTABLE, str);
- }
- }
- throw new Ex(e.getMessage());
+ throw new SVGOMException(SVGException.SVG_MATRIX_NOT_INVERTABLE,
+ e.getMessage());
}
}
@@ -233,7 +229,12 @@
* Implements {@link SVGMatrix#rotateFromVector(float,float)}.
*/
public SVGMatrix rotateFromVector(float x, float y) throws SVGException {
- throw new InternalError("!!! rotateFromVector");
+ if (x == 0 || y == 0) {
+ throw new SVGOMException(SVGException.SVG_INVALID_VALUE_ERR, "");
+ }
+ AffineTransform tr = (AffineTransform)getAffineTransform().clone();
+ tr.rotate(Math.atan2(y, x));
+ return new SVGOMMatrix(tr);
}
/**
1.4 +7 -4
xml-batik/sources/org/apache/batik/dom/svg/SVGExternalResourcesRequiredSupport.java
Index: SVGExternalResourcesRequiredSupport.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGExternalResourcesRequiredSupport.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGExternalResourcesRequiredSupport.java 28 Sep 2001 15:40:08 -0000 1.3
+++ SVGExternalResourcesRequiredSupport.java 24 Apr 2002 13:01:26 -0000 1.4
@@ -16,22 +16,25 @@
* Provides support for the SVGExternalResourcesRequired interface.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGExternalResourcesRequiredSupport.java,v 1.3 2001/09/28 15:40:08
hillion Exp $
+ * @version $Id: SVGExternalResourcesRequiredSupport.java,v 1.4 2002/04/24 13:01:26
hillion Exp $
*/
public class SVGExternalResourcesRequiredSupport implements SVGConstants {
- private final static String ATTR_NAME =
SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE;
+ private final static String ATTR_NAME =
+ SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE;
/**
* To implement {@link
* org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()}.
*/
- public static SVGAnimatedBoolean getExternalResourcesRequired(AbstractElement
elt) {
+ public static SVGAnimatedBoolean
+ getExternalResourcesRequired(AbstractElement elt) {
LiveAttributeValue lav;
lav = elt.getLiveAttributeValue(null, ATTR_NAME);
if (lav == null) {
lav = new SVGOMAnimatedBoolean(elt, null, ATTR_NAME,
- elt.getAttributeNodeNS(null, ATTR_NAME),
+ elt.getAttributeNodeNS(null,
+ ATTR_NAME),
"false");
elt.putLiveAttributeValue(null, ATTR_NAME, lav);
}
1.5 +13 -9
xml-batik/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
Index: SVGLocatableSupport.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGLocatableSupport.java 23 Apr 2002 17:10:14 -0000 1.4
+++ SVGLocatableSupport.java 24 Apr 2002 13:01:26 -0000 1.5
@@ -26,7 +26,7 @@
* This class provides support for the SVGLocatable interface.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGLocatableSupport.java,v 1.4 2002/04/23 17:10:14 tkormann Exp $
+ * @version $Id: SVGLocatableSupport.java,v 1.5 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGLocatableSupport {
/**
@@ -69,29 +69,33 @@
return (float)svgelt.getSVGContext().getBBox().getX();
}
public void setX(float x) throws DOMException {
- throw new DOMException
- (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
+ throw svgelt.createDOMException
+ (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+ "readonly.rect", null);
}
public float getY() {
return (float)svgelt.getSVGContext().getBBox().getY();
}
public void setY(float y) throws DOMException {
- throw new DOMException
- (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
+ throw svgelt.createDOMException
+ (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+ "readonly.rect", null);
}
public float getWidth() {
return (float)svgelt.getSVGContext().getBBox().getWidth();
}
public void setWidth(float width) throws DOMException {
- throw new DOMException
- (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
+ throw svgelt.createDOMException
+ (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+ "readonly.rect", null);
}
public float getHeight() {
return (float)svgelt.getSVGContext().getBBox().getHeight();
}
public void setHeight(float height) throws DOMException {
- throw new DOMException
- (DOMException.NO_MODIFICATION_ALLOWED_ERR, "");
+ throw svgelt.createDOMException
+ (DOMException.NO_MODIFICATION_ALLOWED_ERR,
+ "readonly.rect", null);
}
};
}
1.2 +5 -5
xml-batik/sources/org/apache/batik/dom/svg/SVGOMAltGlyphElement.java
Index: SVGOMAltGlyphElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMAltGlyphElement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SVGOMAltGlyphElement.java 10 Sep 2001 12:26:07 -0000 1.1
+++ SVGOMAltGlyphElement.java 24 Apr 2002 13:01:26 -0000 1.2
@@ -20,7 +20,7 @@
* This class implements {@link SVGAltGlyphElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMAltGlyphElement.java,v 1.1 2001/09/10 12:26:07 hillion Exp $
+ * @version $Id: SVGOMAltGlyphElement.java,v 1.2 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMAltGlyphElement
extends SVGURIReferenceTextPositioningElement
@@ -77,28 +77,28 @@
* <b>DOM</b>: Implements {@link SVGAltGlyphElement#getGlyphRef()}.
*/
public String getGlyphRef() {
- throw new RuntimeException("!!! TODO: getGlyphRef()");
+ return getAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGAltGlyphElement#setGlyphRef(String)}.
*/
public void setGlyphRef(String glyphRef) throws DOMException {
- throw new RuntimeException("!!! TODO: setGlyphRef()");
+ setAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE, glyphRef);
}
/**
* <b>DOM</b>: Implements {@link SVGAltGlyphElement#getFormat()}.
*/
public String getFormat() {
- throw new RuntimeException("!!! TODO: getFormat()");
+ return getAttributeNS(null, SVG_FORMAT_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGAltGlyphElement#setFormat(String)}.
*/
public void setFormat(String format) throws DOMException {
- throw new RuntimeException("!!! TODO: setFormat()");
+ setAttributeNS(null, SVG_FORMAT_ATTRIBUTE, format);
}
/**
1.2 +3 -2
xml-batik/sources/org/apache/batik/dom/svg/SVGOMAnimateTransformElement.java
Index: SVGOMAnimateTransformElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMAnimateTransformElement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SVGOMAnimateTransformElement.java 10 Sep 2001 12:26:07 -0000 1.1
+++ SVGOMAnimateTransformElement.java 24 Apr 2002 13:01:26 -0000 1.2
@@ -17,7 +17,7 @@
* This class implements {@link SVGAnimateTransformElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMAnimateTransformElement.java,v 1.1 2001/09/10 12:26:07
hillion Exp $
+ * @version $Id: SVGOMAnimateTransformElement.java,v 1.2 2002/04/24 13:01:26
hillion Exp $
*/
public class SVGOMAnimateTransformElement
extends SVGOMAnimationElement
@@ -46,7 +46,8 @@
* @param prefix The namespace prefix.
* @param owner The owner document.
*/
- public SVGOMAnimateTransformElement(String prefix, AbstractDocument owner) {
+ public SVGOMAnimateTransformElement(String prefix,
+ AbstractDocument owner) {
super(prefix, owner);
}
1.3 +65 -9
xml-batik/sources/org/apache/batik/dom/svg/SVGOMColorProfileElement.java
Index: SVGOMColorProfileElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMColorProfileElement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGOMColorProfileElement.java 12 Sep 2001 16:57:07 -0000 1.2
+++ SVGOMColorProfileElement.java 24 Apr 2002 13:01:26 -0000 1.3
@@ -12,6 +12,7 @@
import org.apache.batik.dom.util.XLinkSupport;
import org.apache.batik.dom.util.XMLSupport;
+import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
import org.w3c.dom.svg.SVGColorProfileElement;
@@ -20,7 +21,7 @@
* This class implements {@link org.w3c.dom.svg.SVGColorProfileElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMColorProfileElement.java,v 1.2 2001/09/12 16:57:07 hillion
Exp $
+ * @version $Id: SVGOMColorProfileElement.java,v 1.3 2002/04/24 13:01:26 hillion
Exp $
*/
public class SVGOMColorProfileElement
extends SVGOMURIReferenceElement
@@ -81,42 +82,97 @@
* <b>DOM</b>: Implements {@link SVGColorProfileElement#getLocal()}.
*/
public String getLocal() {
- throw new RuntimeException("!!! TODO: getLocal()");
+ return getAttributeNS(null, SVG_LOCAL_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGColorProfileElement#setLocal(String)}.
*/
public void setLocal(String local) throws DOMException {
- throw new RuntimeException("!!! TODO: setLocal()");
+ setAttributeNS(null, SVG_LOCAL_ATTRIBUTE, local);
}
/**
* <b>DOM</b>: Implements {@link SVGColorProfileElement#getName()}.
*/
public String getName() {
- throw new RuntimeException("!!! TODO: getName()");
+ return getAttributeNS(null, SVG_NAME_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGColorProfileElement#setName(String)}.
*/
public void setName(String name) throws DOMException {
- throw new RuntimeException("!!! TODO: setName()");
+ setAttributeNS(null, SVG_NAME_ATTRIBUTE, name);
}
/**
- * <b>DOM</b>: Implements {@link SVGColorProfileElement#getRenderingIntent()}.
+ * <b>DOM</b>: Implements {@link
+ * SVGColorProfileElement#getRenderingIntent()}.
*/
public short getRenderingIntent() {
- throw new RuntimeException("!!! TODO: getRenderingIntent()");
+ Attr attr = getAttributeNodeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE);
+ if (attr == null) {
+ return RENDERING_INTENT_AUTO;
+ }
+ String val = attr.getValue();
+ switch (val.length()) {
+ case 4:
+ if (val.equals(SVG_AUTO_VALUE)) {
+ return RENDERING_INTENT_AUTO;
+ }
+ break;
+
+ case 10:
+ if (val.equals(SVG_PERCEPTUAL_VALUE)) {
+ return RENDERING_INTENT_PERCEPTUAL;
+ }
+ if (val.equals(SVG_SATURATE_VALUE)) {
+ return RENDERING_INTENT_SATURATION;
+ }
+ break;
+
+ case 21:
+ if (val.equals(SVG_ABSOLUTE_COLORIMETRIC_VALUE)) {
+ return RENDERING_INTENT_ABSOLUTE_COLORIMETRIC;
+ }
+ if (val.equals(SVG_RELATIVE_COLORIMETRIC_VALUE)) {
+ return RENDERING_INTENT_RELATIVE_COLORIMETRIC;
+ }
+ }
+ return RENDERING_INTENT_UNKNOWN;
}
/**
- * <b>DOM</b>: Implements {@link
SVGColorProfileElement#setRenderingIntent(short)}.
+ * <b>DOM</b>: Implements {@link
+ * SVGColorProfileElement#setRenderingIntent(short)}.
*/
public void setRenderingIntent(short renderingIntent) throws DOMException {
- throw new RuntimeException("!!! TODO: setRenderingIntent()");
+ switch (renderingIntent) {
+ case RENDERING_INTENT_AUTO:
+ setAttributeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE,
+ SVG_AUTO_VALUE);
+ break;
+
+ case RENDERING_INTENT_PERCEPTUAL:
+ setAttributeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE,
+ SVG_PERCEPTUAL_VALUE);
+ break;
+
+ case RENDERING_INTENT_RELATIVE_COLORIMETRIC:
+ setAttributeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE,
+ SVG_RELATIVE_COLORIMETRIC_VALUE);
+ break;
+
+ case RENDERING_INTENT_SATURATION:
+ setAttributeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE,
+ SVG_SATURATE_VALUE);
+ break;
+
+ case RENDERING_INTENT_ABSOLUTE_COLORIMETRIC:
+ setAttributeNS(null, SVG_RENDERING_INTENT_ATTRIBUTE,
+ SVG_ABSOLUTE_COLORIMETRIC_VALUE);
+ }
}
/**
1.47 +3 -3 xml-batik/sources/org/apache/batik/dom/svg/SVGOMDocument.java
Index: SVGOMDocument.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMDocument.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- SVGOMDocument.java 19 Mar 2002 18:40:44 -0000 1.46
+++ SVGOMDocument.java 24 Apr 2002 13:01:26 -0000 1.47
@@ -72,7 +72,7 @@
* This class implements {@link SVGDocument}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMDocument.java,v 1.46 2002/03/19 18:40:44 tkormann Exp $
+ * @version $Id: SVGOMDocument.java,v 1.47 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMDocument
extends AbstractDocument
@@ -396,7 +396,7 @@
* org.w3c.dom.stylesheets.DocumentStyle#getStyleSheets()}.
*/
public StyleSheetList getStyleSheets() {
- throw new InternalError("Not implemented");
+ throw new RuntimeException(" !!! Not implemented");
}
// DocumentView ///////////////////////////////////////////////////////////
@@ -432,7 +432,7 @@
*/
public CSSStyleDeclaration getOverrideStyle(Element elt,
String pseudoElt) {
- throw new InternalError("Not implemented");
+ throw new RuntimeException(" !!! Not implemented");
}
/**
1.3 +13 -13
xml-batik/sources/org/apache/batik/dom/svg/SVGOMGlyphRefElement.java
Index: SVGOMGlyphRefElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMGlyphRefElement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGOMGlyphRefElement.java 12 Sep 2001 16:57:07 -0000 1.2
+++ SVGOMGlyphRefElement.java 24 Apr 2002 13:01:26 -0000 1.3
@@ -21,7 +21,7 @@
* This class implements {@link SVGGlyphRefElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMGlyphRefElement.java,v 1.2 2001/09/12 16:57:07 hillion Exp $
+ * @version $Id: SVGOMGlyphRefElement.java,v 1.3 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMGlyphRefElement
extends SVGStylableElement
@@ -84,84 +84,84 @@
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getGlyphRef()}.
*/
public String getGlyphRef() {
- throw new RuntimeException("!!! TODO: getGlyphRef()");
+ return getAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setGlyphRef(String)}.
*/
public void setGlyphRef(String glyphRef) throws DOMException {
- throw new RuntimeException("!!! TODO: setGlyphRef()");
+ setAttributeNS(null, SVG_GLYPH_REF_ATTRIBUTE, glyphRef);
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getFormat()}.
*/
public String getFormat() {
- throw new RuntimeException("!!! TODO: getFormat()");
+ return getAttributeNS(null, SVG_FORMAT_ATTRIBUTE);
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setFormat(String)}.
*/
public void setFormat(String format) throws DOMException {
- throw new RuntimeException("!!! TODO: setFormat()");
+ setAttributeNS(null, SVG_FORMAT_ATTRIBUTE, format);
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getX()}.
*/
public float getX() {
- throw new RuntimeException("!!! TODO: getX()");
+ return Float.parseFloat(getAttributeNS(null, SVG_X_ATTRIBUTE));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setX(float)}.
*/
public void setX(float x) throws DOMException {
- throw new RuntimeException("!!! TODO: setX()");
+ setAttributeNS(null, SVG_X_ATTRIBUTE, String.valueOf(x));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getY()}.
*/
public float getY() {
- throw new RuntimeException("!!! TODO: getY()");
+ return Float.parseFloat(getAttributeNS(null, SVG_Y_ATTRIBUTE));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setY(float)}.
*/
public void setY(float y) throws DOMException {
- throw new RuntimeException("!!! TODO: setY()");
+ setAttributeNS(null, SVG_Y_ATTRIBUTE, String.valueOf(y));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getDx()}.
*/
public float getDx() {
- throw new RuntimeException("!!! TODO: getDx()");
+ return Float.parseFloat(getAttributeNS(null, SVG_DX_ATTRIBUTE));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setDx(float)}.
*/
public void setDx(float dx) throws DOMException {
- throw new RuntimeException("!!! TODO: setDx()");
+ setAttributeNS(null, SVG_DX_ATTRIBUTE, String.valueOf(dx));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#getDy()}.
*/
public float getDy() {
- throw new RuntimeException("!!! TODO: getDy()");
+ return Float.parseFloat(getAttributeNS(null, SVG_DY_ATTRIBUTE));
}
/**
* <b>DOM</b>: Implements {@link SVGGlyphRefElement#setDy(float)}.
*/
public void setDy(float dy) throws DOMException {
- throw new RuntimeException("!!! TODO: setDy()");
+ setAttributeNS(null, SVG_DY_ATTRIBUTE, String.valueOf(dy));
}
/**
1.9 +13 -5 xml-batik/sources/org/apache/batik/dom/svg/SVGOMMaskElement.java
Index: SVGOMMaskElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMMaskElement.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SVGOMMaskElement.java 15 Apr 2002 10:16:13 -0000 1.8
+++ SVGOMMaskElement.java 24 Apr 2002 13:01:26 -0000 1.9
@@ -19,7 +19,7 @@
* This class implements {@link org.w3c.dom.svg.SVGMaskElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMMaskElement.java,v 1.8 2002/04/15 10:16:13 hillion Exp $
+ * @version $Id: SVGOMMaskElement.java,v 1.9 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMMaskElement
extends SVGGraphicsElement
@@ -78,28 +78,36 @@
* <b>DOM</b>: Implements {@link SVGMaskElement#getX()}.
*/
public SVGAnimatedLength getX() {
- throw new RuntimeException(" !!! TODO: getX()");
+ return getAnimatedLengthAttribute
+ (null, SVG_X_ATTRIBUTE, SVG_MASK_X_DEFAULT_VALUE,
+ SVGOMAnimatedLength.HORIZONTAL_LENGTH);
}
/**
* <b>DOM</b>: Implements {@link SVGMaskElement#getY()}.
*/
public SVGAnimatedLength getY() {
- throw new RuntimeException(" !!! TODO: getY()");
+ return getAnimatedLengthAttribute
+ (null, SVG_Y_ATTRIBUTE, SVG_MASK_Y_DEFAULT_VALUE,
+ SVGOMAnimatedLength.VERTICAL_LENGTH);
}
/**
* <b>DOM</b>: Implements {@link SVGMaskElement#getWidth()}.
*/
public SVGAnimatedLength getWidth() {
- throw new RuntimeException(" !!! TODO: getWidth()");
+ return getAnimatedLengthAttribute
+ (null, SVG_WIDTH_ATTRIBUTE, SVG_MASK_WIDTH_DEFAULT_VALUE,
+ SVGOMAnimatedLength.HORIZONTAL_LENGTH);
}
/**
* <b>DOM</b>: Implements {@link SVGMaskElement#getHeight()}.
*/
public SVGAnimatedLength getHeight() {
- throw new RuntimeException(" !!! TODO: getHeight()");
+ return getAnimatedLengthAttribute
+ (null, SVG_HEIGHT_ATTRIBUTE, SVG_MASK_HEIGHT_DEFAULT_VALUE,
+ SVGOMAnimatedLength.VERTICAL_LENGTH);
}
/**
1.17 +55 -20 xml-batik/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java
Index: SVGOMSVGElement.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMSVGElement.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- SVGOMSVGElement.java 15 Apr 2002 10:16:13 -0000 1.16
+++ SVGOMSVGElement.java 24 Apr 2002 13:01:26 -0000 1.17
@@ -45,7 +45,7 @@
* This class implements {@link org.w3c.dom.svg.SVGSVGElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMSVGElement.java,v 1.16 2002/04/15 10:16:13 hillion Exp $
+ * @version $Id: SVGOMSVGElement.java,v 1.17 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMSVGElement
extends SVGStylableElement
@@ -304,24 +304,53 @@
// SVGLocatable ///////////////////////////////////////////////////////
- public SVGElement getNearestViewportElement( ) {
- throw new Error();
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getNearestViewportElement()}.
+ */
+ public SVGElement getNearestViewportElement() {
+ return SVGLocatableSupport.getNearestViewportElement(this);
}
- public SVGElement getFarthestViewportElement( ) {
- throw new Error();
+
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getFarthestViewportElement()}.
+ */
+ public SVGElement getFarthestViewportElement() {
+ return SVGLocatableSupport.getFarthestViewportElement(this);
}
- public SVGRect getBBox ( ) {
- throw new Error();
+
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getBBox()}.
+ */
+ public SVGRect getBBox() {
+ return SVGLocatableSupport.getBBox(this);
}
- public SVGMatrix getCTM ( ) {
- throw new Error();
+
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getCTM()}.
+ */
+ public SVGMatrix getCTM() {
+ return SVGLocatableSupport.getCTM(this);
}
- public SVGMatrix getScreenCTM ( ) {
- throw new Error();
+
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getScreenCTM()}.
+ */
+ public SVGMatrix getScreenCTM() {
+ return SVGLocatableSupport.getScreenCTM(this);
}
- public SVGMatrix getTransformToElement (SVGElement element)
- throws SVGException {
- throw new Error();
+
+ /**
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getTransformToElement(SVGElement)}.
+ */
+ public SVGMatrix getTransformToElement(SVGElement element)
+ throws SVGException {
+ return SVGLocatableSupport.getTransformToElement(this, element);
}
// ViewCSS ////////////////////////////////////////////////////////////////
@@ -411,14 +440,16 @@
// SVGZoomAndPan support ///////////////////////////////////////////////
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
*/
public short getZoomAndPan() {
return SVGZoomAndPanSupport.getZoomAndPan(this);
}
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
*/
public void setZoomAndPan(short val) {
SVGZoomAndPanSupport.setZoomAndPan(this, val);
@@ -456,28 +487,32 @@
// SVGTests support ///////////////////////////////////////////////////
/**
- * <b>DOM</b>: Implements {@link
org.w3c.dom.svg.SVGTests#getRequiredFeatures()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGTests#getRequiredFeatures()}.
*/
public SVGStringList getRequiredFeatures() {
return SVGTestsSupport.getRequiredFeatures(this);
}
/**
- * <b>DOM</b>: Implements {@link
org.w3c.dom.svg.SVGTests#getRequiredExtensions()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGTests#getRequiredExtensions()}.
*/
public SVGStringList getRequiredExtensions() {
return SVGTestsSupport.getRequiredExtensions(this);
}
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGTests#getSystemLanguage()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGTests#getSystemLanguage()}.
*/
public SVGStringList getSystemLanguage() {
return SVGTestsSupport.getSystemLanguage(this);
}
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGTests#hasExtension(String)}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGTests#hasExtension(String)}.
*/
public boolean hasExtension(String extension) {
return SVGTestsSupport.hasExtension(this, extension);
1.11 +2 -2
xml-batik/sources/org/apache/batik/dom/svg/SVGOMStyleElement.java
Index: SVGOMStyleElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMStyleElement.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SVGOMStyleElement.java 18 Mar 2002 10:28:26 -0000 1.10
+++ SVGOMStyleElement.java 24 Apr 2002 13:01:26 -0000 1.11
@@ -28,7 +28,7 @@
* This class implements {@link SVGStyleElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMStyleElement.java,v 1.10 2002/03/18 10:28:26 hillion Exp $
+ * @version $Id: SVGOMStyleElement.java,v 1.11 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMStyleElement
extends SVGOMElement
@@ -122,7 +122,7 @@
* org.w3c.dom.stylesheets.LinkStyle#getSheet()}.
*/
public org.w3c.dom.stylesheets.StyleSheet getSheet() {
- throw new InternalError("Not implemented.");
+ throw new RuntimeException(" !!! Not implemented.");
}
/**
1.9 +5 -3 xml-batik/sources/org/apache/batik/dom/svg/SVGOMTextElement.java
Index: SVGOMTextElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMTextElement.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SVGOMTextElement.java 15 Apr 2002 10:16:13 -0000 1.8
+++ SVGOMTextElement.java 24 Apr 2002 13:01:26 -0000 1.9
@@ -23,7 +23,7 @@
* This class implements {@link SVGTextElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMTextElement.java,v 1.8 2002/04/15 10:16:13 hillion Exp $
+ * @version $Id: SVGOMTextElement.java,v 1.9 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMTextElement
extends SVGOMTextPositioningElement
@@ -84,7 +84,8 @@
}
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGLocatable#getScreenCTM()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGLocatable#getScreenCTM()}.
*/
public SVGMatrix getScreenCTM() {
return SVGLocatableSupport.getScreenCTM(this);
@@ -102,7 +103,8 @@
// SVGTransformable support /////////////////////////////////////////////
/**
- * <b>DOM</b>: Implements {@link
org.w3c.dom.svg.SVGTransformable#getTransform()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGTransformable#getTransform()}.
*/
public SVGAnimatedTransformList getTransform() {
return SVGTransformableSupport.getTransform(this);
1.3 +5 -3 xml-batik/sources/org/apache/batik/dom/svg/SVGOMViewElement.java
Index: SVGOMViewElement.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGOMViewElement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGOMViewElement.java 12 Sep 2001 16:57:07 -0000 1.2
+++ SVGOMViewElement.java 24 Apr 2002 13:01:26 -0000 1.3
@@ -21,7 +21,7 @@
* This class implements {@link org.w3c.dom.svg.SVGViewElement}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGOMViewElement.java,v 1.2 2001/09/12 16:57:07 hillion Exp $
+ * @version $Id: SVGOMViewElement.java,v 1.3 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGOMViewElement
extends SVGOMElement
@@ -75,14 +75,16 @@
// SVGZoomAndPan support ///////////////////////////////////////////////
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
*/
public short getZoomAndPan() {
return SVGZoomAndPanSupport.getZoomAndPan(this);
}
/**
- * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
+ * <b>DOM</b>: Implements {@link
+ * org.w3c.dom.svg.SVGZoomAndPan#getZoomAndPan()}.
*/
public void setZoomAndPan(short val) {
SVGZoomAndPanSupport.setZoomAndPan(this, val);
1.3 +5 -3
xml-batik/sources/org/apache/batik/dom/svg/SVGZoomAndPanSupport.java
Index: SVGZoomAndPanSupport.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/dom/svg/SVGZoomAndPanSupport.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGZoomAndPanSupport.java 1 Apr 2001 18:05:10 -0000 1.2
+++ SVGZoomAndPanSupport.java 24 Apr 2002 13:01:26 -0000 1.3
@@ -20,7 +20,7 @@
* This class provides support for SVGZoomAndPan features.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGZoomAndPanSupport.java,v 1.2 2001/04/01 18:05:10 hillion Exp $
+ * @version $Id: SVGZoomAndPanSupport.java,v 1.3 2002/04/24 13:01:26 hillion Exp $
*/
public class SVGZoomAndPanSupport implements SVGConstants {
@@ -37,10 +37,12 @@
throws DOMException {
switch (val) {
case SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE:
- elt.setAttributeNS(null, SVG_ZOOM_AND_PAN_ATTRIBUTE, SVG_DISABLE_VALUE);
+ elt.setAttributeNS(null, SVG_ZOOM_AND_PAN_ATTRIBUTE,
+ SVG_DISABLE_VALUE);
break;
case SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY:
- elt.setAttributeNS(null, SVG_ZOOM_AND_PAN_ATTRIBUTE, SVG_MAGNIFY_VALUE);
+ elt.setAttributeNS(null, SVG_ZOOM_AND_PAN_ATTRIBUTE,
+ SVG_MAGNIFY_VALUE);
break;
default:
throw ((AbstractNode)elt).createDOMException
1.65 +4 -1 xml-batik/sources/org/apache/batik/util/SVGConstants.java
Index: SVGConstants.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/util/SVGConstants.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- SVGConstants.java 23 Apr 2002 17:10:14 -0000 1.64
+++ SVGConstants.java 24 Apr 2002 13:01:27 -0000 1.65
@@ -14,7 +14,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Thierry Kormann</a>
* @author <a href="[EMAIL PROTECTED]">Vincent Hardy</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: SVGConstants.java,v 1.64 2002/04/23 17:10:14 tkormann Exp $
+ * @version $Id: SVGConstants.java,v 1.65 2002/04/24 13:01:27 hillion Exp $
*/
public interface SVGConstants extends CSSConstants {
@@ -369,6 +369,7 @@
String SVG_FILTER_UNITS_ATTRIBUTE = "filterUnits";
String SVG_FLOOD_COLOR_ATTRIBUTE = CSS_FLOOD_COLOR_PROPERTY;
String SVG_FLOOD_OPACITY_ATTRIBUTE = CSS_FLOOD_OPACITY_PROPERTY;
+ String SVG_FORMAT_ATTRIBUTE = "format";
String SVG_FONT_FAMILY_ATTRIBUTE = CSS_FONT_FAMILY_PROPERTY;
String SVG_FONT_SIZE_ATTRIBUTE = CSS_FONT_SIZE_PROPERTY;
String SVG_FONT_STRETCH_ATTRIBUTE = CSS_FONT_STRETCH_PROPERTY;
@@ -380,6 +381,7 @@
String SVG_G1_ATTRIBUTE = "g1";
String SVG_G2_ATTRIBUTE = "g2";
String SVG_GLYPH_NAME_ATTRIBUTE = "glyph-name";
+ String SVG_GLYPH_REF_ATTRIBUTE = "glyphRef";
String SVG_GRADIENT_TRANSFORM_ATTRIBUTE = "gradientTransform";
String SVG_GRADIENT_UNITS_ATTRIBUTE = "gradientUnits";
String SVG_HANGING_ATTRIBUTE = "hanging";
@@ -408,6 +410,7 @@
String SVG_LENGTH_ADJUST_ATTRIBUTE = "lengthAdjust";
String SVG_LIGHT_COLOR_ATTRIBUTE = "lightColor";
String SVG_LIMITING_CONE_ANGLE_ATTRIBUTE = "limitingConeAngle";
+ String SVG_LOCAL_ATTRIBUTE = "local";
String SVG_MARKER_HEIGHT_ATTRIBUTE = "markerHeight";
String SVG_MARKER_UNITS_ATTRIBUTE = "markerUnits";
String SVG_MARKER_WIDTH_ATTRIBUTE = "markerWidth";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]