1 31 package org.pdfbox.pdmodel.interactive.form; 32 33 import org.pdfbox.cos.COSDictionary; 34 import org.pdfbox.cos.COSName; 35 import org.pdfbox.cos.COSString; 36 37 import java.io.IOException ; 38 39 45 public class PDPushButton extends PDField 46 { 47 48 54 public PDPushButton( PDAcroForm theAcroForm, COSDictionary field) 55 { 56 super(theAcroForm, field); 57 } 58 59 66 public void setValue(String value) throws IOException 67 { 68 COSString fieldValue = new COSString(value); 69 getDictionary().setItem( COSName.getPDFName( "V" ), fieldValue ); 70 getDictionary().setItem( COSName.getPDFName( "DV" ), fieldValue ); 71 } 72 73 80 public String getValue() throws IOException 81 { 82 return getDictionary().getString( "V" ); 83 } 84 } | Popular Tags |