KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > svg > SVGOMTransform


1 /*
2
3    Copyright 2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.dom.svg;
19
20 import java.awt.geom.AffineTransform JavaDoc;
21
22 import org.w3c.dom.DOMException JavaDoc;
23 import org.w3c.dom.svg.SVGMatrix;
24
25 /**
26  * This class is the implementation of
27  * the SVGTransform interface.
28  *
29  * Create an identity SVGTransform
30  *
31  * @author <a HREF="mailto:nicolas.socheleau@bitflash.com">Nicolas Socheleau</a>
32  * @version $Id: SVGOMTransform.java,v 1.4 2004/08/18 07:13:18 vhardy Exp $
33  */

34 public class SVGOMTransform extends AbstractSVGTransform {
35
36
37     public SVGOMTransform(){
38         super();
39         affineTransform = new AffineTransform JavaDoc();
40     }
41
42     protected SVGMatrix createMatrix(){
43         return new AbstractSVGMatrix(){
44                 protected AffineTransform JavaDoc getAffineTransform(){
45                     return SVGOMTransform.this.affineTransform;
46                 }
47
48                 public void setA(float a) throws DOMException JavaDoc {
49                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
50                     super.setA(a);
51                 }
52                 public void setB(float b) throws DOMException JavaDoc {
53                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
54                     super.setB(b);
55                 }
56                 public void setC(float c) throws DOMException JavaDoc {
57                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
58                     super.setC(c);
59                 }
60                 public void setD(float d) throws DOMException JavaDoc {
61                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
62                     super.setD(d);
63                 }
64                 public void setE(float e) throws DOMException JavaDoc {
65                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
66                     super.setE(e);
67                 }
68                 public void setF(float f) throws DOMException JavaDoc {
69                     SVGOMTransform.this.setType(SVG_TRANSFORM_MATRIX);
70                     super.setF(f);
71                 }
72             };
73     }
74 }
75
Popular Tags