1 28 package net.sf.jasperreports.engine; 29 30 31 32 36 public class JRPrintAnchorIndex 37 { 38 39 40 43 private int pageIndex = 0; 44 private JRPrintElement element = null; 45 private final int offsetX; 46 private final int offsetY; 47 48 49 55 public JRPrintAnchorIndex( 56 int page, 57 JRPrintElement elem) 58 { 59 this (page, elem, 0, 0); 60 } 61 62 63 73 public JRPrintAnchorIndex(int page, JRPrintElement elem, int offsetX, int offsetY) 74 { 75 this.pageIndex = page; 76 this.element = elem; 77 this.offsetX = offsetX; 78 this.offsetY = offsetY; 79 } 80 81 82 85 public int getPageIndex() 86 { 87 return this.pageIndex; 88 } 89 90 91 94 public JRPrintElement getElement() 95 { 96 return this.element; 97 } 98 99 100 109 public int getElementAbsoluteX() 110 { 111 return element.getX() + offsetX; 112 } 113 114 115 124 public int getElementAbsoluteY() 125 { 126 return element.getY() + offsetY; 127 } 128 129 130 } 131 | Popular Tags |