KickJava   Java API By Example, From Geeks To Geeks.

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


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    Marked content operator: BDC.
9    @author Nassib Nassar
10 */

11 public class XBDC
12     extends PageMarkOperator {
13
14     public XBDC(PjName tag, PjDictionary properties) {
15         _tag = tag;
16         _properties = properties;
17     }
18
19     public XBDC(PjName tag, PjName properties) {
20         _tag = tag;
21         _properties = properties;
22     }
23
24     public PjName getTag() {
25         return _tag;
26     }
27     
28     public PjObject getProperties() {
29         return _properties;
30     }
31
32     public long writePdf(OutputStream os) throws IOException {
33         long z = _tag.writePdf(os);
34         z = z + write(os, ' ');
35         z = z + _properties.writePdf(os);
36         z = z + writeln(os, " BDC");
37         return z;
38     }
39     
40     /**
41        Returns a deep copy of this object.
42        @return a deep copy of this object.
43     */

44     public Object JavaDoc clone() {
45         return this;
46     }
47     
48     public boolean equals(Object JavaDoc obj) {
49         if (obj == null) {
50             return false;
51         }
52         if (obj instanceof XBDC) {
53             return ( (_tag.equals(((XBDC)obj)._tag)) &&
54                  (_properties.equals(((XBDC)obj)._properties)) );
55         } else {
56             return false;
57         }
58     }
59
60     private PjName _tag;
61     private PjObject _properties;
62     
63 }
64
Popular Tags