KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > etymon > pj > object > pagemark > Xquot


1 package com.etymon.pj.object.pagemark;
2
3 import java.io.*;
4 import java.util.*;
5 import com.etymon.pj.object.*;
6
7 /**
8    Text operator: ".
9    @author Nassib Nassar
10 */

11 public class Xquot
12     extends PageMarkOperator {
13
14     public Xquot(PjNumber aw, PjNumber ac, PjString text) {
15         _aw = aw;
16         _ac = ac;
17         _text = text;
18     }
19
20     public PjNumber getAW() {
21         return _aw;
22     }
23
24     public PjNumber getAC() {
25         return _ac;
26     }
27
28     public PjString getText() {
29         return _text;
30     }
31     
32     public long writePdf(OutputStream os) throws IOException {
33         long z = _aw.writePdf(os);
34         z = z + write(os, ' ');
35         z = z + _ac.writePdf(os);
36         z = z + write(os, ' ');
37         z = z + _text.writePdf(os);
38         z = z + writeln(os, " \"");
39         return z;
40     }
41     
42     /**
43        Returns a deep copy of this object.
44        @return a deep copy of this object.
45     */

46     public Object JavaDoc clone() {
47         return this;
48     }
49     
50     public boolean equals(Object JavaDoc obj) {
51         if (obj == null) {
52             return false;
53         }
54         if (obj instanceof Xquot) {
55             return ( (_aw.equals(((Xquot)obj)._aw)) &&
56                  (_ac.equals(((Xquot)obj)._ac)) &&
57                  (_text.equals(((Xquot)obj)._text)) );
58         } else {
59             return false;
60         }
61     }
62
63     private PjNumber _aw;
64     private PjNumber _ac;
65     private PjString _text;
66     
67 }
68
Popular Tags