1 31 package org.pdfbox.pdmodel.interactive.action; 32 33 import org.pdfbox.cos.COSBase; 34 import org.pdfbox.cos.COSDictionary; 35 36 import org.pdfbox.pdmodel.common.COSObjectable; 37 import org.pdfbox.pdmodel.interactive.action.type.PDAction; 38 39 47 public class PDFormFieldAdditionalActions implements COSObjectable 48 { 49 private COSDictionary actions; 50 51 54 public PDFormFieldAdditionalActions() 55 { 56 actions = new COSDictionary(); 57 } 58 59 64 public PDFormFieldAdditionalActions( COSDictionary a ) 65 { 66 actions = a; 67 } 68 69 74 public COSBase getCOSObject() 75 { 76 return actions; 77 } 78 79 84 public COSDictionary getCOSDictionary() 85 { 86 return actions; 87 } 88 89 97 public PDAction getK() 98 { 99 COSDictionary k = (COSDictionary)actions.getDictionaryObject( "K" ); 100 PDAction retval = null; 101 if( k != null ) 102 { 103 retval = PDActionFactory.createAction( k ); 104 } 105 return retval; 106 } 107 108 116 public void setK( PDAction k ) 117 { 118 actions.setItem( "K", k ); 119 } 120 121 128 public PDAction getF() 129 { 130 COSDictionary f = (COSDictionary)actions.getDictionaryObject( "F" ); 131 PDAction retval = null; 132 if( f != null ) 133 { 134 retval = PDActionFactory.createAction( f ); 135 } 136 return retval; 137 } 138 139 146 public void setF( PDAction f ) 147 { 148 actions.setItem( "F", f ); 149 } 150 151 159 public PDAction getV() 160 { 161 COSDictionary v = (COSDictionary)actions.getDictionaryObject( "V" ); 162 PDAction retval = null; 163 if( v != null ) 164 { 165 retval = PDActionFactory.createAction( v ); 166 } 167 return retval; 168 } 169 170 178 public void setV( PDAction v ) 179 { 180 actions.setItem( "V", v ); 181 } 182 183 192 public PDAction getC() 193 { 194 COSDictionary c = (COSDictionary)actions.getDictionaryObject( "C" ); 195 PDAction retval = null; 196 if( c != null ) 197 { 198 retval = PDActionFactory.createAction( c ); 199 } 200 return retval; 201 } 202 203 212 public void setC( PDAction c ) 213 { 214 actions.setItem( "C", c ); 215 } 216 } | Popular Tags |