C# 클래스 BrightIdeasSoftware.FilterMenuBuilder

Instances of this class know how to build a Filter menu. It is responsible for clustering the values in the target column, build a menu that shows those clusters, and then constructing a filter that will enact the users choices.
Almost all of the methods in this class are declared as "virtual protected" so that subclasses can provide alternative behaviours.
파일 보기 프로젝트 열기: soywiz/cspspemu

공개 프로퍼티들

프로퍼티 타입 설명
APPLY_LABEL string
CLEAR_ALL_FILTERS_LABEL string
ClearFilteringImage System.Drawing.Bitmap
FILTERING_LABEL string
FilteringImage System.Drawing.Bitmap
SELECT_ALL_LABEL string

공개 메소드들

메소드 설명
MakeFilterMenu ( ToolStripDropDown strip, ObjectListView listView, OLVColumn column ) : ToolStripDropDown

Create a Filter menu on the given tool tip for the given column in the given ObjectListView.

This is the main entry point into this class.

보호된 메소드들

메소드 설명
ClearAllFilters ( OLVColumn column ) : void

Clear all the filters that are applied to the given column

Cluster ( IClusteringStrategy strategy, ObjectListView listView, OLVColumn column ) : List

Create a collection of clusters that should be presented to the user

CreateFilteringMenuItem ( OLVColumn column, List clusters ) : ToolStripMenuItem

Do the work of making a menu that shows the clusters to the users

EnactFilter ( BrightIdeasSoftware.ToolStripCheckedListBox checkedList, OLVColumn column ) : void

Apply the selected values from the given list as a filter on the given column

HandleItemChecked ( object sender, System.Windows.Forms.ItemCheckEventArgs e ) : void

Handle a user-generated ItemCheck event

HandleSelectAllItem ( System.Windows.Forms.ItemCheckEventArgs e, BrightIdeasSoftware.ToolStripCheckedListBox checkedList, int selectAllIndex ) : void

Handle any checking/unchecking of the Select All option, and keep its checkedness in sync with everything else that is checked.

SortClusters ( IClusteringStrategy strategy, List clusters ) : void

Order the given list of clusters in the manner in which they should be presented to the user.

비공개 메소드들

메소드 설명
ClusterOneModel ( IClusteringStrategy strategy, ICluster>.NullableDictionary map, object model ) : void
HandleItemCheckedWrapped ( object sender, System.Windows.Forms.ItemCheckEventArgs e ) : void

Wrap a protected section around the real HandleItemChecked method, so that if that method tries to change a "checkedness" of an item, we don't get a recursive stack error. Effectively, this ensure that HandleItemChecked is only called in response to a user action.

메소드 상세

ClearAllFilters() 보호된 메소드

Clear all the filters that are applied to the given column
protected ClearAllFilters ( OLVColumn column ) : void
column OLVColumn The column from which filters are to be removed
리턴 void

Cluster() 보호된 메소드

Create a collection of clusters that should be presented to the user
protected Cluster ( IClusteringStrategy strategy, ObjectListView listView, OLVColumn column ) : List
strategy IClusteringStrategy
listView ObjectListView
column OLVColumn
리턴 List

CreateFilteringMenuItem() 보호된 메소드

Do the work of making a menu that shows the clusters to the users
protected CreateFilteringMenuItem ( OLVColumn column, List clusters ) : ToolStripMenuItem
column OLVColumn
clusters List
리턴 System.Windows.Forms.ToolStripMenuItem

EnactFilter() 보호된 메소드

Apply the selected values from the given list as a filter on the given column
protected EnactFilter ( BrightIdeasSoftware.ToolStripCheckedListBox checkedList, OLVColumn column ) : void
checkedList BrightIdeasSoftware.ToolStripCheckedListBox A list in which the checked items should be used as filters
column OLVColumn The column for which a filter should be generated
리턴 void

HandleItemChecked() 보호된 메소드

Handle a user-generated ItemCheck event
protected HandleItemChecked ( object sender, System.Windows.Forms.ItemCheckEventArgs e ) : void
sender object
e System.Windows.Forms.ItemCheckEventArgs
리턴 void

HandleSelectAllItem() 보호된 메소드

Handle any checking/unchecking of the Select All option, and keep its checkedness in sync with everything else that is checked.
protected HandleSelectAllItem ( System.Windows.Forms.ItemCheckEventArgs e, BrightIdeasSoftware.ToolStripCheckedListBox checkedList, int selectAllIndex ) : void
e System.Windows.Forms.ItemCheckEventArgs
checkedList BrightIdeasSoftware.ToolStripCheckedListBox
selectAllIndex int
리턴 void

MakeFilterMenu() 공개 메소드

Create a Filter menu on the given tool tip for the given column in the given ObjectListView.
This is the main entry point into this class.
public MakeFilterMenu ( ToolStripDropDown strip, ObjectListView listView, OLVColumn column ) : ToolStripDropDown
strip System.Windows.Forms.ToolStripDropDown
listView ObjectListView
column OLVColumn
리턴 System.Windows.Forms.ToolStripDropDown

SortClusters() 보호된 메소드

Order the given list of clusters in the manner in which they should be presented to the user.
protected SortClusters ( IClusteringStrategy strategy, List clusters ) : void
strategy IClusteringStrategy
clusters List
리턴 void

프로퍼티 상세

APPLY_LABEL 공개적으로 정적으로 프로퍼티

Gets or sets the string that labels the Apply button. Exposed so it can be localized.
public static string APPLY_LABEL
리턴 string

CLEAR_ALL_FILTERS_LABEL 공개적으로 정적으로 프로퍼티

Gets or sets the string that labels the Clear All menu item. Exposed so it can be localized.
public static string CLEAR_ALL_FILTERS_LABEL
리턴 string

ClearFilteringImage 공개적으로 정적으로 프로퍼티

Gets or sets the image that will be placed next to the Clear Filtering menu item
public static Bitmap,System.Drawing ClearFilteringImage
리턴 System.Drawing.Bitmap

FILTERING_LABEL 공개적으로 정적으로 프로퍼티

Gets or sets the string that labels the Filtering menu as a whole.. Exposed so it can be localized.
public static string FILTERING_LABEL
리턴 string

FilteringImage 공개적으로 정적으로 프로퍼티

Gets or sets the image that will be placed next to all "Apply" menu items on the filtering menu
public static Bitmap,System.Drawing FilteringImage
리턴 System.Drawing.Bitmap

SELECT_ALL_LABEL 공개적으로 정적으로 프로퍼티

Gets or sets the string that represents Select All values. If this is set to null or empty, no Select All option will be included. Exposed so it can be localized.
public static string SELECT_ALL_LABEL
리턴 string