KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > css > sac > Condition


1 /*
2  * Copyright (c) 1999 World Wide Web Consortium,
3  * (Massachusetts Institute of Technology, Institut National de
4  * Recherche en Informatique et en Automatique, Keio University). All
5  * Rights Reserved. This program is distributed under the W3C's Software
6  * Intellectual Property License. This program is distributed in the
7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  * PURPOSE.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  *
12  * $Id: Condition.java,v 1.1.1.1 2003/12/28 21:23:44 davidsch Exp $
13  */

14 package org.w3c.css.sac;
15
16 /**
17  * @version $Revision: 1.1.1.1 $
18  * @author Philippe Le Hegaret
19  */

20 public interface Condition {
21
22     /**
23      * This condition checks exactly two conditions.
24      * example:
25      * <pre class="example">
26      * .part1:lang(fr)
27      * </pre>
28      * @see CombinatorCondition
29      */

30     public static final short SAC_AND_CONDITION = 0;
31
32     /**
33      * This condition checks one of two conditions.
34      * @see CombinatorCondition
35      */

36     public static final short SAC_OR_CONDITION = 1;
37
38     /**
39      * This condition checks that a condition can't be applied to a node.
40      * @see NegativeCondition
41      */

42     public static final short SAC_NEGATIVE_CONDITION = 2;
43
44     /**
45      * This condition checks a specified position.
46      * example:
47      * <pre class="example">
48      * :first-child
49      * </pre>
50      * @see PositionalCondition
51      */

52     public static final short SAC_POSITIONAL_CONDITION = 3;
53
54     /**
55      * This condition checks an attribute.
56      * example:
57      * <pre class="example">
58      * [simple]
59      * [restart="never"]
60      * </pre>
61      * @see AttributeCondition
62      */

63     public static final short SAC_ATTRIBUTE_CONDITION = 4;
64     /**
65      * This condition checks an id attribute.
66      * example:
67      * <pre class="example">
68      * #myId
69      * </pre>
70      * @see AttributeCondition
71      */

72     public static final short SAC_ID_CONDITION = 5;
73     /**
74      * This condition checks the language of the node.
75      * example:
76      * <pre class="example">
77      * :lang(fr)
78      * </pre>
79      * @see LangCondition
80      */

81     public static final short SAC_LANG_CONDITION = 6;
82     /**
83      * This condition checks for a value in a space-separated values in a
84      * specified attribute
85      * example:
86      * <pre class="example">
87      * [values~="10"]
88      * </pre>
89      * @see AttributeCondition
90      */

91     public static final short SAC_ONE_OF_ATTRIBUTE_CONDITION = 7;
92     /**
93      * This condition checks if the value is in a hypen-separated list of values
94      * in a specified attribute.
95      * example:
96      * <pre class="example">
97      * [languages|="fr"]
98      * </pre>
99      * @see AttributeCondition
100      */

101     public static final short SAC_BEGIN_HYPHEN_ATTRIBUTE_CONDITION = 8;
102     /**
103      * This condition checks for a specified class.
104      * example:
105      * <pre class="example">
106      * .example
107      * </pre>
108      * @see AttributeCondition
109      */

110     public static final short SAC_CLASS_CONDITION = 9;
111     /**
112      * This condition checks for the link pseudo class.
113      * example:
114      * <pre class="example">
115      * :link
116      * :visited
117      * :hover
118      * </pre>
119      * @see AttributeCondition
120      */

121     public static final short SAC_PSEUDO_CLASS_CONDITION = 10;
122     /**
123      * This condition checks if a node is the only one in the node list.
124      */

125     public static final short SAC_ONLY_CHILD_CONDITION = 11;
126     /**
127      * This condition checks if a node is the only one of his type.
128      */

129     public static final short SAC_ONLY_TYPE_CONDITION = 12;
130     /**
131      * This condition checks the content of a node.
132      * @see ContentCondition
133      */

134     public static final short SAC_CONTENT_CONDITION = 13;
135
136     /**
137      * An integer indicating the type of <code>Condition</code>.
138      */

139     public short getConditionType();
140 }
141
Popular Tags