Class DefaultStyleConverter

  • All Implemented Interfaces:
    ConversionStrategy<org.apache.poi.ss.usermodel.Cell>

    public class DefaultStyleConverter
    extends AbstractConversionStrategy<org.apache.poi.ss.usermodel.Cell>
    Converts font styles and cell colours by default. Extend this class if you want to preseve other cell attributes such as size, word wrap etc.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultStyleConverter()  
      DefaultStyleConverter​(int defaultFontPointSize, int defaultBoldWeight, int defaultFGColor, int defaultBGColor, java.lang.String defaultFont)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void convertColour​(org.apache.poi.xssf.usermodel.XSSFColor c, java.lang.String attr, java.lang.StringBuilder out)  
      protected void extractColourStyle​(org.apache.poi.ss.usermodel.Cell c, java.lang.StringBuilder out)  
      protected void extractFontStyle​(org.apache.poi.ss.usermodel.Cell c, java.lang.StringBuilder out)  
      protected org.apache.poi.ss.usermodel.Font getFont​(org.apache.poi.ss.usermodel.Cell c)  
      protected void handleHiddenCells​(org.apache.poi.ss.usermodel.Cell c, java.lang.StringBuilder out)  
      void process​(org.apache.poi.ss.usermodel.Cell c, HTMLBuilder b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultStyleConverter

        public DefaultStyleConverter​(int defaultFontPointSize,
                                     int defaultBoldWeight,
                                     int defaultFGColor,
                                     int defaultBGColor,
                                     java.lang.String defaultFont)
      • DefaultStyleConverter

        public DefaultStyleConverter()
    • Method Detail

      • process

        public void process​(org.apache.poi.ss.usermodel.Cell c,
                            HTMLBuilder b)
      • handleHiddenCells

        protected void handleHiddenCells​(org.apache.poi.ss.usermodel.Cell c,
                                         java.lang.StringBuilder out)
      • extractColourStyle

        protected void extractColourStyle​(org.apache.poi.ss.usermodel.Cell c,
                                          java.lang.StringBuilder out)
      • convertColour

        protected void convertColour​(org.apache.poi.xssf.usermodel.XSSFColor c,
                                     java.lang.String attr,
                                     java.lang.StringBuilder out)
      • extractFontStyle

        protected void extractFontStyle​(org.apache.poi.ss.usermodel.Cell c,
                                        java.lang.StringBuilder out)
      • getFont

        protected org.apache.poi.ss.usermodel.Font getFont​(org.apache.poi.ss.usermodel.Cell c)