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 PDDocumentCatalogAdditionalActions implements COSObjectable 48 { 49 private COSDictionary actions; 50 51 54 public PDDocumentCatalogAdditionalActions() 55 { 56 actions = new COSDictionary(); 57 } 58 59 64 public PDDocumentCatalogAdditionalActions( 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 96 public PDAction getWC() 97 { 98 COSDictionary wc = (COSDictionary)actions.getDictionaryObject( "WC" ); 99 PDAction retval = null; 100 if( wc != null ) 101 { 102 retval = PDActionFactory.createAction( wc ); 103 } 104 return retval; 105 } 106 107 114 public void setWC( PDAction wc ) 115 { 116 actions.setItem( "WC", wc ); 117 } 118 119 126 public PDAction getWS() 127 { 128 COSDictionary ws = (COSDictionary)actions.getDictionaryObject( "WS" ); 129 PDAction retval = null; 130 if( ws != null ) 131 { 132 retval = PDActionFactory.createAction( ws ); 133 } 134 return retval; 135 } 136 137 144 public void setWS( PDAction ws ) 145 { 146 actions.setItem( "WS", ws ); 147 } 148 149 156 public PDAction getDS() 157 { 158 COSDictionary ds = (COSDictionary)actions.getDictionaryObject( "DS" ); 159 PDAction retval = null; 160 if( ds != null ) 161 { 162 retval = PDActionFactory.createAction( ds ); 163 } 164 return retval; 165 } 166 167 174 public void setDS( PDAction ds ) 175 { 176 actions.setItem( "DS", ds ); 177 } 178 179 186 public PDAction getWP() 187 { 188 COSDictionary wp = (COSDictionary)actions.getDictionaryObject( "WP" ); 189 PDAction retval = null; 190 if( wp != null ) 191 { 192 retval = PDActionFactory.createAction( wp ); 193 } 194 return retval; 195 } 196 197 204 public void setWP( PDAction wp ) 205 { 206 actions.setItem( "WP", wp ); 207 } 208 209 216 public PDAction getDP() 217 { 218 COSDictionary dp = (COSDictionary)actions.getDictionaryObject( "DP" ); 219 PDAction retval = null; 220 if( dp != null ) 221 { 222 retval = PDActionFactory.createAction( dp ); 223 } 224 return retval; 225 } 226 227 234 public void setDP( PDAction dp ) 235 { 236 actions.setItem( "DP", dp ); 237 } 238 } | Popular Tags |