1 31 package org.pdfbox.pdmodel.interactive.annotation; 32 33 import org.pdfbox.cos.COSDictionary; 34 import org.pdfbox.cos.COSName; 35 36 42 public class PDAnnotationText extends PDAnnotationMarkup 43 { 44 45 49 50 53 public static final String NAME_COMMENT = "Comment"; 54 55 58 public static final String NAME_KEY = "Key"; 59 60 63 public static final String NAME_NOTE = "Note"; 64 65 68 public static final String NAME_HELP = "Help"; 69 70 73 public static final String NAME_NEW_PARAGRAPH = "NewParagraph"; 74 75 78 public static final String NAME_PARAGRAPH = "Paragraph"; 79 80 83 public static final String NAME_INSERT = "Insert"; 84 85 88 public static final String SUB_TYPE = "Text"; 89 90 93 public PDAnnotationText() 94 { 95 super(); 96 getDictionary() 97 .setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) ); 98 } 99 100 107 public PDAnnotationText( COSDictionary field ) 108 { 109 super( field ); 110 } 111 112 118 public void setOpen( boolean open ) 119 { 120 getDictionary().setBoolean( COSName.getPDFName( "Open" ), open ); 121 } 122 123 129 public boolean getOpen() 130 { 131 return getDictionary().getBoolean( COSName.getPDFName( "Open" ), false ); 132 } 133 134 141 public void setName( String name ) 142 { 143 getDictionary().setName( COSName.NAME, name ); 144 } 145 146 152 public String getName() 153 { 154 return getDictionary().getNameAsString( COSName.NAME, NAME_NOTE ); 155 } 156 157 } | Popular Tags |