本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSheet.initDrawingAndShapes()
方法的一些代码示例,展示了XSLFSheet.initDrawingAndShapes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFSheet.initDrawingAndShapes()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFSheet
类名称:XSLFSheet
方法名:initDrawingAndShapes
[英]Helper method for initializing drawing and shapes in one go. If they are initialized separately, there's a risk that shapes get added twice, e.g. a shape is added to the drawing, then buildShapes is called and at last the shape is added to shape list
[中]一次初始化图形和形状的助手方法。如果单独初始化,则可能会两次添加形状,例如,将形状添加到图形中,然后调用buildShapes,最后将形状添加到形状列表中
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Returns an array containing all of the shapes in this sheet
*
* @return an array of all shapes in this sheet
*/
@Override
public List<XSLFShape> getShapes(){
initDrawingAndShapes();
return _shapes;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
private XSLFDrawing getDrawing(){
initDrawingAndShapes();
return _drawing;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
private void wipeAndReinitialize(XSLFSheet src, int offset) {
// explicitly initialize drawing and shapes from _spTree
_shapes = null;
_drawing = null;
initDrawingAndShapes();
// placeholders will be implicitly initialized when requested
_placeholders = null;
// update each shape according to its own additional copy rules
List<XSLFShape> tgtShapes = getShapes();
List<XSLFShape> srcShapes = src.getShapes();
for(int i = 0; i < srcShapes.size(); i++){
XSLFShape s1 = srcShapes.get(i);
XSLFShape s2 = tgtShapes.get(offset + i);
s2.copy(s1);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Returns an array containing all of the shapes in this sheet
*
* @return an array of all shapes in this sheet
*/
@Override
public List<XSLFShape> getShapes(){
initDrawingAndShapes();
return _shapes;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private XSLFDrawing getDrawing(){
initDrawingAndShapes();
return _drawing;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private void wipeAndReinitialize(XSLFSheet src, int offset) {
// explicitly initialize drawing and shapes from _spTree
_shapes = null;
_drawing = null;
initDrawingAndShapes();
// placeholders will be implicitly initialized when requested
_placeholders = null;
// update each shape according to its own additional copy rules
List<XSLFShape> tgtShapes = getShapes();
List<XSLFShape> srcShapes = src.getShapes();
for(int i = 0; i < srcShapes.size(); i++){
XSLFShape s1 = srcShapes.get(i);
XSLFShape s2 = tgtShapes.get(offset + i);
s2.copy(s1);
}
}
内容来源于网络,如有侵权,请联系作者删除!