public class DataTable
extends org.zkoss.json.JSONObject
Wrapper of the google.visualization.DataTable JavaScript class provided in Google Charts.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataTable.Column
A column of the
DataTable contents. |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DataTable() |
toJSONString, toJSONString, toString, toStringclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCodefinalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic int getNumberOfColumns()
public int getNumberOfRows()
public Object getValue(int rowIndex, int columnIndex)
rowIndex - should be a number greater than or equal to zero, and less than the number of rows as returned by
the getNumberOfRows() method.columnIndex - should be a number greater than or equal to zero, and less than the number of columns as
returned by the getNumberOfColumns() method.getColumnType(int)):
'string', the value is a String.'number', the value is an Integer.'boolean', the value is a Boolean.'date' or 'datetime', the value is a Date object.'timeofday', the value is an array of four numbers: [hour, minute,
second, milliseconds].null value, an exception is thrown.public void setValue(int rowIndex,
int columnIndex,
Object value)
rowIndex - should be a number greater than or equal to zero, and less than the number of rows as returned by
the getNumberOfRows() method.columnIndex - should be a number greater than or equal to zero, and less than the number of columns as
returned by the getNumberOfColumns() method.value - is the value assigned to the specified cell. The type of the returned value depends on the column
type (see getColumnType(int)):
'string', the value is a String.'number', the value is an Integer.'boolean', the value is a Boolean.'date' or 'datetime', the value is a Date object.'timeofday', the value is an array of four numbers: [hour, minute,
second, milliseconds].null value, an exception is thrown.public DataTable.Column addStringColumn(String label)
public DataTable.Column addNumberColumn(String label)
public DataTable.Column addBooleanColumn(String label)
public DataTable.Column addDateColumn(String label)
public DataTable.Column addDateTimeColumn(String label)
public DataTable.Column addTimeColumn(String label)
public DataTable.Column addColumn(ColumnType type, String label)
public DataTable.Column addStringColumn(String label, String id)
public DataTable.Column addNumberColumn(String label, String id)
public DataTable.Column addBooleanColumn(String label, String id)
public DataTable.Column addDateColumn(String label, String id)
public DataTable.Column addDateTimeColumn(String label, String id)
public DataTable.Column addTimeColumn(String label, String id)
public DataTable.Column addColumn(ColumnType type, String label, String id)
public DataTable.Column addColumn(ColumnType type, ColumnRole role)
public ColumnType getColumnType(int index)
public String getColumnLabel(int index)
public String getColumnId(int index)
public org.zkoss.google.charts.data.DataTable.Row addRow()
public org.zkoss.google.charts.data.DataTable.Row addRow(int index)
public org.zkoss.google.charts.data.DataTable.Row addRow(Object... values)
Copyright © 2016. All Rights Reserved.