Class XlsxCell

All Implemented Interfaces:
Serializable, Identified
Direct Known Subclasses:
XlsxColumn

public abstract class XlsxCell extends XlsxComponent implements Identified
This class extends XlsxComponent and implements Identified.
This class is used to represent the cell of an Excel sheet.
See Also:
  • Field Details

    • _endfunction

      protected String _endfunction
    • _endLabel

      protected String _endLabel
    • _size

      protected int _size
    • _fixedsize

      protected int _fixedsize
    • _lines4Row

      protected int _lines4Row
    • _delim

      protected String _delim
    • _columnspan

      protected int _columnspan
    • _cellstyle

      protected org.apache.poi.xssf.usermodel.XSSFCellStyle _cellstyle
  • Constructor Details

    • XlsxCell

      public XlsxCell()
  • Method Details

    • getColumnSpan

      public int getColumnSpan()
      Gets column span of the instance.
      Returns:
      Column span of the instance.
    • setSIZE

      public void setSIZE(String s)
      Sets a default fixed dimension in all the column
      Parameters:
      s - The fixed dimension
    • setSize

      public void setSize(int size)
      Sets the dimension for the instance
      Parameters:
      size - The dimension for the instance
    • getSize

      public int getSize()
      Gets the dimension of the instance
      Returns:
      The dimension of the instance
    • getFixedSize

      public int getFixedSize()
      Gets the fixed size of the instance.
      Returns:
      The fixed size of the instance.
    • setENDFUNCTION

      public void setENDFUNCTION(String s)
      Sets a function as the last cell of the table specified as StandardFunction
      Parameters:
      s - The function as the last cell of the table specified as StandardFunction
    • getEndFunction

      public String getEndFunction()
      Gets the end function that is the last cell of the table specified as StandardFunction
      Returns:
      The end function that is the last cell of the table specified as StandardFunction
    • setENDLABEL

      public void setENDLABEL(String s)
      Sets a label at the end of the table on the last cell.
      Parameters:
      s - The label to set at the end of the table on the last cell.
    • getEndLabel

      public String getEndLabel()
      Gets the end label of the table.
      Returns:
      The end label of the table.
    • setLINES4ROW

      public void setLINES4ROW(String lines4Row)
      Sets the number of lines in a cell, and so in the relative row
      Parameters:
      lines4Row - The number of lines in a cell, and so in the relative row
    • setLines4Row

      public void setLines4Row(int lines4Row)
      Sets the number of lines in a cell, and so in the relative row
      Parameters:
      lines4Row - The number of lines in a cell, and so in the relative row
    • getLines4Row

      public int getLines4Row()
      Gets the number of lines in a cell now active.
      Returns:
      The number of lines in a cell now active.
    • setDELIM

      public void setDELIM(String delim)
      Sets the line delimiter inside a cell
      Parameters:
      delim - The line delimiter
    • getDELIM

      public String getDELIM()
      Gets the line delimiter inside a cell
      Returns:
      The line delimiter
    • setFONTSIZE

      public void setFONTSIZE(String fontSize)
      Description copied from class: XlsxComponent
      Sets the font size.
      Overrides:
      setFONTSIZE in class XlsxComponent
      Parameters:
      fontSize - The size to set.
    • setBorder

      public void setBorder(String b)
      Description copied from class: XlsxComponent
      Sets the border to the component.
      Overrides:
      setBorder in class XlsxComponent
      Parameters:
      b - The border to set.
    • setUseBGColor

      public void setUseBGColor(boolean b)
      Description copied from class: XlsxComponent
      Sets if you want to use bg format color.
      Overrides:
      setUseBGColor in class XlsxComponent
      Parameters:
      b - true to use the bg format color,false 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
      Gets Cell style of a specific cell defined by row and column passed by input.
      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
    • setAutoSize4Lines

      public void setAutoSize4Lines(String s, String delim)
      Sets the same lenght/width of the cell of the lines in the string s
      Parameters:
      s - The lines
      delim - The line delimiter
    • countBreakLines

      public static int countBreakLines(String s, String delim)
    • setSheet

      public void setSheet(org.apache.poi.ss.usermodel.Sheet sheet)
      Description copied from class: XlsxComponent
      Sets the active Sheet.
      Overrides:
      setSheet in class XlsxComponent
      Parameters:
      sheet - The Sheet to set.
    • giveCell

      protected abstract org.apache.poi.ss.usermodel.Cell giveCell(org.apache.poi.ss.usermodel.Sheet sheet, ArrayList row, int rowNum, int cellNum, org.apache.poi.xssf.usermodel.XSSFCellStyle cs)
      Method to implement that allows to set the orientation, the font etc
      Parameters:
      sheet - The sheet
      row - The list of rows
      rowNum - The number of row
      cellNum - The cell number
      cs - The XSSFCellStyle
      Returns:
      The cell