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

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

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

XSSFColor.getTheme介绍

[英]Index into the collection, referencing a particular or value expressed in the Theme part.
[中]索引到集合中,引用主题部分中表达的特定或值。

代码示例

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

  1. private boolean sameTheme(XSSFColor other) {
  2. if (isThemed() == other.isThemed()) {
  3. return !isThemed() || getTheme() == other.getTheme();
  4. }
  5. return false;
  6. }
  7. private boolean sameTint(XSSFColor other) {

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

  1. /**
  2. * If the colour is based on a theme, then inherit
  3. * information (currently just colours) from it as
  4. * required.
  5. */
  6. @Override
  7. public void inheritFromThemeAsRequired(XSSFColor color) {
  8. if(color == null) {
  9. // Nothing for us to do
  10. return;
  11. }
  12. if(! color.getCTColor().isSetTheme()) {
  13. // No theme set, nothing to do
  14. return;
  15. }
  16. // Get the theme colour
  17. XSSFColor themeColor = getThemeColor(color.getTheme());
  18. // Set the raw colour, not the adjusted one
  19. // Do a raw set, no adjusting at the XSSFColor layer either
  20. color.getCTColor().setRgb(themeColor.getCTColor().getRgb());
  21. // All done
  22. }

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

  1. private boolean sameTheme(XSSFColor other) {
  2. if (isThemed() == other.isThemed()) {
  3. return !isThemed() || getTheme() == other.getTheme();
  4. }
  5. return false;
  6. }
  7. private boolean sameTint(XSSFColor other) {

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

  1. public Color getAwtColor(XSSFColor color) {
  2. if(color == null){
  3. return Color.BLACK;
  4. }
  5. if (color.getRgb() != null) {
  6. return new Color(ByteBuffer.wrap(color.getRgb()).getInt(), true);
  7. }
  8. else {
  9. if(color.getIndexed() == 64){
  10. return Color.BLACK;
  11. }
  12. return getAwtColor(color.getTheme(), color.getTint());
  13. }
  14. }

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

  1. /**
  2. * If the colour is based on a theme, then inherit
  3. * information (currently just colours) from it as
  4. * required.
  5. */
  6. @Override
  7. public void inheritFromThemeAsRequired(XSSFColor color) {
  8. if(color == null) {
  9. // Nothing for us to do
  10. return;
  11. }
  12. if(! color.getCTColor().isSetTheme()) {
  13. // No theme set, nothing to do
  14. return;
  15. }
  16. // Get the theme colour
  17. XSSFColor themeColor = getThemeColor(color.getTheme());
  18. // Set the raw colour, not the adjusted one
  19. // Do a raw set, no adjusting at the XSSFColor layer either
  20. color.getCTColor().setRgb(themeColor.getCTColor().getRgb());
  21. // All done
  22. }

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

  1. /**
  2. * If the colour is based on a theme, then inherit
  3. * information (currently just colours) from it as
  4. * required.
  5. */
  6. public void inheritFromThemeAsRequired(XSSFColor color) {
  7. if(color == null) {
  8. // Nothing for us to do
  9. return;
  10. }
  11. if(! color.getCTColor().isSetTheme()) {
  12. // No theme set, nothing to do
  13. return;
  14. }
  15. // Get the theme colour
  16. XSSFColor themeColor = getThemeColor(color.getTheme());
  17. // Set the raw colour, not the adjusted one
  18. // Do a raw set, no adjusting at the XSSFColor layer either
  19. color.getCTColor().setRgb(themeColor.getCTColor().getRgb());
  20. // All done
  21. }
  22. }

相关文章