KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > mathml > MathMLFractionElementImpl


1 package JSci.mathml;
2
3 import org.w3c.dom.mathml.*;
4
5 /**
6  * Implements a MathML fraction element.
7  * @version 1.0
8  * @author Mark Hale
9  */

10 public class MathMLFractionElementImpl extends MathMLElementImpl implements MathMLFractionElement {
11         /**
12          * Constructs a MathML fraction element.
13          */

14         public MathMLFractionElementImpl(MathMLDocumentImpl owner, String JavaDoc qualifiedName) {
15                 super(owner, qualifiedName);
16         }
17
18         public String JavaDoc getLinethickness() {
19                 return getAttribute("linethickness");
20         }
21         public void setLinethickness(String JavaDoc linethickness) {
22                 setAttribute("linethickness", linethickness);
23         }
24
25         public MathMLElement getNumerator() {
26                 return (MathMLElement) getFirstChild();
27         }
28         public void setNumerator(MathMLElement numerator) {
29                 replaceChild(numerator, getFirstChild());
30         }
31
32         public MathMLElement getDenominator() {
33                 return (MathMLElement) item(1);
34         }
35         public void setDenominator(MathMLElement denominator) {
36                 replaceChild(denominator, item(1));
37         }
38 }
39
40
Popular Tags