KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cypress > CssValue


1 /*
2 ** Cypress - CSS Parser
3 ** Copyright (c) 2001, 2002, 2003 by Gerald Bauer
4 **
5 ** This program is free software.
6 **
7 ** You may redistribute it and/or modify it under the terms of the GNU
8 ** Lesser General Public License as published by the Free Software Foundation.
9 ** Version 2.1 of the license should be included with this distribution in
10 ** the file LICENSE, as well as License.html. If the license is not
11 ** included with this distribution, you may find a copy at the FSF web
12 ** site at 'www.gnu.org' or 'www.fsf.org', or you may write to the
13 ** Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139 USA.
14 **
15 ** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
16 ** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
17 ** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
18 ** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
19 ** REDISTRIBUTION OF THIS SOFTWARE.
20 **
21 */

22
23 package cypress;
24
25 public class CssValue
26 {
27    public final static int CENTIMETER = 5;
28
29    public final static int DIMENSION = 20;
30    public final static int EM = 8;
31    public final static int EX = 9;
32    public final static int FUNCTION_RECT = 18;
33
34    public final static int FUNCTION_RGB = 17;
35
36    public final static int FUNCTION_USER_DEFINDED = 19;
37    public final static int IDENT = 12;
38    public final static int INCH = 7;
39    public final static int INHERIT = 16;
40
41    public final static int INTEGER = 10;
42    public final static int MILLIMETER = 6;
43
44    public final static int OPERATOR_COMMA = 14;
45    public final static int OPERATOR_SLASH = 15;
46    public final static int PERCENTAGE = 1;
47    public final static int PICA = 3;
48    public final static int PIXEL = 4;
49    public final static int POINT = 2;
50    public final static int REAL = 0;
51
52    public final static int STRING = 11;
53    public final static int URI = 13;
54    private CssValue _next;
55    private CssValue _prev;
56
57    private int _type;
58
59    public CssValue( int type, CssValue prev )
60    {
61       _type = type;
62       _prev = prev;
63
64       if( _prev != null )
65          _prev.setNext( this );
66    }
67
68    public void setNext( CssValue next )
69    {
70       _next = next;
71    }
72
73    public CssValue getNext()
74    {
75       return _next;
76    }
77
78    public CssValue getPrev()
79    {
80       return _prev;
81    }
82
83    public int getType()
84    {
85       return _type;
86    }
87 }
88
Popular Tags