|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Table
Interface for tables.
Tables have a number of columns, specified with 'column' elements within the Table tag. Each column has a type (string or boolean), an editable flag, and an optional width (0 = as small as possible).
Here's an example table in XML format:
<Table id="nicknames" OnChange="nicknamesChange" OnEditing="nicknamesEditing" OnSelect="nicknamesSelect" Width="200" Rows="4"> <column name="Nickname" type="string" editable="y" width="100"/> <column name="Password" type="string" editable="y"/> <column name="Default" type="boolean" editable="y" width="0"/> </Table>
Nested Class Summary | |
---|---|
static class |
Table.EditingControl
Class passed as part of the onEditing callback. |
Field Summary | |
---|---|
static int |
NONE
Value used to indicate no selection |
Fields inherited from interface com.leafdigital.ui.api.SupportsMacIndent |
---|
TYPE_BUTTON, TYPE_EDIT, TYPE_EDIT_LEGACY, TYPE_NONE |
Method Summary | |
---|---|
int |
addItem()
Adds new item to end of list. |
void |
clear()
Remove all items from list |
boolean |
getBoolean(int index,
int column)
Obtains value at given column. |
int |
getNumItems()
|
int |
getSelectedIndex()
|
int[] |
getSelectedIndices()
|
java.lang.String |
getString(int index,
int column)
Obtains value at given column. |
boolean |
isDim(int index,
int column)
|
boolean |
isEditable(int index,
int column)
|
boolean |
isOverwrite(int index,
int column)
|
void |
removeItem(int index)
Removes item from list. |
void |
setBoolean(int index,
int column,
boolean value)
Sets value at a given column. |
void |
setDim(int index,
int column,
boolean dim)
Sets the dim state of given cell. |
void |
setEditable(int index,
int column,
boolean editable)
Sets the editable state of given cell. |
void |
setMultiSelect(boolean multiSelect)
|
void |
setOnAction(java.lang.String callback)
Sets callback method used when somebody double-clicks or presses Return. |
void |
setOnChange(java.lang.String callback)
Sets the callback method used when user edits something (or, in the case of textfields, finishes editing it). |
void |
setOnEditing(java.lang.String callback)
Sets the callback method used while the user is editing a textfield after each change. |
void |
setOnSelect(java.lang.String callback)
Sets the callback method used when selection changes. |
void |
setOverwrite(int index,
int column,
boolean overwrite)
Sets the overwrite state of given cell (this just means that its text content will be highlighted when you select it). |
void |
setRows(int rows)
Set number of displayed rows. |
void |
setSelectedIndex(int selected)
Sets a single selected row. |
void |
setSelectedIndices(int[] selected)
Sets multiple selected indices. |
void |
setString(int index,
int column,
java.lang.String value)
Sets value at a given column. |
void |
setWidth(int width)
Sets preferred width of table. |
Methods inherited from interface com.leafdigital.ui.api.Widget |
---|
getID, getOwner, informClosed, isVisible, setOwner, setVisible |
Methods inherited from interface com.leafdigital.ui.api.SupportsMacIndent |
---|
setMacIndent, setMacIndent |
Field Detail |
---|
static final int NONE
Method Detail |
---|
int addItem()
void setWidth(int width)
width
- Preferred widthvoid removeItem(int index)
index
- Index of item to remove
BugException
- If index is out of boundsvoid clear()
int getNumItems()
int getSelectedIndex()
BugException
- If MultiSelect="y"void setSelectedIndex(int selected)
selected
- Row to selectint[] getSelectedIndices()
void setSelectedIndices(int[] selected)
selected
- Rows to selectvoid setRows(int rows)
rows
- Number of rowsvoid setString(int index, int column, java.lang.String value)
index
- Index of itemcolumn
- Column indexvalue
- Value at column
BugException
- If index or column are out of bounds, or column
isn't a stringjava.lang.String getString(int index, int column)
index
- Index of itemcolumn
- Column index
BugException
- If index or column are out of bounds, or column
isn't a stringvoid setBoolean(int index, int column, boolean value)
index
- Index of itemcolumn
- Column indexvalue
- Value at column
BugException
- If index or column are out of bounds, or column
isn't correct typeboolean getBoolean(int index, int column)
index
- Index of itemcolumn
- Column index
BugException
- If index or column are out of bounds, or column
isn't correct typevoid setEditable(int index, int column, boolean editable)
index
- Index of itemcolumn
- Column indexeditable
- True to allow edits, false to prohibit
BugException
- If index or column are out of bounds, or column
isn't editableboolean isEditable(int index, int column)
index
- Index of itemcolumn
- Column index
BugException
- If index or column are out of boundsvoid setDim(int index, int column, boolean dim)
index
- Index of itemcolumn
- Column indexdim
- True to make dim, false for normal
BugException
- If index or column are out of boundsboolean isDim(int index, int column)
index
- Index of itemcolumn
- Column index
BugException
- If index or column are out of boundsvoid setOverwrite(int index, int column, boolean overwrite)
index
- Index of itemcolumn
- Column indexoverwrite
- True to turn overwrite on, false to turn it off
BugException
- If index or column are out of bounds, or column
isn't a stringboolean isOverwrite(int index, int column)
index
- Index of itemcolumn
- Column index
BugException
- If index or column are out of bounds or isn't a string@UICallback void setOnChange(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.@UICallback void setOnSelect(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.@UICallback void setOnEditing(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.void setMultiSelect(boolean multiSelect)
multiSelect
- If true, allows multiple rows to be selected@UICallback void setOnAction(java.lang.String callback)
callback
- Name of callback method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |