borland Packages  Class Hierarchy  jbcl.model Package  Index 

WritableMatrixSelection interface

borland.jbcl.model.MatrixSelection
   +----borland.jbcl.model.WritableMatrixSelection

About the WritableMatrixSelection interface

Methods  

Implemented by BasicMatrixSelection, ColumnMatrixSelection, CrossMatrixSelection, MultiColumnMatrixSelection, MultiRowMatrixSelection, NullMatrixSelection, RowMatrixSelection, SingleMatrixSelection

The WritableMatrixSelection interface provides read-write access to the set of selected locations within a matrix model. Usually it is used to manage the selection set.

Most of the time you will use classes that implement WritableMatrixSelection, such as BasicMatrixSelection, RowMatrixSelection, and SingleMatrixSelection. You can implement the interface directly, however.

If you need read access only to a set of selected locations, you can use the MatrixSelection interface instead.

To add locations to the set of selected locations, use one of the add() methods or the addRange() method. To delete locations, call one of the remove() methods, the removeRange() method, or the removeAll() method.

Set the selection pool to a given set of locations with the set() method.


WritableMatrixSelection methods

Methods defined in this interface

Methods implemented in borland.jbcl.model.MatrixSelection


WritableMatrixSelection methods

add(borland.jbcl.model.MatrixLocation)

  void add(borland.jbcl.model.MatrixLocation location)
Adds the location of a data item in the matrix to the set of selected locations.

Parameters:

location
A MatrixLocation object that identifes the location of the data item.

add(borland.jbcl.model.MatrixLocation[])

  void add(borland.jbcl.model.MatrixLocation[] locations)
Adds multiple locations to the set of selected locations in the matrix.

Parameters:

locations
An array of MatrixLocation objects that specify the locations of data items in the matrix.

add(int, int)

  void add(int row, int column)
Adds the data item at the specified row and column in the matrix to the set of selection locations.

Parameters:

row
A zero-based index that specifies the row the data item is in in the matrix.
column
A zero-based index that specifies the column the data item is in in the matrix.

addRange(borland.jbcl.model.MatrixLocation, borland.jbcl.model.MatrixLocation)

  void addRange(borland.jbcl.model.MatrixLocation begin, borland.jbcl.model.MatrixLocation end)
Adds a range of locations to the set of selected locations. The locations are specified as MatrixLocation objects.

Parameters:

begin
The first location in the range. The location is a zero-based index that indicates the position of the data item in the matrix.
end
The final location in the range.

addRange(int, int, int, int)

  void addRange(int beginRow, int beginColumn, int endRow, int endColumn)
Adds a range of locations to the set of selected locations. The locations are specified as row and column coordinates.

Parameters:

beginRow
A zero-based index that specifies the row where the range of selection locations begins.
beginColumn
A zero-based index that specifies the column where the range of selection locations begins.
endRow
A zero-based index that specifies the row where the range of selection locations ends.
endColumn
A zero-based index that specifies the column where the range of selection locations begins.

enableSelectionEvents(boolean)

  void enableSelectionEvents(boolean enable)
Determines whether the broadcasting of matrix-selection events is enabled or disabled based on the value of the enable parameter.

Parameters:

enable
If enable is true, matrix-selection events are enabled and a SELECTION_CHANGED event is fired to all matrix-selection listeners. If enable is false, all matrix-selection events are disabled.

remove(borland.jbcl.model.MatrixLocation)

  void remove(borland.jbcl.model.MatrixLocation location)
Removes the specified location from the set of selected locations. The location is specified as a MatrixLocation object.

Parameters:

location
A MatrixLocation object that specifies the location of the data object to be removed from the set of selected locations.

remove(borland.jbcl.model.MatrixLocation[])

  void remove(borland.jbcl.model.MatrixLocation[] locations)
Removes a specified array of locations from the set of selected locations.

Parameters:

locations
An array of MatrixLocation objects that specify the locations of the selected data objects in the matrix.

remove(int, int)

  void remove(int row, int column)
Removes the specified location from the set of selected locations. The location is specified using row and column coordinates.

Parameters:

row
A zero-based index that specifies the row where the data object is within the matrix.
column
A zero-based index that specifies the column where the data object is within the matrix.

removeAll()

  void removeAll()
Removes all locations from the set of selected locations.

removeRange(borland.jbcl.model.MatrixLocation, borland.jbcl.model.MatrixLocation)

  void removeRange(borland.jbcl.model.MatrixLocation begin, borland.jbcl.model.MatrixLocation end)
Removes a specified range of locations from the set of selected locations.

Parameters:

begin
The first location in the range. The location is a zero-based index that indicates the position of the data item in the matrix.
end
The final location in the range.

removeRange(int, int, int, int)

  void removeRange(int beginRow, int beginColumn, int endRow, int endColumn)

Parameters:

beginRow
A zero-based index that specifies the row where the range of selection locations begins.
beginColumn
A zero-based index that specifies the column where the range of selection locations begins.
endRow
A zero-based index that specifies the row where the range of selection locations ends.
endColumn
A zero-based index that specifies the column where the range of selection locations begins.

set(borland.jbcl.model.MatrixLocation[])

  void set(borland.jbcl.model.MatrixLocation[] locations)
Sets the selection pool to a given set of locations.

Parameters:

locations
An array of MatrixLocation objects that becomes the new set of selected locations.