001: package com.etymon.pj.object;
002:
003: import java.io.*;
004: import java.util.*;
005: import com.etymon.pj.*;
006: import com.etymon.pj.exception.*;
007:
008: /**
009: A representation of a dictionary node in a PDF Pages tree (abstract base class).
010: @author Nassib Nassar
011: */
012: public abstract class PjPagesNode extends PjDictionary {
013:
014: /**
015: Creates a new Pages dictionary node.
016: */
017: public PjPagesNode() {
018: super ();
019: }
020:
021: /**
022: Creates a Pages dictionary node as a wrapper around a Hashtable.
023: @param h the Hashtable to use for this dictionary node.
024: */
025: public PjPagesNode(Hashtable h) {
026: super (h);
027: }
028:
029: public void setParent(PjReference parent) {
030: _h.put(PjName.PARENT, parent);
031: }
032:
033: public PjReference getParent() throws InvalidPdfObjectException {
034: return hgetReference(PjName.PARENT);
035: }
036:
037: public void setMediaBox(PjRectangle mediaBox) {
038: _h.put(PjName.MEDIABOX, mediaBox);
039: }
040:
041: public void setMediaBox(PjReference mediaBox) {
042: _h.put(PjName.MEDIABOX, mediaBox);
043: }
044:
045: public PjObject getMediaBox() throws InvalidPdfObjectException {
046: return hget(PjName.MEDIABOX);
047: }
048:
049: public void setResources(PjResources resources) {
050: _h.put(PjName.RESOURCES, resources);
051: }
052:
053: public void setResources(PjReference resources) {
054: _h.put(PjName.RESOURCES, resources);
055: }
056:
057: public PjObject getResources() throws InvalidPdfObjectException {
058: return hget(PjName.RESOURCES);
059: }
060:
061: public void setCropBox(PjRectangle cropBox) {
062: _h.put(PjName.CROPBOX, cropBox);
063: }
064:
065: public void setCropBox(PjReference cropBox) {
066: _h.put(PjName.CROPBOX, cropBox);
067: }
068:
069: public PjObject getCropBox() throws InvalidPdfObjectException {
070: return hget(PjName.CROPBOX);
071: }
072:
073: public void setRotate(PjNumber rotate) {
074: _h.put(PjName.ROTATE, rotate);
075: }
076:
077: public void setRotate(PjReference rotate) {
078: _h.put(PjName.ROTATE, rotate);
079: }
080:
081: public PjObject getRotate() throws InvalidPdfObjectException {
082: return hget(PjName.ROTATE);
083: }
084:
085: public void setDur(PjNumber dur) {
086: _h.put(PjName.DUR, dur);
087: }
088:
089: public void setDur(PjReference dur) {
090: _h.put(PjName.DUR, dur);
091: }
092:
093: public PjObject getDur() throws InvalidPdfObjectException {
094: return hget(PjName.DUR);
095: }
096:
097: public void setHid(PjBoolean hid) {
098: _h.put(PjName.HID, hid);
099: }
100:
101: public void setHid(PjReference hid) {
102: _h.put(PjName.HID, hid);
103: }
104:
105: public PjObject getHid() throws InvalidPdfObjectException {
106: return hget(PjName.HID);
107: }
108:
109: public void setTrans(PjDictionary trans) {
110: _h.put(PjName.TRANS, trans);
111: }
112:
113: public void setTrans(PjReference trans) {
114: _h.put(PjName.TRANS, trans);
115: }
116:
117: public PjObject getTrans() throws InvalidPdfObjectException {
118: return hget(PjName.TRANS);
119: }
120:
121: public void setAA(PjDictionary aA) {
122: _h.put(PjName.AA, aA);
123: }
124:
125: public void setAA(PjReference aA) {
126: _h.put(PjName.AA, aA);
127: }
128:
129: public PjObject getAA() throws InvalidPdfObjectException {
130: return hget(PjName.AA);
131: }
132:
133: }
|