C# Class ZForge.Controls.XPTable.Sorting.SorterBase

Base class for the sorters used to sort the Cells contained in a TableModel
Afficher le fichier Open project: zhuangyy/Motion

Méthodes publiques

Méthode Description
Sort ( ) : void

Starts sorting the Cells in the TableModel

SorterBase ( TableModel tableModel, int column, IComparer comparer, SortOrder sortOrder ) : System

Initializes a new instance of the SorterBase class with the specified TableModel, Column index, IComparer and SortOrder

Méthodes protégées

Méthode Description
Compare ( Row row1, Row row2 ) : int

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Takes into account the sort order.

CompareRows ( Row row1, Row row2 ) : int

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Compares the given rows without considering parent/sub-rows.

CompareRows ( Row row1, Row row2, int column, IComparer comparer ) : int

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Compares the given rows without considering parent/sub-rows.

Set ( int a, Row row ) : void

Replaces the Row in the TableModel located at index a with the specified Row

Set ( int a, int b ) : void

Replaces the Row in the TableModel located at index a with the Row located at index b

Swap ( int a, int b ) : void

Swaps the Rows in the TableModel at the specified indexes

Method Details

Compare() protected méthode

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Takes into account the sort order.
protected Compare ( Row row1, Row row2 ) : int
row1 ZForge.Controls.XPTable.Models.Row First row to compare
row2 ZForge.Controls.XPTable.Models.Row Second row to compare
Résultat int

CompareRows() protected méthode

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Compares the given rows without considering parent/sub-rows.
protected CompareRows ( Row row1, Row row2 ) : int
row1 ZForge.Controls.XPTable.Models.Row
row2 ZForge.Controls.XPTable.Models.Row
Résultat int

CompareRows() protected méthode

Compares two rows and returns a value indicating whether one is less than, equal to or greater than the other. Compares the given rows without considering parent/sub-rows.
protected CompareRows ( Row row1, Row row2, int column, IComparer comparer ) : int
row1 ZForge.Controls.XPTable.Models.Row
row2 ZForge.Controls.XPTable.Models.Row
column int
comparer IComparer
Résultat int

Set() protected méthode

Replaces the Row in the TableModel located at index a with the specified Row
protected Set ( int a, Row row ) : void
a int The index of the Row that will be replaced
row ZForge.Controls.XPTable.Models.Row The Row that will be moved to index a
Résultat void

Set() protected méthode

Replaces the Row in the TableModel located at index a with the Row located at index b
protected Set ( int a, int b ) : void
a int The index of the Row that will be replaced
b int The index of the Row that will be moved to index a
Résultat void

Sort() public abstract méthode

Starts sorting the Cells in the TableModel
public abstract Sort ( ) : void
Résultat void

SorterBase() public méthode

Initializes a new instance of the SorterBase class with the specified TableModel, Column index, IComparer and SortOrder
public SorterBase ( TableModel tableModel, int column, IComparer comparer, SortOrder sortOrder ) : System
tableModel ZForge.Controls.XPTable.Models.TableModel The TableModel that contains the data to be sorted
column int The index of the Column to be sorted
comparer IComparer The IComparer used to sort the Column's Cells
sortOrder SortOrder Specifies how the Column is to be sorted
Résultat System

Swap() protected méthode

Swaps the Rows in the TableModel at the specified indexes
protected Swap ( int a, int b ) : void
a int The index of the first Row to be swapped
b int The index of the second Row to be swapped
Résultat void