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

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

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

XSSFColor.getIndexed介绍

[英]Indexed ctColor value. Only used for backwards compatibility. References a ctColor in indexedColors.
[中]索引颜色值。仅用于向后兼容。在IndexedColor中引用ctColor。

代码示例

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

  1. private short getIndexedColor(XSSFColor color) {
  2. return color == null ? 0 : color.getIndexed();
  3. }

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

  1. public short getFillBackgroundColor() {
  2. XSSFColor color = getFillBackgroundColorColor();
  3. if (color == null) return 0;
  4. return color.getIndexed();
  5. }
  6. public short getFillForegroundColor() {

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

  1. public short getFillForegroundColor() {
  2. XSSFColor color = getFillForegroundColorColor();
  3. if (color == null) return 0;
  4. return color.getIndexed();
  5. }

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

  1. private boolean sameIndexed(XSSFColor other) {
  2. if (isIndexed() == other.isIndexed()) {
  3. return !isIndexed() || getIndexed() == other.getIndexed();
  4. }
  5. return false;
  6. }
  7. private boolean sameARGB(XSSFColor other) {

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

  1. /**
  2. * Get the color to use for the bottom border
  3. * <br>
  4. * Color is optional. When missing, IndexedColors.AUTOMATIC is implied.
  5. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
  6. * @see org.apache.poi.ss.usermodel.IndexedColors
  7. */
  8. @Override
  9. public short getBottomBorderColor() {
  10. XSSFColor clr = getBottomBorderXSSFColor();
  11. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  12. }

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

  1. /**
  2. * Get the color to use for the top border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. @Override
  8. public short getTopBorderColor() {
  9. XSSFColor clr = getTopBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }

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

  1. /**
  2. * Get the color to use for the left border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. @Override
  8. public short getLeftBorderColor() {
  9. XSSFColor clr = getLeftBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }

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

  1. /**
  2. * Get the color to use for the right border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. @Override
  8. public short getRightBorderColor() {
  9. XSSFColor clr = getRightBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }
  12. /**

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

  1. /**
  2. * Get the background fill color.
  3. * <p>
  4. * Note - many cells are actually filled with a foreground
  5. * fill, not a background fill - see {@link #getFillForegroundColor()}
  6. * </p>
  7. * @return fill color, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
  8. * @see org.apache.poi.ss.usermodel.IndexedColors
  9. */
  10. @Override
  11. public short getFillBackgroundColor() {
  12. XSSFColor clr = getFillBackgroundXSSFColor();
  13. return clr == null ? IndexedColors.AUTOMATIC.getIndex() : clr.getIndexed();
  14. }

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

  1. /**
  2. * Get the foreground fill color.
  3. * <p>
  4. * Many cells are filled with this, instead of a
  5. * background color ({@link #getFillBackgroundColor()})
  6. * </p>
  7. * @see IndexedColors
  8. * @return fill color, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
  9. */
  10. @Override
  11. public short getFillForegroundColor() {
  12. XSSFColor clr = getFillForegroundXSSFColor();
  13. return clr == null ? IndexedColors.AUTOMATIC.getIndex() : clr.getIndexed();
  14. }

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

  1. public short getFillForegroundColor() {
  2. XSSFColor color = getFillForegroundColorColor();
  3. if (color == null) return 0;
  4. return color.getIndexed();
  5. }

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

  1. public short getFillBackgroundColor() {
  2. XSSFColor color = getFillBackgroundColorColor();
  3. if (color == null) return 0;
  4. return color.getIndexed();
  5. }
  6. public short getFillForegroundColor() {

代码示例来源:origin: pentaho/pentaho-reporting

  1. public short getNearestColor( final Color awtColor ) {
  2. XSSFColor color = new XSSFColor( awtColor );
  3. return color.getIndexed();
  4. }
  5. }

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

  1. private boolean sameIndexed(XSSFColor other) {
  2. if (isIndexed() == other.isIndexed()) {
  3. return !isIndexed() || getIndexed() == other.getIndexed();
  4. }
  5. return false;
  6. }
  7. private boolean sameARGB(XSSFColor other) {

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

  1. /**
  2. * Get the color to use for the bottom border
  3. * <br>
  4. * Color is optional. When missing, IndexedColors.AUTOMATIC is implied.
  5. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
  6. * @see org.apache.poi.ss.usermodel.IndexedColors
  7. */
  8. @Override
  9. public short getBottomBorderColor() {
  10. XSSFColor clr = getBottomBorderXSSFColor();
  11. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  12. }

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

  1. /**
  2. * Get the color to use for the bottom border
  3. * <br/>
  4. * Color is optional. When missing, IndexedColors.AUTOMATIC is implied.
  5. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
  6. * @see org.apache.poi.ss.usermodel.IndexedColors
  7. */
  8. public short getBottomBorderColor() {
  9. XSSFColor clr = getBottomBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }

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

  1. /**
  2. * Get the color to use for the left border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. public short getLeftBorderColor() {
  8. XSSFColor clr = getLeftBorderXSSFColor();
  9. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  10. }

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

  1. /**
  2. * Get the color to use for the right border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. public short getRightBorderColor() {
  8. XSSFColor clr = getRightBorderXSSFColor();
  9. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  10. }
  11. /**

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

  1. /**
  2. * Get the color to use for the left border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. @Override
  8. public short getLeftBorderColor() {
  9. XSSFColor clr = getLeftBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }

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

  1. /**
  2. * Get the color to use for the top border
  3. *
  4. * @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#BLACK}
  5. * @see org.apache.poi.ss.usermodel.IndexedColors
  6. */
  7. @Override
  8. public short getTopBorderColor() {
  9. XSSFColor clr = getTopBorderXSSFColor();
  10. return clr == null ? IndexedColors.BLACK.getIndex() : clr.getIndexed();
  11. }

相关文章