Habanero.Faces.Win.BOEditorControlUtils.CreatePanelInfo C# (CSharp) Method

CreatePanelInfo() static private method

static private CreatePanelInfo ( IControlFactory controlFactory, IClassDef classDef, string uiDefName, IBOEditorControl iboEditorControl ) : IPanelInfo
controlFactory IControlFactory
classDef IClassDef
uiDefName string
iboEditorControl IBOEditorControl
return IPanelInfo
        internal static IPanelInfo CreatePanelInfo
            (IControlFactory controlFactory, IClassDef classDef, string uiDefName, IBOEditorControl iboEditorControl)
        {
            IUIForm uiForm = GetUiForm(classDef, uiDefName);
            PanelBuilder panelBuilder = new PanelBuilder(controlFactory);
            IPanelInfo panelInfo = panelBuilder.BuildPanelForForm(uiForm);
            BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(iboEditorControl);
            layoutManager.AddControl(panelInfo.Panel, BorderLayoutManager.Position.Centre);
            return panelInfo;
        }
    }

Usage Example

        ///<summary>
        /// The Constructor for the <see cref="BOEditorControlWin"/> which passes in the
        /// <paramref name="classDef"/> for the <see cref="IBusinessObject"/> and the <paramref name="uiDefName"/> that
        ///  is used to defined the User Interface for the <see cref="IBusinessObject"/>
        ///</summary>
        ///<param name="controlFactory">The control factory which is used to create the Controls on this form.</param>
        ///<param name="classDef">The <see cref="IClassDef"/> for the  <see cref="IBusinessObject"/> that will be edited by this control</param>
        ///<param name="uiDefName">The user interface defined in the <see cref="IClassDef"/> that will be used to Build this control</param>
        public BOEditorControlWin(IControlFactory controlFactory, IClassDef classDef, string uiDefName)
        {
            if (controlFactory == null)
            {
                throw new ArgumentNullException("controlFactory");
            }
            if (classDef == null)
            {
                throw new ArgumentNullException("classDef");
            }
            if (uiDefName == null)
            {
                throw new ArgumentNullException("uiDefName");
            }

            _panelInfo = BOEditorControlUtils.CreatePanelInfo(controlFactory, classDef, uiDefName, this);
            SetEnableState();
        }
BOEditorControlUtils