gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-18 21:12:40 28 4
gpt4 key购买 nike

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

XSLFSheet.getTheme介绍

暂无

代码示例

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

@Override
public void setBorderColor(BorderEdge edge, Color color) {
  if (color == null) {
    throw new IllegalArgumentException("Colors need to be specified.");
  }
  CTLineProperties ln = setBorderDefaults(edge);
  CTSolidColorFillProperties fill = ln.addNewSolidFill();
  XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
  c.setColor(color);
}

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

@Override
  public SolidPaint getFillStyle() {
    XSLFTheme theme = getSheet().getTheme();
    CTOuterShadowEffect ct = (CTOuterShadowEffect)getXmlObject();
    if(ct == null) return null;
      
    CTSchemeColor phClr = ct.getSchemeClr();
    final XSLFColor xc = new XSLFColor(ct, theme, phClr);
    return DrawPaint.createSolidPaint(xc.getColorStyle());
  }
}

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

protected PaintStyle getFillPaint() {
  final XSLFTheme theme = getSheet().getTheme();
  final boolean hasPlaceholder = getPlaceholder() != null;
  PropertyFetcher<PaintStyle> fetcher = new PropertyFetcher<PaintStyle>() {

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

@SuppressWarnings("WeakerAccess")
protected PaintStyle getLinePaint() {
  XSLFSheet sheet = getSheet();
  final XSLFTheme theme = sheet.getTheme();
  final boolean hasPlaceholder = getPlaceholder() != null;
  PropertyFetcher<PaintStyle> fetcher = new PropertyFetcher<PaintStyle>() {

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

@SuppressWarnings("WeakerAccess")
public Color getBorderColor(BorderEdge edge) {
  CTLineProperties ln = getCTLine(edge, false);
  if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill()) {
    return null;
  }
  CTSolidColorFillProperties fill = ln.getSolidFill();
  XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
  return c.getColor();
}

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

/**
 *
 * @return the color of bullet characters within a given paragraph.
 * A <code>null</code> value means to use the text font color.
 */
@SuppressWarnings("WeakerAccess")
public PaintStyle getBulletFontColor(){
  final XSLFTheme theme = getParentShape().getSheet().getTheme();
  ParagraphPropertyFetcher<Color> fetcher = new ParagraphPropertyFetcher<Color>(getIndentLevel()){
    public boolean fetch(CTTextParagraphProperties props){
      if(props.isSetBuClr()){
        XSLFColor c = new XSLFColor(props.getBuClr(), theme, null);
        setValue(c.getColor());
        return true;
      }
      return false;
    }
  };
  fetchParagraphProperty(fetcher);
  Color col = fetcher.getValue();
  return (col == null) ? null : DrawPaint.createSolidPaint(col);
}

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

@Override
public PaintStyle getFontColor() {
  CTTableStyleTextStyle txStyle = getTextStyle();
  if (txStyle == null) {
    return super.getFontColor();
  }
  CTSchemeColor phClr = null;
  CTFontReference fontRef = txStyle.getFontRef();
  if (fontRef != null) {
    phClr = fontRef.getSchemeClr();
  }
  XSLFTheme theme = getSheet().getTheme();
  final XSLFColor c = new XSLFColor(txStyle, theme, phClr);
  return DrawPaint.createSolidPaint(c.getColorStyle());
}

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

if (typeface.startsWith("+mj-") || typeface.startsWith("+mn-")) {
  final XSLFTheme theme = _p.getParentShape().getSheet().getTheme();
  CTFontScheme fontTheme = theme.getXmlObject().getThemeElements().getFontScheme();
  CTFontCollection coll = typeface.startsWith("+mj-")

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

/**
 * Specifies a solid color fill. The shape is filled entirely with the
 * specified color.
 *
 * @param color
 *            the solid color fill. The value of <code>null</code> unsets
 *            the solidFIll attribute from the underlying xml
 */
@Override
public void setFillColor(Color color) {
  CTTableCellProperties spPr = getCellProperties(true);
  if (color == null) {
    if (spPr.isSetSolidFill()) {
      spPr.unsetSolidFill();
    }
  } else {
    CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill();
    XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
    c.setColor(color);
  }
}

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

@Override
  public boolean fetch(CTTextCharacterProperties props){
    if (props == null) {
      return false;
    }
    XSLFShape shape = _p.getParentShape();
    CTShapeStyle style = shape.getSpStyle();
    CTSchemeColor phClr = null;
    if (style != null && style.getFontRef() != null) {
      phClr = style.getFontRef().getSchemeClr();
    }
    XSLFFillProperties fp = XSLFPropertiesDelegate.getFillDelegate(props);
    XSLFSheet sheet = shape.getSheet();
    PackagePart pp = sheet.getPackagePart();
    XSLFTheme theme = sheet.getTheme();
    PaintStyle ps = XSLFShape.selectPaint(fp, phClr, pp, theme, hasPlaceholder);
    if (ps != null)  {
      setValue(ps);
      return true;
    }
    return false;
  }
};

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

@Override
public void setFontColor(PaintStyle color) {
  if (!(color instanceof SolidPaint)) {
    LOG.log(POILogger.WARN, "Currently only SolidPaint is supported!");
    return;
  }
  SolidPaint sp = (SolidPaint)color;
  Color c = DrawPaint.applyColorTransform(sp.getSolidColor());
  CTTextCharacterProperties rPr = getRPr(true);
  CTSolidColorFillProperties fill = rPr.isSetSolidFill() ? rPr.getSolidFill() : rPr.addNewSolidFill();
  XSLFColor col = new XSLFColor(fill, getParentParagraph().getParentShape().getSheet().getTheme(), fill.getSchemeClr());
  col.setColor(c);
}

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

XSLFTheme theme = getSheet().getTheme();
if (theme == null) {
  return null;

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

/**
* @param color  the color to paint the shape outline.
 * A <code>null</code> value turns off the shape outline.
 */
public void setLineColor(Color color) {
  CTLineProperties ln = getLn(this, true);
  if (ln == null) {
    return;
  }
  if (ln.isSetSolidFill()) {
    ln.unsetSolidFill();
  }
  if (ln.isSetGradFill()) {
    ln.unsetGradFill();
  }
  if (ln.isSetPattFill()) {
    ln.unsetPattFill();
  }
  if (ln.isSetNoFill()) {
    ln.unsetNoFill();
  }
  
  if (color == null) {
    ln.addNewNoFill();
  } else {
    CTSolidColorFillProperties fill = ln.addNewSolidFill();
    XSLFColor col = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
    col.setColor(color);
  }
}

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

CTStyleMatrix styleMatrix = getSheet().getTheme().getXmlObject().getThemeElements().getFmtScheme();
CTEffectStyleItem ef = styleMatrix.getEffectStyleLst().getEffectStyleArray(idx - 1);
obj = ef.getEffectLst().getOuterShdw();

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

public PaintStyle getFillPaint() {
  XSLFSheet sheet = getSheet();
  XSLFTheme theme = sheet.getTheme();
  final boolean hasPlaceholder = getPlaceholder() != null;
  XmlObject props = getCellProperties(false);

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

XSLFColor col = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
col.setColor(color);

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

XSLFColor col = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
col.setColor(color);

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

@Override
public void setBorderColor(BorderEdge edge, Color color) {
  if (color == null) {
    throw new IllegalArgumentException("Colors need to be specified.");
  }
  CTLineProperties ln = setBorderDefaults(edge);
  CTSolidColorFillProperties fill = ln.addNewSolidFill();
  XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
  c.setColor(color);
}

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

@Override
  public SolidPaint getFillStyle() {
    XSLFTheme theme = getSheet().getTheme();
    CTOuterShadowEffect ct = (CTOuterShadowEffect)getXmlObject();
    if(ct == null) return null;
      
    CTSchemeColor phClr = ct.getSchemeClr();
    final XSLFColor xc = new XSLFColor(ct, theme, phClr);
    return DrawPaint.createSolidPaint(xc.getColorStyle());
  }
}

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

@SuppressWarnings("WeakerAccess")
public Color getBorderColor(BorderEdge edge) {
  CTLineProperties ln = getCTLine(edge, false);
  if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill()) {
    return null;
  }
  CTSolidColorFillProperties fill = ln.getSolidFill();
  XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
  return c.getColor();
}

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