public class Table
extends java.lang.Object
| Constructor and Description |
|---|
Table()
Create empty table
|
Table(NXCPMessage msg)
Create table from data in NXCP message
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(Table src)
Append all records from given table to this table.
|
void |
addDataFromMessage(NXCPMessage msg)
Add data from additional messages
|
void |
addRow()
Add new row
|
void |
fillMessage(NXCPMessage msg)
Fill NXCP message with table's data
|
java.lang.Object[] |
getAllRows()
Get all rows as an array of List
|
java.lang.String |
getCell(int row,
int column)
Get cell value at given row and column
|
int |
getColumnCount()
Get number of columns in table
|
int[] |
getColumnDataTypes()
Get display names of all columns
|
TableColumnDefinition |
getColumnDefinition(int column)
Get column definition
|
java.lang.String |
getColumnDisplayName(int column)
Get column display name
|
java.lang.String[] |
getColumnDisplayNames()
Get display names of all columns
|
int |
getColumnFormat(int column)
Deprecated.
|
int |
getColumnIndex(java.lang.String name)
Get column index by name
|
java.lang.String |
getColumnName(int column)
Get column name
|
TableColumnDefinition[] |
getColumns()
Get names of all columns
|
java.util.List<java.lang.String> |
getRow(int row)
Get row.
|
int |
getRowCount()
Get number of rows in table
|
int |
getSource() |
java.lang.String |
getTitle() |
void |
setCell(int row,
int col,
java.lang.String value)
Set cell value
|
void |
setSource(int source) |
void |
setTitle(java.lang.String title) |
java.lang.String |
toString() |
public Table()
public Table(NXCPMessage msg)
msg - NXCP messagepublic void addDataFromMessage(NXCPMessage msg)
msg - public void fillMessage(NXCPMessage msg)
msg - NXCP messagepublic int getColumnCount()
public int getRowCount()
public TableColumnDefinition getColumnDefinition(int column) throws java.lang.IndexOutOfBoundsException
column - Column index (zero-based)java.lang.IndexOutOfBoundsException - if column index is out of range (column < 0 || column >= getColumnCount())public java.lang.String getColumnName(int column)
throws java.lang.IndexOutOfBoundsException
column - Column index (zero-based)java.lang.IndexOutOfBoundsException - if column index is out of range (column < 0 || column >= getColumnCount())public java.lang.String getColumnDisplayName(int column)
throws java.lang.IndexOutOfBoundsException
column - Column index (zero-based)java.lang.IndexOutOfBoundsException - if column index is out of range (column < 0 || column >= getColumnCount())@Deprecated
public int getColumnFormat(int column)
throws java.lang.IndexOutOfBoundsException
column - Column index (zero-based)java.lang.IndexOutOfBoundsException - if column index is out of range (column < 0 || column >= getColumnCount())public int getColumnIndex(java.lang.String name)
name - Column namepublic TableColumnDefinition[] getColumns()
public java.lang.String getCell(int row,
int column)
throws java.lang.IndexOutOfBoundsException
row - Row index (zero-based)column - Column index (zero-based)java.lang.IndexOutOfBoundsException - if column index is out of range (column < 0 || column >= getColumnCount())
or row index is out of range (row < 0 || row >= getRowCount())public java.util.List<java.lang.String> getRow(int row)
throws java.lang.IndexOutOfBoundsException
row - Row index (zero-based)java.lang.IndexOutOfBoundsException - if row index is out of range (row < 0 || row >= getRowCount())public java.lang.Object[] getAllRows()
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the title to setpublic java.lang.String toString()
toString in class java.lang.Objectpublic void addAll(Table src)
src - source tablepublic void addRow()
public void setCell(int row,
int col,
java.lang.String value)
row - col - value - public int getSource()
public void setSource(int source)
source - the source to setpublic java.lang.String[] getColumnDisplayNames()
public int[] getColumnDataTypes()
Copyright © 2013. All Rights Reserved.