1 31 package org.pdfbox.pdmodel.fdf; 32 33 import org.pdfbox.cos.COSArray; 34 import org.pdfbox.cos.COSBase; 35 import org.pdfbox.cos.COSString; 36 37 import org.pdfbox.pdmodel.common.COSObjectable; 38 39 46 public class FDFOptionElement implements COSObjectable 47 { 48 private COSArray option; 49 50 53 public FDFOptionElement() 54 { 55 option = new COSArray(); 56 option.add( new COSString( "" ) ); 57 option.add( new COSString( "" ) ); 58 } 59 60 65 public FDFOptionElement( COSArray o ) 66 { 67 option = o; 68 } 69 70 75 public COSBase getCOSObject() 76 { 77 return option; 78 } 79 80 85 public COSArray getCOSArray() 86 { 87 return option; 88 } 89 90 95 public String getOption() 96 { 97 return ((COSString)option.getObject( 0 ) ).getString(); 98 } 99 100 105 public void setOption( String opt ) 106 { 107 option.set( 0, new COSString( opt ) ); 108 } 109 110 115 public String getDefaultAppearanceString() 116 { 117 return ((COSString)option.getObject( 1 ) ).getString(); 118 } 119 120 125 public void setDefaultAppearanceString( String da ) 126 { 127 option.set( 1, new COSString( da ) ); 128 } 129 } | Popular Tags |