Name |
Table表格对象 |
||||||||||||||||||||||||||||||||||||||||||||||
Examples |
Table table;
void setup() {
table = new Table();
table.addColumn(“id”); table.addColumn(“species”); table.addColumn(“name”);
TableRow newRow = table.addRow(); newRow.setInt(“id”, table.lastRowIndex()); newRow.setString(“species”, “Panthera leo”); newRow.setString(“name”, “Lion”);
saveTable(table, “data/new.csv”); }
// Sketch saves the following to a file called “new.csv”: // id,species,name // 0,Panthera leo,Lion |
||||||||||||||||||||||||||||||||||||||||||||||
Description |
Table objects store data with multiple rows and columns, much like in a traditional spreadsheet. Tables can be generated from scratch, dynamically, or using data from an existing file. Tables can also be output and saved to disk, as in the example above. Additional Table methods are documented in the Processing Table Javadoc. table 对象存储具有多行和多列的数据, 就像在传统的电子表格中一样。可以从头开始、动态地或使用现有文件中的数据生成表。表也可以输出并保存到磁盘, 如上面的示例所示。
在处理表 javadoc 中记录了其他表方法。 |
||||||||||||||||||||||||||||||||||||||||||||||
Methods |
|
||||||||||||||||||||||||||||||||||||||||||||||
Constructor |
Table() Table(rows) |
||||||||||||||||||||||||||||||||||||||||||||||
Related |
loadTable() |
- 本文固定链接: http://iprocessing.cn/2017/07/20/table表格对象/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表