Class NodeDataTable


  • public final class NodeDataTable
    extends NodeElement
    Defines a data table that displays data in a tabular form. You must set the number of columns before adding row data.
    Since:
    1.2.0
    • Constructor Detail

      • NodeDataTable

        public NodeDataTable()
        Constructs a new NodeDataTable with empty data.
    • Method Detail

      • getTextColor

        public java.lang.String getTextColor()
        Returns text color in hex.
      • setTextColor

        public void setTextColor​(java.lang.String textColor)
        Sets text color.
        Parameters:
        textColor - a color in hex
      • getBorderColor

        public java.lang.String getBorderColor()
        Returns border color of the table in hex.
      • setBorderColor

        public void setBorderColor​(java.lang.String borderColor)
        Sets border color.
        Parameters:
        borderColor - a color in hex
      • getRowSeparatorColor

        public java.lang.String getRowSeparatorColor()
        Returns the row separator color in hex.
      • setRowSeparatorColor

        public void setRowSeparatorColor​(java.lang.String rowSeparatorColor)
        Sets the row separator color in hex.
        Parameters:
        rowSeparatorColor - a color in hex
      • getColumnSeparatorColor

        public java.lang.String getColumnSeparatorColor()
        Returns the column separator color in hex.
      • setColumnSeparatorColor

        public void setColumnSeparatorColor​(java.lang.String columnSeparatorColor)
        Sets the column separator color in hex.
        Parameters:
        columnSeparatorColor - a color in hex
      • getNumberOfColumns

        public int getNumberOfColumns()
        Returns the total number of columns.
      • setNumberOfColumns

        public void setNumberOfColumns​(int numberOfColumns)
        Sets the total number of columns.
        Parameters:
        numberOfColumns - a non-negative integer for number of columns.
      • getColumnsWidth

        public int[] getColumnsWidth()
        Returns an array of the columns width.
      • setColumnsWidth

        public void setColumnsWidth​(int[] columnsWidth)
        Sets the width for each data table column. The array size must equal the total number of columns.
        Parameters:
        columnsWidth - an array of integer for each column.
      • addRowData

        public void addRowData​(java.lang.String... cellDatas)
        Adds row data for each row. Data can include strings, a field path, or a combination of both. When entering a field path, you must follow this pattern: ${fieldPath} Do not include table path. Example: - Fixed string: "Name". - Field path: "${/group1/label}". - Combination of string and field path: "Name: ${/group1/label}"
        Parameters:
        cellDatas - an array of string data for each column.