gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-23 09:01:05 28 4
gpt4 key购买 nike

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

XSLFTextParagraph.getIndentLevel介绍

暂无

代码示例

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

@Override
public Double getIndent() {
  ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetIndent()){
        setValue(Units.toPoints(props.getIndent()));
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

@Override
public TextAlign getTextAlign(){
  ParagraphPropertyFetcher<TextAlign> fetcher = new ParagraphPropertyFetcher<TextAlign>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetAlgn()){
        TextAlign val = TextAlign.values()[props.getAlgn().intValue() - 1];
        setValue(val);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

@Override
public FontAlign getFontAlign(){
  ParagraphPropertyFetcher<FontAlign> fetcher = new ParagraphPropertyFetcher<FontAlign>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetFontAlgn()){
        FontAlign val = FontAlign.values()[props.getFontAlgn().intValue() - 1];
        setValue(val);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

@Override
public Double getDefaultTabSize(){
  ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetDefTabSz()){
        double val = Units.toPoints(props.getDefTabSz());
        setValue(val);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

/**
 * @return the font to be used on bullet characters within a given paragraph
 */
@SuppressWarnings("WeakerAccess")
public String getBulletFont(){
  ParagraphPropertyFetcher<String> fetcher = new ParagraphPropertyFetcher<String>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetBuFont()){
        setValue(props.getBuFont().getTypeface());
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

/**
 * @return the character to be used in place of the standard bullet point
 */
@SuppressWarnings("WeakerAccess")
public String getBulletCharacter(){
  ParagraphPropertyFetcher<String> fetcher = new ParagraphPropertyFetcher<String>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetBuChar()){
        setValue(props.getBuChar().getChar());
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

/**
 * @return the left margin (in points) of the paragraph, null if unset
 */
@Override
public Double getLeftMargin(){
  ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetMarL()){
        double val = Units.toPoints(props.getMarL());
        setValue(val);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  // if the marL attribute is omitted, then a value of 347663 is implied
  return fetcher.getValue();
}

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

/**
 * @return the auto numbering starting number, or null if not defined
 */
@SuppressWarnings("WeakerAccess")
public Integer getAutoNumberingStartAt() {
  ParagraphPropertyFetcher<Integer> fetcher = new ParagraphPropertyFetcher<Integer>(getIndentLevel()) {
    public boolean fetch(CTTextParagraphProperties props) {
      if (props.isSetBuAutoNum()) {
        if (props.getBuAutoNum().isSetStartAt()) {
          setValue(props.getBuAutoNum().getStartAt());
          return true;
        }
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

/**
 *
 * @return the right margin of the paragraph, null if unset
 */
@Override
public Double getRightMargin(){
  ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetMarR()){
        double val = Units.toPoints(props.getMarR());
        setValue(val);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();
}

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

@Override
public List<XSLFTabStop> getTabStops() {
  ParagraphPropertyFetcher<List<XSLFTabStop>> fetcher = new ParagraphPropertyFetcher<List<XSLFTabStop>>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props) {
      if (props.isSetTabLst()) {
        final List<XSLFTabStop> list = new ArrayList<>();
        //noinspection deprecation
        for (final CTTextTabStop ta : props.getTabLst().getTabArray()) {
          list.add(new XSLFTabStop(ta));
        }
        setValue(list);
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue();        
}

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

@Override
public boolean isItalic(){
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetI()) {
        setValue(props.getI());
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

private CTTextFont getXmlObject(boolean create) {
  if (create) {
    return getCTTextFont(getRPr(true), true);
  }
  CharacterPropertyFetcher<CTTextFont> visitor = new CharacterPropertyFetcher<CTTextFont>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      CTTextFont font = getCTTextFont(props, false);
      if (font == null) {
        return false;
      }
      setValue(font);
      return true;
    }
  };
  fetchCharacterProperty(visitor);
  return  visitor.getValue();
}

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

@Override
public boolean isStrikethrough() {
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if(props != null && props.isSetStrike()) {
        setValue(props.getStrike() != STTextStrikeType.NO_STRIKE);
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

@Override
public boolean isSubscript() {
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetBaseline()) {
        setValue(props.getBaseline() < 0);
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

@Override
public boolean isBold(){
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetB()) {
        setValue(props.getB());
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

@Override
public boolean isUnderlined(){
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetU()) {
        setValue(props.getU() != STTextUnderlineType.NONE);
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

@Override
public boolean isSuperscript() {
  CharacterPropertyFetcher<Boolean> fetcher = new CharacterPropertyFetcher<Boolean>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetBaseline()) {
        setValue(props.getBaseline() > 0);
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? false : fetcher.getValue();
}

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

@SuppressWarnings("WeakerAccess")
public double getTabStop(final int idx) {
  ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if (props.isSetTabLst()) {
        CTTextTabStopList tabStops = props.getTabLst();
        if(idx < tabStops.sizeOfTabArray() ) {
          CTTextTabStop ts = tabStops.getTabArray(idx);
          double val = Units.toPoints(ts.getPos());
          setValue(val);
          return true;
        }
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  return fetcher.getValue() == null ? 0. : fetcher.getValue();
}

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

/**
 * @return the spacing between characters within a text run,
 * If this attribute is omitted than a value of 0 or no adjustment is assumed.
 */
@SuppressWarnings("WeakerAccess")
public double getCharacterSpacing(){
  CharacterPropertyFetcher<Double> fetcher = new CharacterPropertyFetcher<Double>(_p.getIndentLevel()){
    @Override
    public boolean fetch(CTTextCharacterProperties props){
      if (props != null && props.isSetSpc()) {
        setValue(props.getSpc()*0.01);
        return true;
      }
      return false;
    }
  };
  fetchCharacterProperty(fetcher);
  return fetcher.getValue() == null ? 0 : fetcher.getValue();
}

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

boolean fetchThemeProperty(final ParagraphPropertyFetcher<?> visitor) {
  final XSLFTextShape shape = getParentShape();
  if (shape.isPlaceholder()) {
    return false;
  }
  // if it is a plain text box then take defaults from presentation.xml
  @SuppressWarnings("resource")
  final XMLSlideShow ppt = shape.getSheet().getSlideShow();
  final CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getIndentLevel());
  return themeProps != null && visitor.fetch(themeProps);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com