1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
/*
* Copyright (c) 1999 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*
* $Id: Condition.java,v 1.8 2000/02/14 15:54:12 plehegar Exp $
*/
package org.w3c.css.sac;
/**
* @version $Revision: 1.8 $
* @author Philippe Le Hegaret
*/
public interface Condition {
/**
* This condition checks exactly two conditions.
* example:
* <pre class="example">
* .part1:lang(fr)
* </pre>
* @see CombinatorCondition
*/
public static final short SAC_AND_CONDITION = 0;
/**
* This condition checks one of two conditions.
* @see CombinatorCondition
*/
public static final short SAC_OR_CONDITION = 1;
/**
* This condition checks that a condition can't be applied to a node.
* @see NegativeCondition
*/
public static final short SAC_NEGATIVE_CONDITION = 2;
/**
* This condition checks a specified position.
* example:
* <pre class="example">
* :first-child
* </pre>
* @see PositionalCondition
*/
public static final short SAC_POSITIONAL_CONDITION = 3;
/**
* This condition checks an attribute.
* example:
* <pre class="example">
* [simple]
* [restart="never"]
* </pre>
* @see AttributeCondition
*/
public static final short SAC_ATTRIBUTE_CONDITION = 4;
/**
* This condition checks an id attribute.
* example:
* <pre class="example">
* #myId
* </pre>
* @see AttributeCondition
*/
public static final short SAC_ID_CONDITION = 5;
/**
* This condition checks the language of the node.
* example:
* <pre class="example">
* :lang(fr)
* </pre>
* @see LangCondition
*/
public static final short SAC_LANG_CONDITION = 6;
/**
* This condition checks for a value in a space-separated values in a
* specified attribute
* example:
* <pre class="example">
* [values~="10"]
* </pre>
* @see AttributeCondition
*/
public static final short SAC_ONE_OF_ATTRIBUTE_CONDITION = 7;
/**
* This condition checks if the value is in a hypen-separated list of values
* in a specified attribute.
* example:
* <pre class="example">
* [languages|="fr"]
* </pre>
* @see AttributeCondition
*/
public static final short SAC_BEGIN_HYPHEN_ATTRIBUTE_CONDITION = 8;
/**
* This condition checks for a specified class.
* example:
* <pre class="example">
* .example
* </pre>
* @see AttributeCondition
*/
public static final short SAC_CLASS_CONDITION = 9;
/**
* This condition checks for the link pseudo class.
* example:
* <pre class="example">
* :link
* :visited
* :hover
* </pre>
* @see AttributeCondition
*/
public static final short SAC_PSEUDO_CLASS_CONDITION = 10;
/**
* This condition checks if a node is the only one in the node list.
*/
public static final short SAC_ONLY_CHILD_CONDITION = 11;
/**
* This condition checks if a node is the only one of his type.
*/
public static final short SAC_ONLY_TYPE_CONDITION = 12;
/**
* This condition checks the content of a node.
* @see ContentCondition
*/
public static final short SAC_CONTENT_CONDITION = 13;
/**
* An integer indicating the type of <code>Condition</code>.
*/
public short getConditionType();
}
|