intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / internal / model / AtRule.java
1 /*
2  * Copyright (c) 2003-2004 Christopher Lenz and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API and implementation
10  * 
11  * $Id: AtRule.java,v 1.1 2004-09-02 18:07:12 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.internal.model;
15
16 import net.sourceforge.phpeclipse.core.model.ISourceReference;
17 import net.sourceforge.phpeclipse.css.core.model.IAtRule;
18 import net.sourceforge.phpeclipse.css.core.model.IRule;
19 import net.sourceforge.phpeclipse.css.core.model.IStyleSheet;
20
21 import org.eclipse.jface.text.IDocument;
22
23 /**
24  * 
25  */
26 public class AtRule extends AbstractRule
27         implements IAtRule {
28
29         // Instance Variables ------------------------------------------------------
30
31         private ISourceReference name;
32
33         private ISourceReference value;
34
35         // Constructors ------------------------------------------------------------
36
37         /**
38          * Constructor.
39          * 
40          * @param document The document that contains the rule
41          */
42         public AtRule(IDocument document, IStyleSheet styleSheet) {
43                 this(document, styleSheet, null);
44         }
45
46         /**
47          * Constructor.
48          * 
49          * @param document The document that contains the rule
50          * @param parent The parent rule, or <code>null</code> if the rule is at top
51          *        level
52          */
53         public AtRule(IDocument document, IStyleSheet styleSheet, IRule parent) {
54                 super(document, styleSheet, parent);
55         }
56
57         // IAtRule Implementation --------------------------------------------------
58
59         /*
60          * @see IAtRule#getName()
61          */
62         public final ISourceReference getName() {
63                 return name;
64         }
65
66         /*
67          * @see IAtRule#getValue()
68          */
69         public final ISourceReference getValue() {
70                 return value;
71         }
72
73         // Public Methods --------------------------------------------------
74
75         public final void setName(ISourceReference name) {
76                 this.name = name;
77         }
78
79         public final void setValue(ISourceReference value) {
80                 this.value = value;
81         }
82
83 }