org.apache.poi.ss.usermodel.CellStyle.getFillForegroundColorColor()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(210)

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

CellStyle.getFillForegroundColorColor介绍

[英]Gets the color object representing the current foreground fill, resolving indexes using the supplied workbook. This will work for both indexed and rgb defined colors.
[中]获取表示当前前景填充的颜色对象,使用提供的工作簿解析索引。这将适用于索引颜色和rgb定义的颜色。

代码示例

代码示例来源:origin: caryyu/excel2pdf

  1. protected int[] getBackgroundColor(CellStyle style) {
  2. Color color = style.getFillForegroundColorColor();
  3. return POIUtil.getColorRGB(color);
  4. }

代码示例来源:origin: caryyu/excel2pdf

  1. protected int getBackgroundColorByExcel(CellStyle style) {
  2. Color color = style.getFillForegroundColorColor();
  3. return POIUtil.getRGB(color);
  4. }

代码示例来源:origin: openl-tablets/openl-tablets

  1. @Override
  2. public short[] getFillForegroundColor() {
  3. if (hasNoFill()) {
  4. return null;
  5. }
  6. return toRgb(
  7. xlsStyle.getFillForegroundColorColor());
  8. }

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

  1. private String getCellFillBackground(Locator loc) {
  2. Color col = loc.cell.getCellStyle().getFillForegroundColorColor();
  3. return (col instanceof XSSFColor) ? ((XSSFColor)col).getARGBHex() : "NO COLOR";
  4. }

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

  1. System.out.println(cell.getAddress() + ": " + String.valueOf(cell));
  2. CellStyle cellStyle = cell.getCellStyle();
  3. Color color = cellStyle.getFillForegroundColorColor();
  4. if (color != null) {
  5. if (color instanceof XSSFColor) {

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

  1. System.out.print("FG=" + renderColor(style.getFillForegroundColorColor()) + " ");
  2. System.out.print("BG=" + renderColor(style.getFillBackgroundColorColor()) + " ");

代码示例来源:origin: com.ibeetl/xlsunit

  1. co = (XSSFColor) cell.getCellStyle().getFillForegroundColorColor();
  2. }catch(Exception ex){

代码示例来源:origin: org.eobjects.metamodel/MetaModel-excel

  1. Color color = cellStyle.getFillForegroundColorColor();
  2. if (color instanceof HSSFColor) {
  3. short[] triplet = ((HSSFColor) color).getTriplet();

代码示例来源:origin: org.apache.metamodel/MetaModel-excel

  1. Color color = cellStyle.getFillForegroundColorColor();
  2. if (color instanceof HSSFColor) {
  3. short[] triplet = ((HSSFColor) color).getTriplet();

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

  1. Color color = cellStyle.getFillForegroundColorColor();
  2. if (color instanceof HSSFColor) {
  3. short[] triplet = ((HSSFColor) color).getTriplet();

相关文章