C# Class Habanero.Faces.Base.TreeViewController

A controller used to map an IBusinessObjectCollection onto an ITreeView. Each IBusinessObject is displayed as a node in the treeview, and the multiple relationships of the IBusinessObject are displayed as subnodes.
ファイルを表示 Open project: Chillisoft/habanero.faces Class Usage Examples

Protected Properties

Property Type Description
log log4net.ILog

Private Properties

Property Type Description
AddBusinessObjectNode void
AddBusinessObjectToCollectionNode void
AddCollectionNode void
AddRelationshipNode void
BusinessObject_Prop_Updated void
DoSetupNodeWithBusinessObject void
DoSetupNodeWithRelationship void
ExpandLevels void
ExpandNode void
FindPositionIndexOf int
FireBusinessObjectSelected void
GetBusinessObjectNodeState NodeState
GetClassDescription string
GetNodeCollection IBusinessObjectCollection
GetRelationshipDescription string
GetVisibleRelationships IRelationship>.IDictionary
LoadChildNode void
LoadChildrenNodes void
LoadObjectNode void
LoadRelationshipNode void
RefreshBusinessObjectNode void
RegisterForBusinessObjectCollectionEvents void
RegisterForBusinessObjectEvents void
RemoveBusinessObjectFromCollectionNode void
RemoveBusinessObjectNode void
RemoveNode void
RemoveRelationshipNode void
SetupBusinessObjectNode ITreeNode
SetupNode ITreeNode
SetupRelationshipNode ITreeNode
SetupRelationshipNodeDummy void
TreeView_AfterSelect void
TreeView_BeforeExpand void
UnRegisterForBusinessObjectCollectionEvents void
UnRegisterForBusinessObjectEvents void
UpdateBusinessObject void
UpdateNodeDummy void

Public Methods

Method Description
CleanUp ( ) : void

Cleans up the tree view by derigistering for all BusinessObject events and removing all nodes.

GetBusinessObjectTreeNode ( IBusinessObject businessObject ) : ITreeNode

Returns the TreeNode associated with a particular business object.

LoadTreeView ( IBusinessObject businessObject ) : void

Loads the tree view with business object and all child objects.

LoadTreeView ( IBusinessObject businessObject, int levelsToExpand ) : void

Loads the tree view with business object and all child objects. Expands the tree to the specified number of levels deep.

LoadTreeView ( IBusinessObject businessObject, int levelsToExpand, int levelsToDisplay ) : void

Loads the tree view with all the child business objects of the business object. Loads the children of these business objects. The Tree will be expanded only the specified level. The tree will be loaded with child objects only to the number of levelsToDisplay.

LoadTreeView ( IBusinessObjectCollection businessObjectCollection ) : void

Loads the tree view with all the business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only one level.

LoadTreeView ( IBusinessObjectCollection businessObjectCollection, int levelsToExpand ) : void

Loads the tree view with all teh business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only the specified level.

LoadTreeView ( IBusinessObjectCollection businessObjectCollection, int levelsToExpand, int levelsToDisplay ) : void

Loads the tree view with all teh business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only the specified level. The tree will be loaded with child objects only to the number of levelsToDisplay.

LoadTreeView ( IRelationship relationship ) : void

Loads the Tree with all children of this relationship with no levels expanded.

LoadTreeView ( IRelationship relationship, int levelsToExpand ) : void

Loads the Tree with all children of this relationship with specified no levels expanded.

LoadTreeView ( IRelationship relationship, int levelsToExpand, int levelsToDisplay ) : void

Loads the tree view for all objects that are related objects of this relationship. Expands the tree view to the appropriate number of levels. Loads the relationship only to the number of levels specified by levels to display. This ensures that the tree loading can be controlled to only load the required number of children objects.

SelectObject ( IBusinessObject businessObject ) : void

Sets the business object's node as the selected node.

SetVisibility ( IBusinessObject businessObject, bool visible ) : void

Set the visibility for the node associated with a particular business object in the tree view.

TreeViewController ( ITreeView treeView ) : System

Constructs the TreeViewController.

Protected Methods

Method Description
BusinessObjectCollection_ChildAdded ( object sender, Habanero.Base.BOEventArgs e ) : void

Event handler when a Business Object is added to the business object collection

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

Event handler when a Business Object is removed to the business object collection

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

Event handler when a Business Object is deleted

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

Event handler when a Business Object is updated in any way.

MustRelationshipBeVisible ( IRelationship relationship ) : bool

Returns whether the relationship should be shown in the tree view or not.
By default all Composition and Aggregation relationships will be shown in the tree. This method can be overriden to only show the relationships that you want.

Private Methods

Method Description
AddBusinessObjectNode ( ITreeNodeCollection nodes, IBusinessObject businessObject ) : void
AddBusinessObjectToCollectionNode ( IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject ) : void
AddCollectionNode ( ITreeNodeCollection nodeCollection, IBusinessObjectCollection businessObjectCollection ) : void
AddRelationshipNode ( ITreeNodeCollection nodes, IRelationship relationship ) : void
BusinessObject_Prop_Updated ( object sender, Habanero.Base.BOPropUpdatedEventArgs eventArgs1 ) : void
DoSetupNodeWithBusinessObject ( ITreeNode node, IBusinessObject businessObject ) : void
DoSetupNodeWithRelationship ( ITreeNode node, IRelationship relationship ) : void
ExpandLevels ( ITreeNodeCollection nodes, int expandLevels ) : void
ExpandNode ( ITreeNode node ) : void
FindPositionIndexOf ( IBusinessObject businessObject ) : int
FireBusinessObjectSelected ( IBusinessObject businessObject ) : void
GetBusinessObjectNodeState ( IBusinessObject businessObject ) : NodeState
GetClassDescription ( IBusinessObject businessObject ) : string
GetNodeCollection ( ITreeNode node ) : IBusinessObjectCollection
GetRelationshipDescription ( IRelationship relationship ) : string
GetVisibleRelationships ( IBusinessObject businessObject ) : IRelationship>.IDictionary
LoadChildNode ( IRelationship relationship ) : void
LoadChildrenNodes ( ITreeNodeCollection nodes, IBusinessObject parent ) : void
LoadObjectNode ( IBusinessObject businessObject ) : void
LoadRelationshipNode ( IRelationship relationship, ITreeNodeCollection nodes ) : void
RefreshBusinessObjectNode ( IBusinessObject businessObject ) : void
RegisterForBusinessObjectCollectionEvents ( IBusinessObjectCollection businessObjectCollection ) : void
RegisterForBusinessObjectEvents ( IBusinessObject businessObject ) : void
RemoveBusinessObjectFromCollectionNode ( IBusinessObjectCollection businessObjectCollection, IBusinessObject businessObject ) : void
RemoveBusinessObjectNode ( IBusinessObject businessObject ) : void
RemoveNode ( IBusinessObject businessObject, ITreeNode node ) : void
RemoveRelationshipNode ( IRelationship relationship ) : void
SetupBusinessObjectNode ( IBusinessObject businessObject, ITreeNodeCollection nodes ) : ITreeNode
SetupNode ( ITreeNodeCollection nodes, object nodeTag ) : ITreeNode
SetupRelationshipNode ( IRelationship relationship, ITreeNodeCollection nodes ) : ITreeNode
SetupRelationshipNodeDummy ( IRelationship relationship, NodeState nodeState ) : void
TreeView_AfterSelect ( object sender, TreeViewEventArgs e ) : void
TreeView_BeforeExpand ( object sender, TreeViewCancelEventArgs e ) : void
UnRegisterForBusinessObjectCollectionEvents ( IBusinessObjectCollection businessObjectCollection ) : void
UnRegisterForBusinessObjectEvents ( IBusinessObject businessObject ) : void
UpdateBusinessObject ( IBusinessObject businessObject ) : void
UpdateNodeDummy ( NodeState nodeState, int childrenCount ) : void

Method Details

BusinessObjectCollection_ChildAdded() protected method

Event handler when a Business Object is added to the business object collection
protected BusinessObjectCollection_ChildAdded ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object
e Habanero.Base.BOEventArgs
return void

BusinessObjectCollection_ChildRemoved() protected method

Event handler when a Business Object is removed to the business object collection
protected BusinessObjectCollection_ChildRemoved ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object
e Habanero.Base.BOEventArgs
return void

BusinessObject_Deleted() protected method

Event handler when a Business Object is deleted
protected BusinessObject_Deleted ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object
e Habanero.Base.BOEventArgs
return void

BusinessObject_Updated() protected method

Event handler when a Business Object is updated in any way.
protected BusinessObject_Updated ( object sender, Habanero.Base.BOEventArgs e ) : void
sender object
e Habanero.Base.BOEventArgs
return void

CleanUp() public method

Cleans up the tree view by derigistering for all BusinessObject events and removing all nodes.
public CleanUp ( ) : void
return void

GetBusinessObjectTreeNode() public method

Returns the TreeNode associated with a particular business object.
public GetBusinessObjectTreeNode ( IBusinessObject businessObject ) : ITreeNode
businessObject IBusinessObject
return ITreeNode

LoadTreeView() public method

Loads the tree view with business object and all child objects.
public LoadTreeView ( IBusinessObject businessObject ) : void
businessObject IBusinessObject
return void

LoadTreeView() public method

Loads the tree view with business object and all child objects. Expands the tree to the specified number of levels deep.
public LoadTreeView ( IBusinessObject businessObject, int levelsToExpand ) : void
businessObject IBusinessObject
levelsToExpand int
return void

LoadTreeView() public method

Loads the tree view with all the child business objects of the business object. Loads the children of these business objects. The Tree will be expanded only the specified level. The tree will be loaded with child objects only to the number of levelsToDisplay.
public LoadTreeView ( IBusinessObject businessObject, int levelsToExpand, int levelsToDisplay ) : void
businessObject IBusinessObject
levelsToExpand int
levelsToDisplay int
return void

LoadTreeView() public method

Loads the tree view with all the business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only one level.
public LoadTreeView ( IBusinessObjectCollection businessObjectCollection ) : void
businessObjectCollection IBusinessObjectCollection
return void

LoadTreeView() public method

Loads the tree view with all teh business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only the specified level.
public LoadTreeView ( IBusinessObjectCollection businessObjectCollection, int levelsToExpand ) : void
businessObjectCollection IBusinessObjectCollection
levelsToExpand int
return void

LoadTreeView() public method

Loads the tree view with all teh business objects held in the businessObjectCollection. Loads the children of these business objects. The Tree will be expanded only the specified level. The tree will be loaded with child objects only to the number of levelsToDisplay.
public LoadTreeView ( IBusinessObjectCollection businessObjectCollection, int levelsToExpand, int levelsToDisplay ) : void
businessObjectCollection IBusinessObjectCollection
levelsToExpand int
levelsToDisplay int
return void

LoadTreeView() public method

Loads the Tree with all children of this relationship with no levels expanded.
public LoadTreeView ( IRelationship relationship ) : void
relationship IRelationship
return void

LoadTreeView() public method

Loads the Tree with all children of this relationship with specified no levels expanded.
public LoadTreeView ( IRelationship relationship, int levelsToExpand ) : void
relationship IRelationship
levelsToExpand int
return void

LoadTreeView() public method

Loads the tree view for all objects that are related objects of this relationship. Expands the tree view to the appropriate number of levels. Loads the relationship only to the number of levels specified by levels to display. This ensures that the tree loading can be controlled to only load the required number of children objects.
public LoadTreeView ( IRelationship relationship, int levelsToExpand, int levelsToDisplay ) : void
relationship IRelationship
levelsToExpand int
levelsToDisplay int
return void

MustRelationshipBeVisible() protected method

Returns whether the relationship should be shown in the tree view or not.
By default all Composition and Aggregation relationships will be shown in the tree. This method can be overriden to only show the relationships that you want.
protected MustRelationshipBeVisible ( IRelationship relationship ) : bool
relationship IRelationship
return bool

SelectObject() public method

Sets the business object's node as the selected node.
public SelectObject ( IBusinessObject businessObject ) : void
businessObject IBusinessObject
return void

SetVisibility() public method

Set the visibility for the node associated with a particular business object in the tree view.
public SetVisibility ( IBusinessObject businessObject, bool visible ) : void
businessObject IBusinessObject
visible bool
return void

TreeViewController() public method

Constructs the TreeViewController.
public TreeViewController ( ITreeView treeView ) : System
treeView ITreeView The to control/map to
return System

Property Details

log protected_oe static_oe property

Uses for logging
protected static ILog,log4net log
return log4net.ILog