1 package com.lowagie.text.pdf.collection; 2 3 import com.lowagie.text.pdf.PdfDictionary; 4 import com.lowagie.text.pdf.PdfName; 5 import com.lowagie.text.pdf.PdfString; 6 7 public class PdfCollection extends PdfDictionary { 8 9 10 public static final int DETAILS = 0; 11 12 public static final int TILE = 1; 13 14 public static final int HIDDEN = 2; 15 16 20 public PdfCollection(int type) { 21 super(PdfName.COLLECTION); 22 switch(type) { 23 case TILE: 24 put(PdfName.VIEW, PdfName.T); 25 break; 26 case HIDDEN: 27 put(PdfName.VIEW, PdfName.H); 28 break; 29 default: 30 put(PdfName.VIEW, PdfName.D); 31 } 32 } 33 34 39 public void setInitialDocument(String description) { 40 put(PdfName.D, new PdfString(description, null)); 41 } 42 43 47 public void setSchema(PdfCollectionSchema schema) { 48 put(PdfName.SCHEMA, schema); 49 } 50 51 55 public PdfCollectionSchema getSchema() { 56 return (PdfCollectionSchema)get(PdfName.SCHEMA); 57 } 58 59 63 public void setSort(PdfCollectionSort sort) { 64 put(PdfName.SORT, sort); 65 } 66 } | Popular Tags |