01: package com.etymon.pj.object.pagemark;
02:
03: import java.io.*;
04: import java.util.*;
05: import com.etymon.pj.object.*;
06:
07: /**
08: Text operator: TD.
09: @author Nassib Nassar
10: */
11: public class XXTD extends PageMarkOperator {
12:
13: public XXTD(PjNumber x, PjNumber y) {
14: _x = x;
15: _y = y;
16: }
17:
18: public PjNumber getX() {
19: return _x;
20: }
21:
22: public PjNumber getY() {
23: return _y;
24: }
25:
26: public long writePdf(OutputStream os) throws IOException {
27: long z = _x.writePdf(os);
28: z = z + write(os, ' ');
29: z = z + _y.writePdf(os);
30: z = z + writeln(os, " TD");
31: return z;
32: }
33:
34: /**
35: Returns a deep copy of this object.
36: @return a deep copy of this object.
37: */
38: public Object clone() {
39: return this ;
40: }
41:
42: public boolean equals(Object obj) {
43: if (obj == null) {
44: return false;
45: }
46: if (obj instanceof XXTD) {
47: return ((_x.equals(((XXTD) obj)._x)) && (_y
48: .equals(((XXTD) obj)._y)));
49: } else {
50: return false;
51: }
52: }
53:
54: private PjNumber _x;
55: private PjNumber _y;
56:
57: }
|