org.apache.poi.xslf.usermodel.XSLFTextShape.getTextType()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextShape.getTextType()方法的一些代码示例,展示了XSLFTextShape.getTextType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFTextShape.getTextType()方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFTextShape
类名称:XSLFTextShape
方法名:getTextType

XSLFTextShape.getTextType介绍

暂无

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

@Override
public TextPlaceholder getTextPlaceholder() {
  Placeholder ph = getTextType();
  if (ph == null) {
    return TextPlaceholder.BODY;
  }
  switch (ph) {
  case BODY:
    return TextPlaceholder.BODY;
  case TITLE:
    return TextPlaceholder.TITLE;
  case CENTERED_TITLE:
    return TextPlaceholder.CENTER_TITLE;
  default:
  case CONTENT:
    return TextPlaceholder.OTHER;
  }
}

代码示例来源:origin: org.apache.poi/poi-ooxml

@SuppressWarnings("WeakerAccess")
protected XSLFTextShape getTextShapeByType(Placeholder type){
  for(XSLFShape shape : this.getShapes()){
    if(shape instanceof XSLFTextShape) {
      XSLFTextShape txt = (XSLFTextShape)shape;
      if(txt.getTextType() == type) {
        return txt;
      }
    }
  }
  return null;
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Copy placeholders from this layout to the destination slide
 *
 * @param slide destination slide
 */
@SuppressWarnings("WeakerAccess")
public void copyLayout(XSLFSlide slide) {
  for (XSLFShape sh : getShapes()) {
    if (sh instanceof XSLFTextShape) {
      XSLFTextShape tsh = (XSLFTextShape) sh;
      Placeholder ph = tsh.getTextType();
      if (ph == null) continue;
      switch (ph) {
        // these are special and not copied by default
        case DATETIME:
        case SLIDE_NUMBER:
        case FOOTER:
          break;
        default:
          slide.getSpTree().addNewSp().set(tsh.getXmlObject().copy());
      }
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
public TextPlaceholder getTextPlaceholder() {
  Placeholder ph = getTextType();
  if (ph == null) {
    return TextPlaceholder.BODY;
  }
  switch (ph) {
  case BODY:
    return TextPlaceholder.BODY;
  case TITLE:
    return TextPlaceholder.TITLE;
  case CENTERED_TITLE:
    return TextPlaceholder.CENTER_TITLE;
  default:
  case CONTENT:
    return TextPlaceholder.OTHER;
  }
}

代码示例来源:origin: apache/tika

Placeholder ph = txt.getTextType();
if (skipPlaceholders && ph != null) {
  continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@SuppressWarnings("WeakerAccess")
protected XSLFTextShape getTextShapeByType(Placeholder type){
  for(XSLFShape shape : this.getShapes()){
    if(shape instanceof XSLFTextShape) {
      XSLFTextShape txt = (XSLFTextShape)shape;
      if(txt.getTextType() == type) {
        return txt;
      }
    }
  }
  return null;
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

protected XSLFTextShape getTextShapeByType(Placeholder type){
  for(XSLFShape shape : this.getShapes()){
    if(shape instanceof XSLFTextShape) {
      XSLFTextShape txt = (XSLFTextShape)shape;
      if(txt.getTextType() == type) {
        return txt;
      }
    }
  }
  return null;
}

代码示例来源:origin: stackoverflow.com

// create a new empty slide show
 XMLSlideShow ppt = new XMLSlideShow();
 // add first slide
 XSLFSlide slide = ppt.createSlide();
 // get or create notes
 XSLFNotes note = ppt.getNotesSlide(slide);
 // insert text
 for (XSLFTextShape shape : note.getPlaceholders()) {
   if (shape.getTextType() == Placeholder.BODY) {
     shape.setText("String");
     break;
   }
 }
 // save
 [...]

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Copy placeholders from this layout to the destination slide
 *
 * @param slide destination slide
 */
public void copyLayout(XSLFSlide slide) {
  for (XSLFShape sh : getShapes()) {
    if (sh instanceof XSLFTextShape) {
      XSLFTextShape tsh = (XSLFTextShape) sh;
      Placeholder ph = tsh.getTextType();
      if (ph == null) continue;
      switch (ph) {
        // these are special and not copied by default
        case DATETIME:
        case SLIDE_NUMBER:
        case FOOTER:
          break;
        default:
          slide.getSpTree().addNewSp().set(tsh.getXmlObject().copy());
      }
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Copy placeholders from this layout to the destination slide
 *
 * @param slide destination slide
 */
@SuppressWarnings("WeakerAccess")
public void copyLayout(XSLFSlide slide) {
  for (XSLFShape sh : getShapes()) {
    if (sh instanceof XSLFTextShape) {
      XSLFTextShape tsh = (XSLFTextShape) sh;
      Placeholder ph = tsh.getTextType();
      if (ph == null) continue;
      switch (ph) {
        // these are special and not copied by default
        case DATETIME:
        case SLIDE_NUMBER:
        case FOOTER:
          break;
        default:
          slide.getSpTree().addNewSp().set(tsh.getXmlObject().copy());
      }
    }
  }
}

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

if (sh instanceof XSLFTextShape) {
  XSLFTextShape txt = (XSLFTextShape) sh;
  Placeholder ph = txt.getTextType();
  if (skipPlaceholders && ph != null) {
    continue;

代码示例来源:origin: org.apache.tika/tika-parsers

Placeholder ph = txt.getTextType();
if (skipPlaceholders && ph != null) {
  continue;

相关文章