本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlide.createTextBox()
方法的一些代码示例,展示了XSLFSlide.createTextBox()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFSlide.createTextBox()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFSlide
类名称:XSLFSlide
方法名:createTextBox
暂无
代码示例来源:origin: org.apache.poi/poi-examples
public static void main(String[] args) throws IOException{
try (XMLSlideShow ppt = new XMLSlideShow()) {
XSLFSlide slide = ppt.createSlide();
XSLFTextShape titleShape = slide.createTextBox();
titleShape.setPlaceholder(Placeholder.TITLE);
titleShape.setText("This is a slide title");
titleShape.setAnchor(new Rectangle(50, 50, 400, 100));
try (FileOutputStream out = new FileOutputStream("title.pptx")) {
ppt.write(out);
}
}
}
}
代码示例来源:origin: stackoverflow.com
XSLFTextBox tb = slide.createTextBox();
代码示例来源:origin: stackoverflow.com
XSLFTextBox tb = slide.createTextBox();
tb.setShapeType(XSLFShapeType.HEART);
int shapeSize = 150;
代码示例来源:origin: org.apache.poi/poi-examples
public static void main(String[] args) throws IOException{
try (XMLSlideShow ppt = new XMLSlideShow()) {
XSLFSlide slide1 = ppt.createSlide();
XSLFSlide slide2 = ppt.createSlide();
XSLFTextBox shape1 = slide1.createTextBox();
shape1.setAnchor(new Rectangle(50, 50, 200, 50));
XSLFTextRun r1 = shape1.addNewTextParagraph().addNewTextRun();
XSLFHyperlink link1 = r1.createHyperlink();
r1.setText("http://poi.apache.org"); // visible text
link1.setAddress("http://poi.apache.org"); // link address
XSLFTextBox shape2 = slide1.createTextBox();
shape2.setAnchor(new Rectangle(300, 50, 200, 50));
XSLFTextRun r2 = shape2.addNewTextParagraph().addNewTextRun();
XSLFHyperlink link2 = r2.createHyperlink();
r2.setText("Go to the second slide"); // visible text
link2.linkToSlide(slide2); // link address
try (FileOutputStream out = new FileOutputStream("hyperlinks.pptx")) {
ppt.write(out);
}
}
}
}
代码示例来源:origin: org.apache.poi/poi-examples
public static void main(String[] args) throws IOException{
try (XMLSlideShow ppt = new XMLSlideShow()) {
XSLFSlide slide1 = ppt.createSlide();
XSLFTextBox shape1 = slide1.createTextBox();
代码示例来源:origin: org.apache.poi/poi-examples
public static void main(String[] args) throws IOException {
try (XMLSlideShow ppt = new XMLSlideShow()) {
XSLFSlide slide = ppt.createSlide();
XSLFTextBox shape = slide.createTextBox();
shape.setAnchor(new Rectangle(50, 50, 400, 200));
内容来源于网络,如有侵权,请联系作者删除!