1 31 package org.pdfbox.pdmodel.interactive.documentnavigation.destination; 32 33 import org.pdfbox.cos.COSArray; 34 import org.pdfbox.cos.COSBase; 35 36 43 public class PDPageFitRectangleDestination extends PDPageDestination 44 { 45 48 protected static final String TYPE = "FitR"; 49 50 54 public PDPageFitRectangleDestination() 55 { 56 super(); 57 array.growToSize(6); 58 array.setName( 1, TYPE ); 59 60 } 61 62 67 public PDPageFitRectangleDestination( COSArray arr ) 68 { 69 super( arr ); 70 } 71 72 78 public int getLeft() 79 { 80 return array.getInt( 2 ); 81 } 82 83 88 public void setLeft( int x ) 89 { 90 array.growToSize( 3 ); 91 if( x == -1 ) 92 { 93 array.set( 2, (COSBase)null ); 94 } 95 else 96 { 97 array.setInt( 2, x ); 98 } 99 } 100 101 107 public int getBottom() 108 { 109 return array.getInt( 3 ); 110 } 111 112 117 public void setBottom( int y ) 118 { 119 array.growToSize( 6 ); 120 if( y == -1 ) 121 { 122 array.set( 3, (COSBase)null ); 123 } 124 else 125 { 126 array.setInt( 3, y ); 127 } 128 } 129 130 136 public int getRight() 137 { 138 return array.getInt( 4 ); 139 } 140 141 146 public void setRight( int x ) 147 { 148 array.growToSize( 6 ); 149 if( x == -1 ) 150 { 151 array.set( 4, (COSBase)null ); 152 } 153 else 154 { 155 array.setInt( 4, x ); 156 } 157 } 158 159 160 166 public int getTop() 167 { 168 return array.getInt( 5 ); 169 } 170 171 176 public void setTop( int y ) 177 { 178 array.growToSize( 6 ); 179 if( y == -1 ) 180 { 181 array.set( 5, (COSBase)null ); 182 } 183 else 184 { 185 array.setInt( 5, y ); 186 } 187 } 188 } 189 | Popular Tags |