@Override public XDGFCell getCell(String cellName) { XDGFCell _cell = super.getCell(cellName); // if not found, ask the master if (_cell == null && _masterShape != null) { _cell = _masterShape.getCell(cellName); } return _cell; }
/** * @return origin of coordinate system */ public Point2D.Double getPageOffset() { XDGFCell xoffcell = _pageSheet.getCell("XRulerOrigin"); XDGFCell yoffcell = _pageSheet.getCell("YRulerOrigin"); double xoffset = 0; double yoffset = 0; if (xoffcell != null) xoffset = Double.parseDouble(xoffcell.getValue()); if (yoffcell != null) yoffset = Double.parseDouble(yoffcell.getValue()); return new Point2D.Double(xoffset, yoffset); }
/** * @return width/height of page */ public Dimension2dDouble getPageSize() { XDGFCell w = _pageSheet.getCell("PageWidth"); XDGFCell h = _pageSheet.getCell("PageHeight"); if (w == null || h == null) throw new POIXMLException("Cannot determine page size"); return new Dimension2dDouble(Double.parseDouble(w.getValue()), Double.parseDouble(h.getValue())); }
@Override public XDGFCell getCell(String cellName) { XDGFCell _cell = super.getCell(cellName); // if not found, ask the master if (_cell == null && _masterShape != null) { _cell = _masterShape.getCell(cellName); } return _cell; }
/** * @return origin of coordinate system */ public Point2D.Double getPageOffset() { XDGFCell xoffcell = _pageSheet.getCell("XRulerOrigin"); XDGFCell yoffcell = _pageSheet.getCell("YRulerOrigin"); double xoffset = 0; double yoffset = 0; if (xoffcell != null) xoffset = Double.parseDouble(xoffcell.getValue()); if (yoffcell != null) yoffset = Double.parseDouble(yoffcell.getValue()); return new Point2D.Double(xoffset, yoffset); }
/** * @return width/height of page */ public Dimension2dDouble getPageSize() { XDGFCell w = _pageSheet.getCell("PageWidth"); XDGFCell h = _pageSheet.getCell("PageHeight"); if (w == null || h == null) throw new POIXMLException("Cannot determine page size"); return new Dimension2dDouble(Double.parseDouble(w.getValue()), Double.parseDouble(h.getValue())); }