Extending the blank panel layoutAfter you create the shell of the new panel layout, add Flex components. You add Flex components using the Flash Builder Source view based on the behavior you are trying to achieve. In addition, you can include other Guide and Flex components to suit your specific needs. However, panel layouts are not required to contain any specific Guide components. For example, you can create a panel that contains hardcoded text objects, that a user must read before filling the Guide. For example, you can include legal text or instructions. In this example, the blank panel layout created in the section Creating a blank panel layout is extended. After it is modified, it mimics the functionality of the One Column panel layout that is included with the Guide Design perspective in Workbench. Add the following to the blank panel layout:
In addition, this example defines PanelItem declaratively. That is, it defines a PanelItem instance in MXML. As a result, the following <mx:Script> ActionScript is required for Guide tree objects to correctly display. <mx:Script> <![CDATA[ import mx.core.UIComponentDescriptor; import ga.controls.Wrapper; override public function get documentDescriptor( ):UIComponentDescriptor { return Object(this)._documentDescriptor_; } override public function set documentDescriptor( oDescriptor:UIComponentDescriptor ):void { Object(this)._documentDescriptor_ = oDescriptor; } ]]> </mx:Script> Ensure your MXML source looks like the following snippet. Extended blank panel layout<?xml version="1.0" encoding="utf-8"?> <ga:LayoutTemplate xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ga="ga.model.*" xmlns:gc="ga.controls.*" > <mx:Script> <![CDATA[ import mx.core.UIComponentDescriptor; import ga.controls.Wrapper; override public function get documentDescriptor( ):UIComponentDescriptor { return Object(this)._documentDescriptor_; } override public function set documentDescriptor( oDescriptor:UIComponentDescriptor ):void { Object(this)._documentDescriptor_ = oDescriptor; } ]]> </mx:Script> <mx:VBox width="100%" height="100%" styleName="layoutobjects"> <gc:HelpPanel id="helpPanel" styleName="panelhelp" /> <ga:PanelItem itemInstancesPerCycle="-1" repeatItemLimit="-1" width="100%" /> </mx:VBox> </ga:LayoutTemplate> Ensure the Flex library project builds with no warnings or errors. You can now move on to Referencing your Flex library project in Workbench . |
|
// Ethnio survey code removed