insertRow

A selection event is not fired, even if the selection changes, e.g. if the row
inserted caused the selection index or indicies to change. If you need to fire a
selection change, you may do so by calling the method fireRowSelection().

Note: a warning message is logged if the operation fails.

Note 2: the operation will fail if any of the fields in the array
are not new instances from a "new" or "clone" operation. This means that
they cannot have been attached to a VS container previously.

Parameters:

fields - The row of fields to add as an array.

before - The row index that will these fields will be inserted before,
-1 to add last in table.

Returns:

The VSRow inserted if successful, null for failure.

insertRow

A selection event is not fired, even if the selection changes, e.g. if the row
inserted caused the selection index or indicies to change. If you need to fire a
selection change, you may do so by calling the method fireRowSelection().

Note: a warning message is logged if the operation fails.

Note 2: the operation will fail if the values do not correspond to the column
header field settings, i.e. null allowed and the value type of the column.

Parameters:

values - The row of values to add as an array.

before - The row index that will these fields will be inserted before,
-1 to add last in table.

setSelection

Selection processing is done in the following way:
- select the new row index,
- unselect the other rows, starting with the first to last row.

This makes it possible to know if there are no selections
remaining at an "unselection event".

Parameters:

index - The selected row index, or any negative value (e.g. -1) to clear the selection.

trigger - The trigger of the selection, null for none.

Returns:

true for success, false if the table is not of single or multiple selection type.
In case of false return code, no selection or unselection is performed.

setSelection

public boolean setSelection(int[] indicies)

Sets the selection indicies without trigger component.

Selection processing is done in the following way:
- select the new row indicies,
- unselect the other rows, starting with the first to last row.

This makes it possible to know if there are no selections
remaining at an "unselection event".

Parameters:

indicies - The selected row indicies.

Returns:

true for success, false if the table is not of single or multiple selection type.
false is also returned if the length of the indicies is longer than one and the
table is of single selection type (regardless if the same index is specified twice).
In case of false return code, no selection or unselection is performed.

setSelection

Selection processing is done in the following way:
- select the new row indicies,
- unselect the other rows, starting with the first to last row.

This makes it possible to know if there are no selections
remaining at an "unselection event".

Parameters:

indicies - The selected row indicies.

trigger - The trigger of the selection, null for none.

Returns:

true for success, false if the table is not of single or multiple selection type.
false is also returned if the length of the indicies is longer than one and the
table is of single selection type (regardless if the same index is specified twice).
In case of false return code, no selection or unselection is performed.

fireRowSelection

Fires the current row selection to listeners if the table is of single or multiple selection.
If no change of selection is present, nothing will be done.

refreshContentProviders

public int refreshContentProviders()

Refreshes all connected content providers. Use this method typically when a content provider
that is connected to the VS table needs to be refreshed because it e.g. would produce a different
result due to values or states outside of the VS table scope or that there are items not connected
to VS fields or rows in the table.

The method fires the onStateChanged(this,State.CONTENT_PROVIDER_REFRESH,false) event
to all table listeners.