KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > flute > parser > selectors > ConditionalSelectorImpl


1 /*
2  * Copyright (c) 2000 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: ConditionalSelectorImpl.java,v 1.1.1.1 2006/04/23 14:51:53 taqua Exp $
13  */

14 package org.w3c.flute.parser.selectors;
15
16 import org.w3c.css.sac.ConditionalSelector;
17 import org.w3c.css.sac.Selector;
18 import org.w3c.css.sac.SimpleSelector;
19 import org.w3c.css.sac.Condition;
20
21 /**
22  * @version $Revision: 1.1.1.1 $
23  * @author Philippe Le Hegaret
24  */

25 public class ConditionalSelectorImpl implements ConditionalSelector {
26
27     SimpleSelector simpleSelector;
28     Condition condition;
29
30     /**
31      * An integer indicating the type of <code>Selector</code>
32      */

33     public short getSelectorType() {
34     return Selector.SAC_CONDITIONAL_SELECTOR;
35     }
36     
37
38     /**
39      * Creates a new ConditionalSelectorImpl
40      */

41     public ConditionalSelectorImpl(SimpleSelector simpleSelector,
42                    Condition condition) {
43         this.simpleSelector = simpleSelector;
44     this.condition = condition;
45     }
46     
47
48     /**
49      * Returns the simple selector.
50      * <p>The simple selector can't be a <code>ConditionalSelector</code>.</p>
51      */

52     public SimpleSelector getSimpleSelector() {
53     return simpleSelector;
54     }
55
56     /**
57      * Returns the condition to be applied on the simple selector.
58      */

59     public Condition getCondition() {
60     return condition;
61     }
62 }
63
64
Popular Tags