Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.ClientAnchor


      if (dstComment == null) {
        final Worksheet dstSheet = (Worksheet)dstCell.getSheet();
        final Workbook dstBook = dstSheet.getWorkbook();
        final CreationHelper dstFactory = dstBook.getCreationHelper();
        final Drawing drawing = dstSheet.createDrawingPatriarch();
        final ClientAnchor anchor = dstFactory.createClientAnchor();
        dstComment = drawing.createCellComment(anchor);
      }
      dstComment.setString(srcComment.getString());
      dstComment.setAuthor(srcComment.getAuthor());
      dstComment.setVisible(srcComment.isVisible());
View Full Code Here


 
  @Override
  public void deletePicture(Picture picture) {
    synchronized (_sheet) {
      DrawingManager dm = ((SheetCtrl)_sheet).getDrawingManager();
      ClientAnchor anchor = picture.getPreferredSize();
      final RangeImpl rng = (RangeImpl) Ranges.range(_sheet, anchor.getRow1(), anchor.getCol1(), anchor.getRow2(), anchor.getCol2());
      final Collection<Ref> refs = rng.getRefs();
      dm.deletePicture(_sheet, picture); //must after getPreferredSize() or anchor is gone!
      if (refs != null && !refs.isEmpty()) {
        final Ref ref = refs.iterator().next();
        BookHelper.notifyPictureDelete(ref, picture);
View Full Code Here

  @Override
  public void deleteChart(Chart chart) {
    synchronized (_sheet) {
      DrawingManager dm = ((SheetCtrl)_sheet).getDrawingManager();
      ClientAnchor anchor = chart.getPreferredSize();
      final RangeImpl rng = (RangeImpl) Ranges.range(_sheet, anchor.getRow1(), anchor.getCol1(), anchor.getRow2(), anchor.getCol2());
      final Collection<Ref> refs = rng.getRefs();
      dm.deleteChart(_sheet, chart); //must after getPreferredSize() or anchor is gone!
      if (refs != null && !refs.isEmpty()) {
        final Ref ref = refs.iterator().next();
        BookHelper.notifyChartDelete(ref, chart);
View Full Code Here

          offsetWidth = cellWidth - Math.abs(widgetWidth);
        }
        break;
      }
    }
    ClientAnchor anchor = new XSSFClientAnchor(0, 0, pxToEmu(offsetWidth), pxToEmu(offsetHeight), lCol, tRow, rCol, bRow);
    return anchor;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.ClientAnchor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.