C# Class XPTable.Models.TableModel.Selection

Represents the collection of selected Rows and Cells in a TableModel.
Afficher le fichier Open project: binaryage/xrefresh

Méthodes publiques

Méthode Description
AddCell ( XPTable.Models.CellPos cellPos ) : void

Adds the Cell at the specified row and column indicies to the current selection

AddCell ( int row, int column ) : void

Adds the Cell at the specified row and column indicies to the current selection

AddCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void

Adds the Cells located between the specified start and end CellPos to the current selection

AddCells ( int startRow, int startColumn, int endRow, int endColumn ) : void

Adds the Cells located between the specified start and end row/column indicies to the current selection

AddShiftSelectedCell ( XPTable.Models.CellPos cellPos ) : void

Adds the Cells between the last selection start Cell and the Cell at the specified CellPas to the current selection. Any Cells that are between the last start and end Cells that are not in the new area are removed from the current selection

AddShiftSelectedCell ( int row, int column ) : void

Adds the Cells between the last selection start Cell and the Cell at the specified row/column indicies to the current selection. Any Cells that are between the last start and end Cells that are not in the new area are removed from the current selection

Clear ( ) : void

Removes all selected Rows and Cells from the selection

IsCellSelected ( XPTable.Models.CellPos cellPos ) : bool

Returns whether the Cell at the specified CellPos is currently selected

IsCellSelected ( int row, int column ) : bool

Returns whether the Cell at the specified row and column indicies is currently selected

IsRowSelected ( int index ) : bool

Returns whether the Row at the specified index in th TableModel is currently selected

RemoveCell ( XPTable.Models.CellPos cellPos ) : void

Removes the Cell at the specified row and column indicies from the current selection

RemoveCell ( int row, int column ) : void

Removes the Cell at the specified row and column indicies from the current selection

RemoveCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void

Removes the Cells located between the specified start and end CellPos from the current selection

RemoveCells ( int startRow, int startColumn, int endRow, int endColumn ) : void

Removes the Cells located between the specified start and end row/column indicies from the current selection

SelectCell ( XPTable.Models.CellPos cellPos ) : void

Replaces the currently selected Cells with the Cell at the specified CellPos

SelectCell ( int row, int column ) : void

Replaces the currently selected Cells with the Cell at the specified row and column indexes

SelectCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void

Replaces the currently selected Cells with the Cells located between the specified start and end CellPos

SelectCells ( int startRow, int startColumn, int endRow, int endColumn ) : void

Replaces the currently selected Cells with the Cells located between the specified start and end row/column indicies

Selection ( TableModel owner ) : System

Initializes a new instance of the TableModel.Selection class that belongs to the specified TableModel

Private Methods

Méthode Description
CalcSelectionBounds ( int start, int end ) : Rectangle

Returns a Rectange that bounds the currently selected Rows

InternalAddCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : bool

Adds the Cells located between the specified start and end CellPos to the current selection without raising an event

InternalAddCells ( int startRow, int startColumn, int endRow, int endColumn ) : bool

Adds the Cells located between the specified start and end row/column indicies to the current selection without raising an event

InternalClear ( ) : void

Removes all selected Rows and Cells from the selection without raising an event

InternalRemoveCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : bool

Removes the Cells located between the specified start and end CellPos from the current selection without raising an event

InternalRemoveCells ( int startRow, int startColumn, int endRow, int endColumn ) : bool

Removes the Cells located between the specified start and end row/column indicies from the current selection without raising an event

Normalise ( int &a, int &b ) : void

Ensures that the first index is smaller than the second index, performing a swap if necessary

RemoveRow ( Row row ) : void

Removes the specified Row from the selection

Method Details

AddCell() public méthode

Adds the Cell at the specified row and column indicies to the current selection
public AddCell ( XPTable.Models.CellPos cellPos ) : void
cellPos XPTable.Models.CellPos A CellPos that specifies the Cell to add to the selection
Résultat void

AddCell() public méthode

Adds the Cell at the specified row and column indicies to the current selection
public AddCell ( int row, int column ) : void
row int The row index of the Cell to add to the selection
column int The column index of the Cell to add to the selection
Résultat void

AddCells() public méthode

Adds the Cells located between the specified start and end CellPos to the current selection
public AddCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void
start XPTable.Models.CellPos A CellPos that specifies the start Cell
end XPTable.Models.CellPos A CellPos that specifies the end Cell
Résultat void

AddCells() public méthode

Adds the Cells located between the specified start and end row/column indicies to the current selection
public AddCells ( int startRow, int startColumn, int endRow, int endColumn ) : void
startRow int The row index of the start Cell
startColumn int The column index of the start Cell
endRow int The row index of the end Cell
endColumn int The column index of the end Cell
Résultat void

AddShiftSelectedCell() public méthode

Adds the Cells between the last selection start Cell and the Cell at the specified CellPas to the current selection. Any Cells that are between the last start and end Cells that are not in the new area are removed from the current selection
public AddShiftSelectedCell ( XPTable.Models.CellPos cellPos ) : void
cellPos XPTable.Models.CellPos A CellPos that specifies the shift selected Cell
Résultat void

AddShiftSelectedCell() public méthode

Adds the Cells between the last selection start Cell and the Cell at the specified row/column indicies to the current selection. Any Cells that are between the last start and end Cells that are not in the new area are removed from the current selection
public AddShiftSelectedCell ( int row, int column ) : void
row int The row index of the shift selected Cell
column int The column index of the shift selected Cell
Résultat void

Clear() public méthode

Removes all selected Rows and Cells from the selection
public Clear ( ) : void
Résultat void

IsCellSelected() public méthode

Returns whether the Cell at the specified CellPos is currently selected
public IsCellSelected ( XPTable.Models.CellPos cellPos ) : bool
cellPos XPTable.Models.CellPos A CellPos the represents the row and column indicies /// of the Cell to check
Résultat bool

IsCellSelected() public méthode

Returns whether the Cell at the specified row and column indicies is currently selected
public IsCellSelected ( int row, int column ) : bool
row int The row index of the specified Cell
column int The column index of the specified Cell
Résultat bool

IsRowSelected() public méthode

Returns whether the Row at the specified index in th TableModel is currently selected
public IsRowSelected ( int index ) : bool
index int The index of the Row to check
Résultat bool

RemoveCell() public méthode

Removes the Cell at the specified row and column indicies from the current selection
public RemoveCell ( XPTable.Models.CellPos cellPos ) : void
cellPos XPTable.Models.CellPos A CellPos that specifies the Cell to remove from the selection
Résultat void

RemoveCell() public méthode

Removes the Cell at the specified row and column indicies from the current selection
public RemoveCell ( int row, int column ) : void
row int The row index of the Cell to remove from the selection
column int The column index of the Cell to remove from the selection
Résultat void

RemoveCells() public méthode

Removes the Cells located between the specified start and end CellPos from the current selection
public RemoveCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void
start XPTable.Models.CellPos A CellPos that specifies the start Cell
end XPTable.Models.CellPos A CellPos that specifies the end Cell
Résultat void

RemoveCells() public méthode

Removes the Cells located between the specified start and end row/column indicies from the current selection
public RemoveCells ( int startRow, int startColumn, int endRow, int endColumn ) : void
startRow int The row index of the start Cell
startColumn int The column index of the start Cell
endRow int The row index of the end Cell
endColumn int The column index of the end Cell
Résultat void

SelectCell() public méthode

Replaces the currently selected Cells with the Cell at the specified CellPos
public SelectCell ( XPTable.Models.CellPos cellPos ) : void
cellPos XPTable.Models.CellPos A CellPos thst specifies the row and column indicies of /// the Cell to be selected
Résultat void

SelectCell() public méthode

Replaces the currently selected Cells with the Cell at the specified row and column indexes
public SelectCell ( int row, int column ) : void
row int The row index of the Cell to be selected
column int The column index of the Cell to be selected
Résultat void

SelectCells() public méthode

Replaces the currently selected Cells with the Cells located between the specified start and end CellPos
public SelectCells ( XPTable.Models.CellPos start, XPTable.Models.CellPos end ) : void
start XPTable.Models.CellPos A CellPos that specifies the start Cell
end XPTable.Models.CellPos A CellPos that specifies the end Cell
Résultat void

SelectCells() public méthode

Replaces the currently selected Cells with the Cells located between the specified start and end row/column indicies
public SelectCells ( int startRow, int startColumn, int endRow, int endColumn ) : void
startRow int The row index of the start Cell
startColumn int The column index of the start Cell
endRow int The row index of the end Cell
endColumn int The column index of the end Cell
Résultat void

Selection() public méthode

Initializes a new instance of the TableModel.Selection class that belongs to the specified TableModel
public Selection ( TableModel owner ) : System
owner TableModel A TableModel representing the tableModel that owns /// the Selection
Résultat System