C# Class Habanero.Faces.Base.BOColTabControlManager

This manager groups common logic for IBOColTabControl objects. Do not use this object in working code - rather call CreateBOColTabControl in the appropriate control factory. This Manager is an extract of common functionality required for the IBOColTabControl it is used to as part of the pattern to isolate the implementation of the actual BOColTabControl from the code using the BOColTabControl. This allows the developer to swap IBOColTabControls that support this interface without having to redevelop any code. Habanero uses this to isolate the UIframework so that a different framework can be implemented using these interfaces. This allows swapping in custom controls as well total other control libraries without modifying the app. This allows the Architecture to swap between Visual Web Gui and Windows or in fact between any UI framework and any other UI Framework.
Show file Open project: Chillisoft/habanero.faces Class Usage Examples

Private Properties

Property Type Description
AddTabPage void
BusinessObjectAddedHandler void
BusinessObjectRemovedHandler void
CheckBusinessObjectColNotNull void
CheckBusinessObjectControlSet void
DeregisterForBusinessObjectCollectionEvents void
FireBusinessObjectSelected void
FireTabPageAdded void
FireTabPageRemoved void
HasBOControlOrCreator bool
HasTabPage bool
IndexOutOfRange bool
ReloadCurrentCollection void
TabChangedHandler void

Public Methods

Method Description
BOColTabControlManager ( ITabControl tabControl, IControlFactory controlFactory ) : System

Constructor for the BOColTabControlManager

Clear ( ) : void

Clears the Business Object collection and removes all tab pages.

GetBo ( ITabPage tabPage ) : IBusinessObject

Returns the business object represented in the specified tab page

GetBusinessObjectAtRow ( int row ) : IBusinessObject

Returns the business object at the specified row number

GetTabPage ( IBusinessObject bo ) : ITabPage

Returns the TabPage object that is representing the given business object

TabChanged ( ) : void

When the SelectedTab Changes manages the Logic of setting up the Business Object and the IBusinessObjectControl if appropriate.

Protected Methods

Method Description
AddBoPageIndexing ( IBusinessObject bo, ITabPage page ) : void

Adds the necessagry indexing for a Business Object and TabPage relationship.

AddTabPage ( ITabPage page, IBusinessObject bo ) : void

Adds a tab page to represent the given business object

AddTabPageToEnd ( ITabPage page ) : void

Adds a tab page to the end of the tab order

ClearTabPages ( ) : void

Clears the tab pages

GetBusinessObjectControl ( ITabPage selectedTab ) : IBusinessObjectControl

returns the Business Object control for any particular Tab.

Private Methods

Method Description
AddTabPage ( IBusinessObject bo ) : void
BusinessObjectAddedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

This handler is called when a business object has been added to the collection - it subsequently adds the item to the ListBox list as well.

BusinessObjectRemovedHandler ( object sender, Habanero.Base.BOEventArgs e ) : void

This handler is called when a business object has been removed from the collection - it subsequently removes the item from the ListBox list as well.

CheckBusinessObjectColNotNull ( ) : void
CheckBusinessObjectControlSet ( string methodName ) : void
DeregisterForBusinessObjectCollectionEvents ( ) : void
FireBusinessObjectSelected ( ) : void
FireTabPageAdded ( ITabPage tabPage, IBusinessObjectControl boControl ) : void
FireTabPageRemoved ( ITabPage tabPage, IBusinessObjectControl boControl ) : void
HasBOControlOrCreator ( ) : bool
HasTabPage ( IBusinessObject busObject ) : bool
IndexOutOfRange ( int row ) : bool
ReloadCurrentCollection ( ) : void
TabChangedHandler ( object sender, EventArgs e ) : void

Handles the event that the user chooses a different tab. Calls the TabChanged() method.

Method Details

AddBoPageIndexing() protected method

Adds the necessagry indexing for a Business Object and TabPage relationship.
protected AddBoPageIndexing ( IBusinessObject bo, ITabPage page ) : void
bo IBusinessObject The Business Object related to the Tab Page
page ITabPage The Tab Page related to the Business Object
return void

AddTabPage() protected method

Adds a tab page to represent the given business object
protected AddTabPage ( ITabPage page, IBusinessObject bo ) : void
page ITabPage The TabPage object to add
bo IBusinessObject The business ojbect to represent
return void

AddTabPageToEnd() protected method

Adds a tab page to the end of the tab order
protected AddTabPageToEnd ( ITabPage page ) : void
page ITabPage The Tab Page to be added to the Tab Control
return void

BOColTabControlManager() public method

Constructor for the BOColTabControlManager
public BOColTabControlManager ( ITabControl tabControl, IControlFactory controlFactory ) : System
tabControl ITabControl
controlFactory IControlFactory
return System

Clear() public method

Clears the Business Object collection and removes all tab pages.
public Clear ( ) : void
return void

ClearTabPages() protected method

Clears the tab pages
protected ClearTabPages ( ) : void
return void

GetBo() public method

Returns the business object represented in the specified tab page
public GetBo ( ITabPage tabPage ) : IBusinessObject
tabPage ITabPage The tab page
return IBusinessObject

GetBusinessObjectAtRow() public method

Returns the business object at the specified row number
public GetBusinessObjectAtRow ( int row ) : IBusinessObject
row int The row number in question
return IBusinessObject

GetBusinessObjectControl() protected method

returns the Business Object control for any particular Tab.
protected GetBusinessObjectControl ( ITabPage selectedTab ) : IBusinessObjectControl
selectedTab ITabPage
return IBusinessObjectControl

GetTabPage() public method

Returns the TabPage object that is representing the given business object
public GetTabPage ( IBusinessObject bo ) : ITabPage
bo IBusinessObject The business object being represented
return ITabPage

TabChanged() public method

When the SelectedTab Changes manages the Logic of setting up the Business Object and the IBusinessObjectControl if appropriate.
public TabChanged ( ) : void
return void