1 31 package org.pdfbox.pdmodel.interactive.action.type; 32 33 import java.io.IOException ; 34 35 import org.pdfbox.cos.COSBase; 36 import org.pdfbox.cos.COSDictionary; 37 38 import org.pdfbox.pdmodel.common.filespecification.PDFileSpecification; 39 40 47 public class PDActionRemoteGoTo extends PDAction 48 { 49 52 public static final String SUB_TYPE = "GoToR"; 53 54 57 public PDActionRemoteGoTo() 58 { 59 action = new COSDictionary(); 60 setSubType( SUB_TYPE ); 61 } 62 63 68 public PDActionRemoteGoTo( COSDictionary a ) 69 { 70 super( a ); 71 } 72 73 78 public COSBase getCOSObject() 79 { 80 return action; 81 } 82 83 88 public COSDictionary getCOSDictionary() 89 { 90 return action; 91 } 92 93 99 public String getS() 100 { 101 return action.getNameAsString( "S" ); 102 } 103 104 110 public void setS( String s ) 111 { 112 action.setName( "S", s ); 113 } 114 115 122 public PDFileSpecification getFile() throws IOException 123 { 124 return PDFileSpecification.createFS( action.getDictionaryObject( "F" ) ); 125 } 126 127 132 public void setFile( PDFileSpecification fs ) 133 { 134 action.setItem( "F", fs ); 135 } 136 137 146 147 public COSBase getD() 149 { 150 return action.getDictionaryObject( "D" ); 151 } 152 153 162 163 public void setD( COSBase d ) 165 { 166 action.setItem( "D", d ); 167 } 168 169 177 public boolean shouldOpenInNewWindow() 178 { 179 return action.getBoolean( "NewWindow", true ); 180 } 181 182 187 public void setOpenInNewWindow( boolean value ) 188 { 189 action.setBoolean( "NewWindow", value ); 190 } 191 } | Popular Tags |