KickJava   Java API By Example, From Geeks To Geeks.

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


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    Graphics operator: TJ.
9    @author Nassib Nassar
10 */

11 public class XXTJ
12     extends PageMarkOperator {
13
14     public XXTJ(PjArray array) {
15         _array = array;
16     }
17
18     public PjArray getArray() {
19         return _array;
20     }
21     
22     public long writePdf(OutputStream os) throws IOException {
23         long z = _array.writePdf(os);
24         z = z + writeln(os, " TJ");
25         return z;
26     }
27     
28     /**
29        Returns a deep copy of this object.
30        @return a deep copy of this object.
31            @exception CloneNotSupportedException if the instance can not be cloned.
32     */

33         public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
34         return new XXTJ((PjArray)(_array.clone()));
35     }
36     
37     public boolean equals(Object JavaDoc obj) {
38         if (obj == null) {
39             return false;
40         }
41         if (obj instanceof XXTJ) {
42             return (_array.equals(((XXTJ)obj)._array));
43         } else {
44             return false;
45         }
46     }
47
48     private PjArray _array;
49     
50 }
51
Popular Tags