Class XlsxColumn

All Implemented Interfaces:
Serializable, Identified
Direct Known Subclasses:
XlsxColumnBoolean, XlsxColumnClob, XlsxColumnDate, XlsxColumnFormula, XlsxColumnLong, XlsxColumnLookup, XlsxColumnSpan, XlsxColumnSurveyQuestion, XlsxColumnSwitch

@Component public class XlsxColumn extends XlsxCell
This class extends XlsxCell.
The class implement the text column with left alignment.
See Also:
  • Field Details

    • _group

      protected boolean _group
    • _titlespan

      protected int _titlespan
    • _breakFunction

      protected String _breakFunction
    • _breakFormat

      protected IXlsxFormat _breakFormat
    • _breakCellFormatClass

      protected String _breakCellFormatClass
    • _forcedBkgColor

      protected boolean _forcedBkgColor
    • _forcedFontVariant

      protected boolean _forcedFontVariant
    • forcedComment

      protected boolean forcedComment
    • forcedFillPattern

      protected boolean forcedFillPattern
    • _bkgColorName

      protected String _bkgColorName
    • _fontVariantName

      protected String _fontVariantName
    • commentName

      protected String commentName
    • fillPatternName

      protected String fillPatternName
    • _tmBkgColorSwitch

      protected TreeMap _tmBkgColorSwitch
    • _tmFontVariantSwitch

      protected TreeMap _tmFontVariantSwitch
    • tmCommentSwitch

      protected TreeMap tmCommentSwitch
    • tmFillPatternSwitch

      protected TreeMap tmFillPatternSwitch
    • _stylesMap

      protected HashMap<String,org.apache.poi.xssf.usermodel.XSSFCellStyle> _stylesMap
    • _ffFontVariantSwitch

      protected ForeignField _ffFontVariantSwitch
    • ffCommentSwitch

      protected ForeignField ffCommentSwitch
    • ffFillPatternSwitch

      protected ForeignField ffFillPatternSwitch
    • _ffBkgColorSwitch

      protected ForeignField _ffBkgColorSwitch
    • _ffName

      protected ForeignField _ffName
    • _ffGroup

      protected ForeignField _ffGroup
  • Constructor Details

    • XlsxColumn

      public XlsxColumn()
  • Method Details

    • setCOLUMNSPAN

      public void setCOLUMNSPAN(String s)
      Sets the column Span size.
      Parameters:
      s - The size to set as column span.
    • setHEADVISIBLE

      public void setHEADVISIBLE(String s)
      By setting this to true the values of the column are hidden, but not the title
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0").
      If the string is not recognized as a boolean value, it will be used the default value, that is true
    • setTITLESPAN

      public void setTITLESPAN(String s)
      Sets the title span.
      Parameters:
      s - The title to set.
    • getTitleSpan

      public int getTitleSpan()
      Gets the title span.
      Returns:
      The Title span.
    • setGROUPNAME

      public void setGROUPNAME(String s)
      Sets a name to the datas group.
      Parameters:
      s - The name to set.
    • setBREAKFUNCTION

      public void setBREAKFUNCTION(String s)
      Sets the break function.
      Parameters:
      s - The function to set.
    • setBREAKCELLFORMATCLASS

      public void setBREAKCELLFORMATCLASS(String s)
      Sets the format class to the break cells.
      Parameters:
      s - The format class to set.
    • setBKGCOLORNAME

      public void setBKGCOLORNAME(String s)
      Sets the bkg color.
      Parameters:
      s - The bkg color to set.
    • setBKGCOLORSWITCH

      public void setBKGCOLORSWITCH(String s)
      Sets differents bkg color which can be selected by switch.
      Parameters:
      s - The list with the color to set.
    • setFONTVARIANTNAME

      public void setFONTVARIANTNAME(String s)
      Sets the font variant name.
      Parameters:
      s - The font name to set.
    • setFONTVARIANTSWITCH

      public void setFONTVARIANTSWITCH(String s)
      Sets differents variant font which can be selected by switch.
      Parameters:
      s - The list with the font to set.
    • setCOMMENTNAME

      public void setCOMMENTNAME(String s)
      Sets the comment name.
      Parameters:
      s - The comment name to set.
    • setCOMMENTSWITCH

      public void setCOMMENTSWITCH(String s)
      Sets differents variant comment which can be selected by switch.
      Parameters:
      s - The list with the comment to set.
    • setFILLPATTERNNAME

      public void setFILLPATTERNNAME(String s)
      Sets the fill pattern name.
      Parameters:
      s - The fill pattern name to set.
    • setFILLPATTERNSWITCH

      public void setFILLPATTERNSWITCH(String s)
      Sets differents variant fill pattern which can be selected by switch.
      Parameters:
      s - The list with the fill pattern to set.
    • setHEADERCOLOR

      public void setHEADERCOLOR(String s)
      Sets the color of the column header
      Parameters:
      s - The color to set.
    • getHeaderColor

      public org.apache.poi.xssf.usermodel.XSSFColor getHeaderColor()
      Returns:
      The column header XSSFColor active.
    • setHEADERFONTCOLOR

      public void setHEADERFONTCOLOR(String s)
      Sets the font color of the column header
      Parameters:
      s - The font color to set.
    • getHeaderFontColor

      public org.apache.poi.xssf.usermodel.XSSFColor getHeaderFontColor()
      Returns:
      The column header font XSSFColor active.
    • isHeaderNOTVisible

      public boolean isHeaderNOTVisible()
      Gets if the column header is visible or not.
      Returns:
      true if the column header is visible, false otherwise.
    • isGroup

      public boolean isGroup()
      Gets if the column is grouped or not.
      Returns:
      true if the column is grouped, false otherwise
    • getDBVFieldPos

      public int getDBVFieldPos()
    • setupMetaData

      public void setupMetaData(DBView dbv)
      Method used for the field init starting from the DBView. The name of the column must be null in case the field is not in the DBView or in the ResultSet.
      Parameters:
      dbv - The DBView for the init
    • initFormat

      public void initFormat()
      Initialize the break Format of the column.
    • setupMetaData

      public void setupMetaData(HashMap dbfields)
      Method used for the field init starting from a resultSet. The name of the column must be null in case the field is not in the DBView or in the ResultSet.
      Parameters:
      dbfields - The HashMap for the init
    • setLABEL

      public void setLABEL(String s)
      Sets the label of the column
      Overrides:
      setLABEL in class XlsxComponent
      Parameters:
      s - String containing the label to set
    • setGROUP

      public void setGROUP(String s)
      Allow the possibility to grouped a column.
      Parameters:
      s - 'true' or '1' to set the possibility to make a group, 'false' or '0' otherwise.
    • getCell

      public org.apache.poi.ss.usermodel.Cell getCell(org.apache.poi.ss.usermodel.Sheet sheet, ArrayList row, int rowNum, int cellNum) throws Exception, DAValidateException
      Description copied from class: XlsxCell
      Gets Cell style of a specific cell defined by row and column passed by input.
      Overrides:
      getCell in class XlsxCell
      Parameters:
      sheet - The sheet
      row - The Array list with the sheet's row
      rowNum - The row number of the cell
      cellNum - The column number of the cell
      Returns:
      A Cell style of a specific cell defined by row and column passed by input.
      Throws:
      Exception - should not happend
      DAValidateException - should not happend
    • giveCell

      protected org.apache.poi.ss.usermodel.Cell giveCell(org.apache.poi.ss.usermodel.Sheet sheet, ArrayList row, int rowNum, int colNum, org.apache.poi.xssf.usermodel.XSSFCellStyle cs)
      Description copied from class: XlsxCell
      Method to implement that allows to set the orientation, the font etc
      Specified by:
      giveCell in class XlsxCell
      Parameters:
      sheet - The sheet
      row - The list of rows
      rowNum - The number of row
      colNum - The cell number
      cs - The XSSFCellStyle
      Returns:
      The cell
    • setForcedStyle

      protected void setForcedStyle(org.apache.poi.ss.usermodel.Sheet s, org.apache.poi.ss.usermodel.Cell c, Teacher t, ArrayList row, int rowNum, String val, String defval, org.apache.poi.xssf.usermodel.XSSFCellStyle cs, int format)
    • getForcedColor

      protected String getForcedColor(Teacher t, ArrayList row, String val, String defval, org.apache.poi.xssf.usermodel.XSSFCellStyle cs)
    • getForcedFontVariant

      protected String getForcedFontVariant(Teacher t, ArrayList row, String val, String defval)
    • getForcedComment

      protected String getForcedComment(Teacher t, ArrayList row, String val, String defval)
    • getForcedFillPattern

      protected int getForcedFillPattern(Teacher t, ArrayList row, String val, String defval)
    • parseFunction

      protected String parseFunction(ArrayList row, int startRow, int endRow, int curRow, int colNum)
    • getBreakCell

      public org.apache.poi.ss.usermodel.Cell getBreakCell(org.apache.poi.ss.usermodel.Sheet sheet, ArrayList row, int rowNum, int colNum, int startRow, int breakFieldPos) throws Exception
      Returns the break Cell.
      Parameters:
      sheet - The Excel sheet
      row - ArrayList with the rows
      rowNum - Number of the current row
      colNum - Number of the column
      startRow - Starting breaking row
      breakFieldPos - Position of the breaking field
      Returns:
      The break Cell.
      Throws:
      Exception - if an error occurs
      DAValidateException - if an error occurs during the data validation
    • setGroup

      protected org.apache.poi.ss.usermodel.Cell setGroup(ArrayList row, org.apache.poi.ss.usermodel.Cell cell, int rowNum, int cellNum) throws DAValidateException
      Throws:
      DAValidateException
    • groupCell

      public org.apache.poi.ss.usermodel.Cell groupCell(int rowNum, int cellNum) throws DAValidateException
      Throws:
      DAValidateException
    • makeCellStyle

      protected org.apache.poi.xssf.usermodel.XSSFCellStyle makeCellStyle(org.apache.poi.ss.usermodel.Sheet sheet, XlsxComponent cella, org.apache.poi.xssf.usermodel.XSSFFont font, boolean pari, boolean bold, boolean italic, org.apache.poi.xssf.usermodel.XSSFColor textColor)