Constructor | |
Not available. Object is created by method newTable() of class WServer or by method get(...) of class WTableList. | |
Methods | |
int |
addCol(int s) Creates the table column. Parameters: s - the column size [in characters] Returns: 0 if the column is created successfully; -1 otherwise |
int |
addRow() Creates the table row. Returns: 0 if the row is created successfully; -1 otherwise |
String |
get(int r, int c) Gets the value of the field. Parameters: r - the row number c - the column number Returns: a String that represents the value; empty String if Row/Col are incorrect |
int |
set(int r, int c, String v) Sets the value to the field. Parameters: r - the row number c - the column number v - the value to assign Returns: 0 if the value is assigned successfully; -1 otherwise |
int |
getNRows() Returns number of rows in the table. |
int |
getNCols() Returns number of columns in the table. |
void |
setMultiple() Sets the "multiple" property, so the table can be used in html code <select ... multiple>...</select> to manage several items selected. |
void |
setRow(int r) Sets the "selected" property on, so the table can be used in html code <select ... >...</select> to manage the item selected. Parameters: r - the row number [0,1,2,...] |
void |
setColParam(int c, String p) Sets the parameter for specified column, so the table can be used in html code <table><tr><td p> ... </td></tr></table>. Parameters: c - the column number [0,1,2,...] p - the html table column parameter Example: setColParam(0,"style='width:100px; background-color:red; text-align:right;'"); |
Example | |
api_WTable.java |