KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > css > engine > value > ComputedValue


1 /*
2
3    Copyright 2002 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.css.engine.value;
19
20 import org.w3c.dom.DOMException JavaDoc;
21
22 /**
23  * This class represents a computed property value.
24  *
25  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
26  * @version $Id: ComputedValue.java,v 1.3 2004/08/18 07:12:53 vhardy Exp $
27  */

28 public class ComputedValue implements Value {
29
30     /**
31      * The cascaded value.
32      */

33     protected Value cascadedValue;
34
35     /**
36      * The computed value.
37      */

38     protected Value computedValue;
39     
40     /**
41      * Creates a new ComputedValue object.
42      * @param cv The cascaded value.
43      */

44     public ComputedValue(Value cv) {
45         cascadedValue = cv;
46     }
47
48     /**
49      * Returns the computed value.
50      */

51     public Value getComputedValue() {
52         return computedValue;
53     }
54
55     /**
56      * Returns the cascaded value.
57      */

58     public Value getCascadedValue() {
59         return cascadedValue;
60     }
61
62     /**
63      * Sets the computed value.
64      */

65     public void setComputedValue(Value v) {
66         computedValue = v;
67     }
68
69     /**
70      * Implements {@link Value#getCssText()}.
71      */

72     public String JavaDoc getCssText() {
73         return computedValue.getCssText();
74     }
75
76     /**
77      * Implements {@link Value#getCssValueType()}.
78      */

79     public short getCssValueType() {
80         return computedValue.getCssValueType();
81     }
82
83     /**
84      * Implements {@link Value#getPrimitiveType()}.
85      */

86     public short getPrimitiveType() {
87         return computedValue.getPrimitiveType();
88     }
89
90     /**
91      * Implements {@link Value#getFloatValue()}.
92      */

93     public float getFloatValue() throws DOMException JavaDoc {
94         return computedValue.getFloatValue();
95     }
96
97     /**
98      * Implements {@link Value#getStringValue()}.
99      */

100     public String JavaDoc getStringValue() throws DOMException JavaDoc {
101         return computedValue.getStringValue();
102     }
103
104     /**
105      * Implements {@link Value#getRed()}.
106      */

107     public Value getRed() throws DOMException JavaDoc {
108         return computedValue.getRed();
109     }
110
111     /**
112      * Implements {@link Value#getGreen()}.
113      */

114     public Value getGreen() throws DOMException JavaDoc {
115         return computedValue.getGreen();
116     }
117
118     /**
119      * Implements {@link Value#getBlue()}.
120      */

121     public Value getBlue() throws DOMException JavaDoc {
122         return computedValue.getBlue();
123     }
124
125     /**
126      * Implements {@link Value#getLength()}.
127      */

128     public int getLength() throws DOMException JavaDoc {
129         return computedValue.getLength();
130     }
131
132     /**
133      * Implements {@link Value#item(int)}.
134      */

135     public Value item(int index) throws DOMException JavaDoc {
136         return computedValue.item(index);
137     }
138
139     /**
140      * Implements {@link Value#getTop()}.
141      */

142     public Value getTop() throws DOMException JavaDoc {
143         return computedValue.getTop();
144     }
145
146     /**
147      * Implements {@link Value#getRight()}.
148      */

149     public Value getRight() throws DOMException JavaDoc {
150         return computedValue.getRight();
151     }
152
153     /**
154      * Implements {@link Value#getBottom()}.
155      */

156     public Value getBottom() throws DOMException JavaDoc {
157         return computedValue.getBottom();
158     }
159
160     /**
161      * Implements {@link Value#getLeft()}.
162      */

163     public Value getLeft() throws DOMException JavaDoc {
164         return computedValue.getLeft();
165     }
166
167     /**
168      * Implements {@link Value#getIdentifier()}.
169      */

170     public String JavaDoc getIdentifier() throws DOMException JavaDoc {
171         return computedValue.getIdentifier();
172     }
173
174     /**
175      * Implements {@link Value#getListStyle()}.
176      */

177     public String JavaDoc getListStyle() throws DOMException JavaDoc {
178         return computedValue.getListStyle();
179     }
180
181     /**
182      * Implements {@link Value#getSeparator()}.
183      */

184     public String JavaDoc getSeparator() throws DOMException JavaDoc {
185         return computedValue.getSeparator();
186     }
187 }
188
Popular Tags