C# Class Habanero.Faces.Base.PanelBuilder

Builds an IPanelInfo that has the information required to link the IPanel built by the Panel Builder to the IBusinessObject with a certain layout (as defined by the LayoutManager (Currently Only the GridLayoutManager can be used).
The IPanel Built by the PanelBuilder has all the controls required for a IBusinessObject to be viewed and edited in. The Controls to be used are defind in the UIFormTab or the UIForm depending on whether the BuildPanelForForm(IUIForm) or BuildPanelForTab method is used.

The PanelBuilder can create a panel for any environment based on the implementation of IControlFactory that is passed through in the constructor.

Once the panel has been constructed, you will need to assign the instance of the business object. See IPanelInfo for these options. Once editing is completed, you will need to persist the changes. First call ApplyChangesToBusinessObject on the IPanelInfo object, and then carry out persistence on the BusinessObject.
Show file Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
BuildPanelForForm ( IUIForm uiForm ) : IPanelInfo

Constructs a panel for editing the data of a single instance of a BusinessObject, using the control layout as specified in a UIForm object.

BuildPanelForForm ( IUIForm uiForm, GroupControlCreator groupControlCreator ) : IPanelInfo

Builds a Panel for a single Tab as defined in the UIForm. There will be one IPanelInfo for the defined uiForm.
If there are multiple tabs defined for the uiForm then an actual ITabPage is created for each UIFormTab and the IPanel created by BuildPanelForTab will be placed on this TabPage.

Else the IPanel is placed on the form directly.

BuildPanelForTab ( UIFormTab formTab ) : IPanelInfo

Constructs a panel for editing the data of a single instance of a BusinessObject, using the control layout as specified in a UIFormTab object.

CreateOnePanelPerUIFormTab ( IUIForm uiForm ) : List

Creates one panel for each UI Form definition of a business object

GetAlignmentValue ( string alignmentValue ) : HorizontalAlignment

Checks if the alignment value is valid

PanelBuilder ( IControlFactory controlFactory ) : System

Creates the panel Builder with the IControlFactory to be used by the panel builder for buiding the controls.

Private Methods

Method Description
AddComboBoxItems ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
AddControlsForField ( Habanero.BO.ClassDefinition.UIFormField formField, IPanelInfo panelInfo ) : PanelInfo.FieldInfo
AddDecimalPlacesToNumericUpDown ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
AddEmailFunctionalityToTextBox ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
AddFieldsToLayoutManager ( UIFormTab formTab, IPanelInfo panelInfo ) : void
AddMultiLineTextbox ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
AddNullControlsForEmptyField ( IPanelInfo panelInfo ) : void
ConfigureInputControl ( Habanero.BO.ClassDefinition.UIFormField formField, IControlMapper &controlMapper ) : IControlHabanero
CreateAndAddErrorProviderPanel ( IPanelInfo panelInfo, Habanero.BO.ClassDefinition.UIFormField formField ) : void
CreateAndAddGroupBox ( IPanelInfo panelInfo, Habanero.BO.ClassDefinition.UIFormField formField ) : IControlHabanero
CreateAndAddInputControl ( IPanelInfo panelInfo, Habanero.BO.ClassDefinition.UIFormField formField ) : IControlMapper
CreateAndAddInputControlToContainerControl ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero containerControl ) : IControlMapper
CreateAndAddLabel ( IPanelInfo panelInfo, Habanero.BO.ClassDefinition.UIFormField formField ) : ILabel
EmailTextBoxDoubleClickedHandler ( object sender, EventArgs e ) : void

A handler to deal with a double-click on an email textbox, which causes the default mail client on the user system to be opened

EnsureControlNameUnique ( IControlHabanero labelControl, IControlHabanero containerControl ) : void
GetClassDef ( Habanero.BO.ClassDefinition.UIFormField formField ) : IClassDef
IsEmailAddress ( string text ) : bool
SetInputControlAlignment ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
SetInputControlNumLines ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero inputControl ) : void
SetToolTip ( Habanero.BO.ClassDefinition.UIFormField formField, IControlHabanero control ) : void
SetupInputControlColumnWidth ( IPanelInfo panelInfo, IUIFormTab formTab ) : void
SetupLayoutManager ( UIFormTab formTab, IPanel panel ) : GridLayoutManager

Method Details

BuildPanelForForm() public method

Constructs a panel for editing the data of a single instance of a BusinessObject, using the control layout as specified in a UIForm object.
public BuildPanelForForm ( IUIForm uiForm ) : IPanelInfo
uiForm IUIForm The UIForm object that indicates which controls /// to create and how the controls are laid out
return IPanelInfo

BuildPanelForForm() public method

Builds a Panel for a single Tab as defined in the UIForm. There will be one IPanelInfo for the defined uiForm.
If there are multiple tabs defined for the uiForm then an actual ITabPage is created for each UIFormTab and the IPanel created by BuildPanelForTab will be placed on this TabPage.

Else the IPanel is placed on the form directly.
public BuildPanelForForm ( IUIForm uiForm, GroupControlCreator groupControlCreator ) : IPanelInfo
uiForm IUIForm The UIForm object that indicates which controls /// to create and how the controls are laid out
groupControlCreator GroupControlCreator The
return IPanelInfo

BuildPanelForTab() public method

Constructs a panel for editing the data of a single instance of a BusinessObject, using the control layout as specified in a UIFormTab object.
public BuildPanelForTab ( UIFormTab formTab ) : IPanelInfo
formTab UIFormTab The tab object that indicates which controls /// to create and how the controls are laid out
return IPanelInfo

CreateOnePanelPerUIFormTab() public method

Creates one panel for each UI Form definition of a business object
public CreateOnePanelPerUIFormTab ( IUIForm uiForm ) : List
uiForm IUIForm
return List

GetAlignmentValue() public static method

Checks if the alignment value is valid
Throws a HabaneroDeveloperException if the alignment value is invalid
public static GetAlignmentValue ( string alignmentValue ) : HorizontalAlignment
alignmentValue string The alignment value from the FieldInfo
return HorizontalAlignment

PanelBuilder() public method

Creates the panel Builder with the IControlFactory to be used by the panel builder for buiding the controls.
public PanelBuilder ( IControlFactory controlFactory ) : System
controlFactory IControlFactory
return System