org.apache.poi.xssf.usermodel.XSSFColor.isAuto()方法的使用及代码示例

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

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

XSSFColor.isAuto介绍

[英]A boolean value indicating the ctColor is automatic and system ctColor dependent.
[中]一个布尔值,指示ctColor是自动的,并且依赖于系统ctColor。

代码示例

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

  1. private boolean sameAuto(XSSFColor other) {
  2. return isAuto() == other.isAuto();
  3. }

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

  1. private boolean sameAuto(XSSFColor other) {
  2. return isAuto() == other.isAuto();
  3. }

代码示例来源:origin: zhangdaiscott/jeasypoi

  1. public void styleColor(Formatter out, String attr, Color color) {
  2. XSSFColor xSSFColor = (XSSFColor) color;
  3. if (color == null || xSSFColor.isAuto())
  4. return;
  5. byte[] rgb = xSSFColor.getRgb();
  6. if (rgb == null) {
  7. return;
  8. }
  9. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  10. }
  11. }

代码示例来源:origin: cn.afterturn/easypoi-base

  1. @Override
  2. public void styleColor(Formatter out, String attr, Color color) {
  3. XSSFColor xSSFColor = (XSSFColor) color;
  4. if (color == null || xSSFColor.isAuto()) {
  5. return;
  6. }
  7. byte[] rgb = xSSFColor.getRGB();
  8. if (rgb == null) {
  9. return;
  10. }
  11. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  12. }
  13. }

代码示例来源:origin: org.jeecg/easypoi-base

  1. public void styleColor(Formatter out, String attr, Color color) {
  2. XSSFColor xSSFColor = (XSSFColor) color;
  3. if (color == null || xSSFColor.isAuto())
  4. return;
  5. byte[] rgb = xSSFColor.getRGB();
  6. if (rgb == null) {
  7. return;
  8. }
  9. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  10. }
  11. }

代码示例来源:origin: xiaolanglang/easypoi

  1. public void styleColor(Formatter out, String attr, Color color) {
  2. XSSFColor xSSFColor = (XSSFColor) color;
  3. if (color == null || xSSFColor.isAuto())
  4. return;
  5. byte[] rgb = xSSFColor.getRgb();
  6. if (rgb == null) {
  7. return;
  8. }
  9. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  10. }
  11. }

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

  1. private void styleColor(Formatter out, String attr, XSSFColor color) {
  2. if (color == null || color.isAuto()) {
  3. return;
  4. }
  5. byte[] rgb = color.getRGB();
  6. if (rgb == null) {
  7. return;
  8. }
  9. // This is done twice -- rgba is new with CSS 3, and browser that don't
  10. // support it will ignore the rgba specification and stick with the
  11. // solid color, which is declared first
  12. out.format(" %s: #%02x%02x%02x;%n", attr, rgb[0], rgb[1], rgb[2]);
  13. byte[] argb = color.getARGB();
  14. if (argb == null) {
  15. return;
  16. }
  17. out.format(" %s: rgba(0x%02x, 0x%02x, 0x%02x, 0x%02x);%n", attr,
  18. argb[3], argb[0], argb[1], argb[2]);
  19. }
  20. }

代码示例来源:origin: jbaliuka/x4j-analytic

  1. protected Border createBorder(Rectangle fillArea, XSSFCellBorder.BorderSide borderSide, XSSFCellStyle cellStyle) {
  2. DashPattern pattern = getBorderPattern(cellStyle, borderSide);
  3. float width = getBorderWidth(getBorderStyle(cellStyle, borderSide));
  4. Line line = getBorderLine(fillArea, borderSide);
  5. ColorHelper helper = node.getColorHelper();
  6. XSSFColor borderColor = cellStyle.getBorderColor(borderSide);
  7. Color color = helper == null || borderColor.isAuto() ? Color.BLACK : helper.getAwtColor(borderColor);
  8. return new Border(color, line, pattern, width);
  9. }

相关文章