C# Class ZForge.Controls.XPTable.Models.TableModel.Selection

Represents the collection of selected Rows and Cells in a TableModel.
Datei anzeigen Open project: zhuangyy/Motion

Public Methods

Method Description
AddCell ( 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 ( CellPos start, 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 ( 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 ( 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 ( 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 ( CellPos start, 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 ( 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 ( CellPos start, 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

Method Description
CalcSelectionBounds ( int start, int end ) : Rectangle

Returns a Rectange that bounds the currently selected Rows

InternalAddCells ( CellPos start, 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 ( CellPos start, 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

RemoveRow ( int row ) : void

Removes the specified Row from selection

Method Details

AddCell() public method

Adds the Cell at the specified row and column indicies to the current selection
public AddCell ( CellPos cellPos ) : void
cellPos CellPos A CellPos that specifies the Cell to add to the selection
return void

AddCell() public method

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
return void

AddCells() public method

Adds the Cells located between the specified start and end CellPos to the current selection
public AddCells ( CellPos start, CellPos end ) : void
start CellPos A CellPos that specifies the start Cell
end CellPos A CellPos that specifies the end Cell
return void

AddCells() public method

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
return void

AddShiftSelectedCell() public method

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 ( CellPos cellPos ) : void
cellPos CellPos A CellPos that specifies the shift selected Cell
return void

AddShiftSelectedCell() public method

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
return void

Clear() public method

Removes all selected Rows and Cells from the selection
public Clear ( ) : void
return void

IsCellSelected() public method

Returns whether the Cell at the specified CellPos is currently selected
public IsCellSelected ( CellPos cellPos ) : bool
cellPos CellPos A CellPos the represents the row and column indicies /// of the Cell to check
return bool

IsCellSelected() public method

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
return bool

IsRowSelected() public method

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
return bool

RemoveCell() public method

Removes the Cell at the specified row and column indicies from the current selection
public RemoveCell ( CellPos cellPos ) : void
cellPos CellPos A CellPos that specifies the Cell to remove from the selection
return void

RemoveCell() public method

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
return void

RemoveCells() public method

Removes the Cells located between the specified start and end CellPos from the current selection
public RemoveCells ( CellPos start, CellPos end ) : void
start CellPos A CellPos that specifies the start Cell
end CellPos A CellPos that specifies the end Cell
return void

RemoveCells() public method

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
return void

SelectCell() public method

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

SelectCell() public method

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
return void

SelectCells() public method

Replaces the currently selected Cells with the Cells located between the specified start and end CellPos
public SelectCells ( CellPos start, CellPos end ) : void
start CellPos A CellPos that specifies the start Cell
end CellPos A CellPos that specifies the end Cell
return void

SelectCells() public method

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
return void

Selection() public method

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
return System