Examples of XSSFClientAnchor


Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

      short column = (short) image.getColumn();
      //int width = Math.abs(image.getWidth());
      //int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

    row.setHeight((short) (50 * entity.getHeight()));
    row.createCell(i);
    ClientAnchor anchor = workbook instanceof HSSFWorkbook?
        new HSSFClientAnchor(0, 0, 0, 0, (short) i,
        row.getRowNum(), (short) (i + 1), row.getRowNum() + 1):
          new XSSFClientAnchor(0, 0, 0, 0, (short) i,
              row.getRowNum(), (short) (i + 1), row.getRowNum() + 1);
    if (entity.getExportImageType() == 1) {
      ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
      BufferedImage bufferImg;
      try {
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

            if (dr instanceof XSSFDrawing) { 
                XSSFDrawing drawing = (XSSFDrawing) dr; 
                List<XSSFShape> shapes = drawing.getShapes()
                for (XSSFShape shape : shapes) { 
                    XSSFPicture pic = (XSSFPicture) shape; 
                    XSSFClientAnchor anchor = pic.getPreferredSize()
                    CTMarker ctMarker = anchor.getFrom()
                    String picIndex = ctMarker.getRow() + "_" + ctMarker.getCol()
                    sheetIndexPicMap.put(picIndex, pic.getPictureData())
               
            } 
        } 
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

      short column = (short) image.getColumn();
      // int width = Math.abs(image.getWidth());
      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

      cell.setCellStyle(styles.get("header"));
      String[] ss = StringUtils.split(headerList.get(i), "**", 2);
      if (ss.length==2){
        cell.setCellValue(ss[0]);
        Comment comment = this.sheet.createDrawingPatriarch().createCellComment(
            new XSSFClientAnchor(0, 0, 0, 0, (short) 3, 3, (short) 5, 6));
        comment.setString(new XSSFRichTextString(ss[1]));
        cell.setCellComment(comment);
      }else{
        cell.setCellValue(headerList.get(i));
      }
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFClientAnchor

      short column = (short) image.getColumn();
      // int width = Math.abs(image.getWidth());
      // int height = Math.abs(image.getHeight());

      int index = workbook.addPicture(bytes, type);
      XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, row, column, row, column);

      XSSFDrawing drawing = s.createDrawingPatriarch();
      XSSFPicture picture = drawing.createPicture(anchor, index);

      picture.resize();
View Full Code Here

Examples of org.zkoss.poi.xssf.usermodel.XSSFClientAnchor

      int col1 = (Integer) data.get("col1");
      int row1 = (Integer) data.get("row1");
      int col2 = (Integer) data.get("col2");
      int row2 = (Integer) data.get("row2");
      Ranges.range(sheet).moveChart(chart,
          new XSSFClientAnchor(pxToEmu(dx1), pxToEmu(dy1), pxToEmu(dx2), pxToEmu(dy2), col1, row1, col2, row2));
    }
  }
View Full Code Here

Examples of org.zkoss.poi.xssf.usermodel.XSSFClientAnchor

      int col1 = (Integer) data.get("col1");
      int row1 = (Integer) data.get("row1");
      int col2 = (Integer) data.get("col2");
      int row2 = (Integer) data.get("row2");
      Ranges.range(sheet).movePicture(pic,
          new XSSFClientAnchor(pxToEmu(dx1), pxToEmu(dy1), pxToEmu(dx2), pxToEmu(dy2), col1, row1, col2, row2));
    }
  }
View Full Code Here

Examples of org.zkoss.poi.xssf.usermodel.XSSFClientAnchor

          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

Examples of org.zkoss.poi.xssf.usermodel.XSSFClientAnchor

    }
   
    if (_spreadsheet.getBook() instanceof HSSFWorkbook) {
      return new HSSFClientAnchor(0, 0, offsetWidth, offsetHeight, (short)lCol, tRow, (short)rCol, bRow);
    } else {
      return new XSSFClientAnchor(0, 0, pxToEmu(offsetWidth), pxToEmu(offsetHeight), lCol, tRow, rCol, bRow);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.