poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1177410 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
Date Thu, 29 Sep 2011 19:40:47 GMT
Author: nick
Date: Thu Sep 29 19:40:47 2011
New Revision: 1177410

URL: http://svn.apache.org/viewvc?rev=1177410&view=rev
Log:
Add a method to HSSFFont to get the color, similar to the XSSF one

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java?rev=1177410&r1=1177409&r2=1177410&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java Thu Sep 29 19:40:47 2011
@@ -18,6 +18,7 @@
 package org.apache.poi.hssf.usermodel;
 
 import org.apache.poi.hssf.record.FontRecord;
+import org.apache.poi.hssf.util.HSSFColor;
 import org.apache.poi.ss.usermodel.Font;
 
 /**
@@ -191,6 +192,15 @@ public final class HSSFFont implements F
     {
         return font.getColorPaletteIndex();
     }
+    
+    /**
+     * get the color value for the font
+     */
+    public HSSFColor getHSSFColor(HSSFWorkbook wb)
+    {
+       HSSFPalette pallette = wb.getCustomPalette();
+       return pallette.getColor( getColor() );
+    }
 
     /**
      * set the boldness to use



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message