Class TableInfo
java.lang.Object
ro.sync.ecss.extensions.commons.table.operations.TableInfo
- All Implemented Interfaces:
Serializable
Contains information about the table element
(number of rows, columns, table title).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Default number of columnsstatic final int
Default number of columns for DITA choice table.static final int
Default number of columns for Properties tablestatic final int
Default number of rowsstatic final int
Maximum number of columns for CALS and simple tables.static final int
Maximum number of columns for CALS and simple tables.static final int
Minimum number of columns for CALS and simple tables.static final int
Minimum number of columns for CALS and simple tables.static final int
Minimum number of rows.static final int
Constant for CALS table model.static final int
Constant for custom table model specific for a document type (proprietary table model).static final int
The choice table model for DITA.static final int
The properties table model for DITA.static final int
The simple table model for DITA.static final int
Constant for HTML table model.static final int
Constant for no table model. -
Constructor Summary
ConstructorsConstructorDescriptionTableInfo
(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel) Constructor.TableInfo
(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel, TableCustomizerConstants.ColumnWidthsType columnsWidthsType, String rowsep, String colsep, String align) Constructor.Deprecated.Constructs a table info from a map that contains the values of its fields. -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
Obtain the value for the alignment attribute.Obtain the value for the column separator attribute.int
Return the number of columns.getFrame()
Obtain the value for the row separator attribute.int
Return the number of rows.int
getTitle()
Returns the title of the table.boolean
boolean
toString()
-
Field Details
-
TABLE_MODEL_NONE
public static final int TABLE_MODEL_NONEConstant for no table model.- See Also:
-
TABLE_MODEL_HTML
public static final int TABLE_MODEL_HTMLConstant for HTML table model.- See Also:
-
TABLE_MODEL_CALS
public static final int TABLE_MODEL_CALSConstant for CALS table model.- See Also:
-
TABLE_MODEL_CUSTOM
public static final int TABLE_MODEL_CUSTOMConstant for custom table model specific for a document type (proprietary table model).- See Also:
-
TABLE_MODEL_DITA_SIMPLE
public static final int TABLE_MODEL_DITA_SIMPLEThe simple table model for DITA.- See Also:
-
TABLE_MODEL_DITA_CHOICE
public static final int TABLE_MODEL_DITA_CHOICEThe choice table model for DITA.- See Also:
-
TABLE_MODEL_DITA_PROPERTIES
public static final int TABLE_MODEL_DITA_PROPERTIESThe properties table model for DITA.- See Also:
-
MIN_ROWS_COUNT
public static final int MIN_ROWS_COUNTMinimum number of rows.- See Also:
-
DEFAULT_ROWS_COUNT
public static final int DEFAULT_ROWS_COUNTDefault number of rows- See Also:
-
DEFAULT_COLUMNS_COUNT_CHOICE_TABLE
public static final int DEFAULT_COLUMNS_COUNT_CHOICE_TABLEDefault number of columns for DITA choice table.- See Also:
-
DEFAULT_COLUMNS_COUNT
public static final int DEFAULT_COLUMNS_COUNTDefault number of columns- See Also:
-
DEFAULT_COLUMNS_COUNT_PROPERTIES_TABLE
public static final int DEFAULT_COLUMNS_COUNT_PROPERTIES_TABLEDefault number of columns for Properties table- See Also:
-
MIN_COLUMNS_COUNT
public static final int MIN_COLUMNS_COUNTMinimum number of columns for CALS and simple tables.- See Also:
-
MIN_COLUMNS_COUNT_PROPERTIES_TABLE
public static final int MIN_COLUMNS_COUNT_PROPERTIES_TABLEMinimum number of columns for CALS and simple tables.- See Also:
-
MAX_COLUMNS_COUNT
public static final int MAX_COLUMNS_COUNTMaximum number of columns for CALS and simple tables.- See Also:
-
MAX_COLUMNS_COUNT_PROPERTIES_TABLE
public static final int MAX_COLUMNS_COUNT_PROPERTIES_TABLEMaximum number of columns for CALS and simple tables.- See Also:
-
-
Constructor Details
-
TableInfo
public TableInfo(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel) Constructor.- Parameters:
title
- The table title.rowsNumber
- The number of rows.columnsNumber
- The number of columns.generateHeader
- Iftrue
generate table header.generateFooter
- Iftrue
generate table footer.frame
- Specifies how the table is to be framed.tableModel
- The table model type. One of the constants:TABLE_MODEL_CALS
,TABLE_MODEL_CUSTOM
,TABLE_MODEL_DITA_SIMPLE
,TABLE_MODEL_HTML
,TABLE_MODEL_DITA_CHOICE
,TABLE_MODEL_DITA_PROPERTIES
.
-
TableInfo
public TableInfo(String title, int rowsNumber, int columnsNumber, boolean generateHeader, boolean generateFooter, String frame, int tableModel, TableCustomizerConstants.ColumnWidthsType columnsWidthsType, String rowsep, String colsep, String align) Constructor.- Parameters:
title
- The table title.rowsNumber
- The number of rows.columnsNumber
- The number of columns.generateHeader
- Iftrue
generate table header.generateFooter
- Iftrue
generate table footer.frame
- Specifies how the table is to be framed.tableModel
- The table model type. One of the constants:TABLE_MODEL_CALS
,TABLE_MODEL_CUSTOM
,TABLE_MODEL_DITA_SIMPLE
,TABLE_MODEL_HTML
,TABLE_MODEL_DITA_CHOICE
,TABLE_MODEL_DITA_PROPERTIES
.columnsWidthsType
- The columns widths type.rowsep
- Specifies the row separator value.colsep
- Specifies the column separator valuealign
- Specifies the alignment for the current table.
-
TableInfo
Constructs a table info from a map that contains the values of its fields.- Parameters:
fieldValues
- The map that contains the values for the operation fields.rows
- If greater than 0, the enforced number of rows, used when the user converts a list with that many items to a table. If 0 or negative, it is ignored.
-
TableInfo
Deprecated.UseTableInfo(Map, int)
instead because the table operation can also convert lists to tables and we need to provide a minimum number of rows.Constructs a table info from a map that contains the values of its fields.- Parameters:
fieldValues
- The map that contains the values for the operation fields.
-
-
Method Details
-
getTitle
Returns the title of the table.- Returns:
- The title of the table.
-
getRowsNumber
public int getRowsNumber()Return the number of rows.- Returns:
- The number of rows.
-
getColumnsNumber
public int getColumnsNumber()Return the number of columns.- Returns:
- The number of columns.
-
isGenerateHeader
public boolean isGenerateHeader()- Returns:
- If
true
then table header will be generated.
-
getFrame
- Returns:
- Specifies the table frame.
-
getRowsep
Obtain the value for the row separator attribute.- Returns:
- Specifies the row separator value.
-
getColsep
Obtain the value for the column separator attribute.- Returns:
- Specifies the column separator value.
-
getAlign
Obtain the value for the alignment attribute.- Returns:
- Specifies the alignment value.
-
getTableModel
public int getTableModel()- Returns:
- Returns the table model.
One of the constants:
TABLE_MODEL_CALS
,TABLE_MODEL_CUSTOM
,TABLE_MODEL_DITA_SIMPLE
,TABLE_MODEL_HTML
,TABLE_MODEL_DITA_CHOICE
,TABLE_MODEL_DITA_PROPERTIES
.
-
getColumnsWidthsType
- Returns:
- Returns the columns widths type(proportional, fixed, dynamic).
-
toString
-
TableInfo(Map, int)
instead because the table operation can also convert lists to tables and we need to provide a minimum number of rows.