KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2001,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 org.w3c.dom.DOMException JavaDoc;
21 import org.w3c.dom.svg.SVGRect;
22
23 public class SVGOMRect implements SVGRect{
24     float x;
25     float y;
26     float w;
27     float h;
28     public SVGOMRect() { x = y = w = h = 0; }
29     public SVGOMRect(float x, float y, float w, float h) {
30         this.x = x;
31         this.y = y;
32         this.w = w;
33         this.h = h;
34     }
35     
36     public float getX( ) { return x; }
37     public void setX( float x ) throws DOMException JavaDoc { this.x = x; }
38     public float getY( ) { return y; }
39     public void setY( float y ) throws DOMException JavaDoc { this.y = y; }
40     public float getWidth( ) { return w; }
41     public void setWidth( float width ) throws DOMException JavaDoc { this.w = width; }
42     public float getHeight( ) { return h; }
43     public void setHeight( float height ) throws DOMException JavaDoc { this.h = height; }
44 }
45
Popular Tags