KickJava   Java API By Example, From Geeks To Geeks.

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


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 interface represents a property value.
24  *
25  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
26  * @version $Id: Value.java,v 1.3 2004/08/18 07:12:53 vhardy Exp $
27  */

28 public interface Value {
29     
30     /**
31      * A string representation of the current value.
32      */

33     String JavaDoc getCssText();
34
35     /**
36      * A code defining the type of the value.
37      */

38     short getCssValueType();
39
40     /**
41      * The type of the value.
42      */

43     short getPrimitiveType();
44
45     /**
46      * This method is used to get the float value.
47      * @exception DOMException
48      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a float
49      * value.
50      */

51     float getFloatValue() throws DOMException JavaDoc;
52
53     /**
54      * This method is used to get the string value.
55      * @exception DOMException
56      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a string
57      * value.
58      */

59     String JavaDoc getStringValue() throws DOMException JavaDoc;
60
61     /**
62      * The red value of the RGB color.
63      * @exception DOMException
64      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB
65      * color value.
66      */

67     Value getRed() throws DOMException JavaDoc;
68
69     /**
70      * The green value of the RGB color.
71      * @exception DOMException
72      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB
73      * color value.
74      */

75     Value getGreen() throws DOMException JavaDoc;
76
77     /**
78      * The blue value of the RGB color.
79      * @exception DOMException
80      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB
81      * color value.
82      */

83     Value getBlue() throws DOMException JavaDoc;
84
85     /**
86      * The number of <code>CSSValues</code> in the list. The range of valid
87      * values of the indices is <code>0</code> to <code>length-1</code>
88      * inclusive.
89      * @exception DOMException
90      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a list
91      * value.
92      */

93     int getLength() throws DOMException JavaDoc;
94
95     /**
96      * Used to retrieve a rule by ordinal index.
97      * @return The style rule at the <code>index</code> position in the
98      * list, or <code>null</code> if that is not a valid index.
99      * @exception DOMException
100      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a list
101      * value.
102      */

103     Value item(int index) throws DOMException JavaDoc;
104
105     /**
106      * The top value of the rect.
107      * @exception DOMException
108      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Rect
109      * value.
110      */

111     Value getTop() throws DOMException JavaDoc;
112
113     /**
114      * The right value of the rect.
115      * @exception DOMException
116      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Rect
117      * value.
118      */

119     Value getRight() throws DOMException JavaDoc;
120
121     /**
122      * The bottom value of the rect.
123      * @exception DOMException
124      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Rect
125      * value.
126      */

127     Value getBottom() throws DOMException JavaDoc;
128
129     /**
130      * The left value of the rect.
131      * @exception DOMException
132      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Rect
133      * value.
134      */

135     Value getLeft() throws DOMException JavaDoc;
136
137     /**
138      * The identifier value of the counter.
139      * @exception DOMException
140      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Counter
141      * value.
142      */

143     String JavaDoc getIdentifier() throws DOMException JavaDoc;
144
145     /**
146      * The listStyle value of the counter.
147      * @exception DOMException
148      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Counter
149      * value.
150      */

151     String JavaDoc getListStyle() throws DOMException JavaDoc;
152
153     /**
154      * The separator value of the counter.
155      * @exception DOMException
156      * INVALID_ACCESS_ERR: Raised if the value doesn't contain a Counter
157      * value.
158      */

159     String JavaDoc getSeparator() throws DOMException JavaDoc;
160 }
161
Popular Tags