Chapter 4: Building the user interface

1, flex includes a component-based development model, you need to inherit according to needs of existing components and related methods can be extended to develop your application.

2, visual components, including the following key features: size, events, styles, effects, skin.

3, flex defines two sets of components. A set of Spark, on the spark .* package next. Set for the MX, on the mx .* packages under. Spark is flex4 the newly added, mx defined in the old version. Two components of the main difference is the use of style and skin. In addition to container components, layout the way it has changed.

4, some components exist in both sets of UI, such as buttons, in which case adobe recommend that you use the Spark of the components. Some components are specific to a particular set of UI. Such as Spark in the 3d effect. mx component in the data visualization components such as DataGrid, AdvancedDataGrid. Therefore, your application will be included in the two sets of UI components.

5 visual component of the inheritance hierarchy: Object-EventDispatcher-DisplayObject-InteractiveObject-DisplayObjectContainer-Sprite-FlexSprite-UIComponent. flex in the visualization of the like all have inherited from the UIComponent.

6, UIComponent properties that need attention. doubleClickEnabled: flex default does not support double-click, and if you want to open the double, please set the property to true; height: In the mxml you can set the value in figures, then the default unit for the pix. You can also set this ratio to 70%. In as in, if you want to set the percentage, you need percentHeight this property. x, y: the set of attributes for the absolute layout only when the effective layout.

7, each component has a corresponding mxml flex interface and as interfaces. Between the two are equal.

8, each a visual component contains the following three life-cycle events: preInitialize: component has just been created, it did not add a child node, and not visible. initialize: better handle node initialization, and size are set up, it was still not visible. creationComplete: components have been placed in the parent container and can be seen. You can use the above three events on the components to do some initialization.

9, flex components to provide a variety of set size and layout of the mechanism. The default size: If you do not specify the size or layout of components, flex will automatically set a suitable value. Explicitly set the size: You can explicitly set the components of the height / width size. Set the size based on the ratio: for example mxml set height / width = 70% or as set percentHeight / percentWidth = 70. Constraint-based layout: you can component style attributes: top, buttom, etc. to set the layout and size of components. This setup can only be used in the layout of the parent component for the absolute case.

10, flex application is based on event-driven. Event allows the programmer to know the user's interaction with the UI, a component of the life cycle and changes in appearance. When a component of the distribution of the incident, so the listener is listening component will be notified.

11, except with the selector to set the appearance of components, but also can directly call the elements of the setStyle ("proName", "value") to set the appearance.

12, flex4 the class selector to use namespace. Example code: @ namespace s "library: / / / flex / spark"; s | BorderContainer (borderColor: red;).

13, the effect (effect) is a component in a period of time visual or auditory changes, such as bleaching and displacement.

14, data binding is the source property (source) changes, the objective (destination) attributes will be automatically changed.

15, flex provides three data binding approach. The first is used in mxml () brackets in the destination attribute to bind the source property. The second is in the mxml tag using <fx:Binding> the source attribute and target attribute binding. The third is the use of BindingUtils method as the source attribute and target attribute binding.

16, data binding symbol () can be referenced directly to the properties can also be referenced on the method. For example: (obj.text.toUperCase ())

17, data binding symbol () and <fx:Binding> two ways to bind data from a compile time began. The BindingUtils that start running when binding.

18, can bind symbol [] means that when the corresponding property changes, it will trigger the data binding event, notify the binding target property.

19, when the source of the initialize event, and as distributed as the source of the change event will trigger the data binding.

20, if you create an image and want it to be the source for data binding, it must add the front property [Bindable] / [Bindable ("eventname ")]/[ Bindable (event =" eventname ")] tag. When you directly use [Bindable] tag, essentially equivalent to [Bindable ("propertyChange")]. When the property is changed, flex will be distributed propertyChange event to bind the binding targets on this property as.

21, by <fx:Binding> labels or BindingUtils multiple source attributes can be bound to a target on the image. Binding upon any one source is changed, will be updated as objectives.

22, two-way binding data to any party to change, and change the other party will be notified. Data binding expressions :@{}. Data Binding Tags: <fx:Binding source="" distination="destination" twoWay="true" />. Another style, effects, RPC in the request and the arguments of the like do not support two-way binding.

23, using the method as a data binding source. When the method parameters [Bindable], the parameter change will trigger the data binding event, so that the value of target property is updated to approach the results. If the method does not [Bindable] parameters, that is, when the target attribute will be updated at the beginning.

24, if you want to bind a method as a source of data, but the method has no parameters can be bound to use [Bindable (event = "evenname")] label, when the distribution of the image dispatchEvent (new Event ("eventname ")), the binding to the methods of the target attribute will be updated.

25, in the class definition to facilitate the use [Bindable] tag is equivalent to the class of all the public properties as well as the corresponding set / get methods of property plus [Bindable] tag.

27, where a property is defined using the [Bindable] tag is the role of the property to be replaced when another value, the target attribute will receive notification events, and update the value. It should be noted here that only when the update is replaced, if only the property in a property is changed, with the objective of the like will not be updated.

28, in the array (ArrayCollection) use [Bindable] tag, whether the array is replaced by an array of elements or change will trigger the update event.

29, if only one binding element of the array should be used when getItemAt (). This element is replaced by the update event is triggered when the target on the image to update. But if you use [num] in the form of binding, does not trigger update events.

30, the data binding operator (()), and data binding tags (<fx:Binding>), you can use as an expression. For example, (Number (obj.text) * 6 / 7) and ex4 expression. But not in BindingUtils.bingProperty () / bindSetter () to use.

31, as the method of bonding interface. BindingUtils.bindSetter (funToCall, sourceObj, ChangeWatcher.

32, you can use ("sourceobj", "", listener); method to add a listener, when the binding pieces of trigger, listener is called.

33, if the source property to be replaced, but was replaced on the same as the original on such an image, more pieces of this case will not be triggered update. If you want to control their own event trigger, you can [Bindable ("eventname")] in the specified event name, and then want to update by dispatchEvent (new Event ("eventname")) way to trigger.

34, data binding source for the entire property chain (chain) of each node Need [Bindable], if only the most Not side properties yes Bindable, that chain is changed other layer properties would not trigger off Gengxinshijian .

35, If you like bound to the dataProvider of the case, when you need to change an image in which a property, you need the following code obj.dataprovider.editField (index, "propername", "value"); this update will be updated at the same time as significant as the component to.

36, if you were bound to Array as the component, the component is only updated once in the initialization value. After initialization, when the Array of items to change will not trigger the update.

37, the container provides a hierarchical structure allows you to layout components.

38, flex container holding the top level is called application.

39, flex container, there are two, one is a layout container (layout container), another container for the navigation (navigator container). Layout container for the layout of child components / sub-container size and location. Navigation container for multiple containers of navigation. Navigation container only to spark the NavigatorContent mx containers and container.

40, mx components inherited from the UIComponent container can only contain the components of the image, while the spark can put down the container to achieve IVisualElement interface components. IVisualElement the UIComponent of the image hierarchy is implemented.

41, mx spark container and container components of the main difference is the layout of mx is fixed, and spark the layout of components can be replaced.

42, create a strategy (Creation Policy). Create a policy specifies a container pairs of the component initialization process. There are three options to create strategies: ContainerCreationPolicy.AUTO / NONE / ALL. all: start initialization of all containers. NONE: do not initialize all sub-containers. AUTO: sub-components are created only when needed, for example, if you set the AUTO option, and navigation containers, in addition to home, the other pages of the sub-component will be created in clicks.

43, if a container's layout property to null, that is, the container will use its parent container's layout.

44, initialization sequence of events: preinitialize (from outside to inside), contentCreationComplete (container-specific, since the inside out), initialize (from the inside out), cteationComplete (from the inside out).

45, the container has a enabled property, if the property is set to false, that all components are in the section enabled = false state.

46, container defaultButton property. Set this property, when users press the Enter key on the container, the button is triggered.

47, spark of the four layouts: BasicLayout (absolute positioning or constrained layout), HorizontalLayout (single level layout), VerticalLayout (single vertical layout), TileLayout (multi-line table layout).

48, spark container and place a greater than if the components of the container, by default, the component will be significant over the container, as the.

49 that if the components were as limited to container, you can use the viewport and scrollbar.

50, viewport defines two regions, one for the logic area (logical content), and one for video window (visible window). Logic area includes all of the sub-components. Significantly depending on the region the user can see, is a subset of the logic region.

51, veiwport the contentHeight / contentWidth logical size of the region, it is the size of the decision by the sub-components.

52, height / width is the visual size of the window.

53, verticalScrollPosition / horizontalScrollPosition is the visualization window coordinates relative to the logic of the window. Coordinate is negative, visualization window to the left on the move. Is positive shifted to the right.

54, viewport in clipAndEnableScrolling property defaults to false, that is, if the container is larger than the size of sub-components, sub-components that will cross the border was as container. If set to true, which is outside the container will not be significant as most.

55, the container can be increased by three methods for the scroll function: 1, increase HScrollBar / VscrollBar. 2, the container into the Scroller in. 3, the skin of the container used to add Scroller.

56, the H / VScrollerBar set the viewport specified in the bar of the target container. When sliding the scroll bar, the scroll bar will change the container verticalScrollPosition / HorizontalScrollPosition value.

57, on the scroller in the container clipAndEnableScrolling the value of true.

58, only to achieve a viewport interface, the container is to use the scroller. If the container did not achieve viewport, such as BorderContainer, SkinnableContainer, which can be placed in this container and then came alive again achieved the scroller viewport container. First in the scroller can be placed within the first group, and then place the container did not achieve viewport interface.

59, mx components of the container default to support rolling, when clipContent is true beyond the container boundary and sub-components, the scroll bars automatically appear. If you need to scroll bar has been there, you can set horizontalScrollPolicy and verticalScrollPolicy property to true.

60, was the list of nodes as the method of operation, the Spark and the mx components are different. The main difference is the method name spark component contains most of Element, but instead of mx component Zeyi Child.

61, as the list was to call in numElements / numChildren obtained is the number of direct child nodes.

62, flex / flash three coordinate systems: global (global), local (local), content (content).

63, global coordinate is the stage (stage) in the upper left corner of the coordinate origin of the coordinate system. In the MouseEvent has stageX and stageY property is the global coordinate system axis.

64, the local coordinates are the coordinates relative to the components of the upper left corner. All components have the mouseX and mouseY property refers to the value of the local coordinate system. The localX and localY MouseEvent is the value of the local coordinate system. The drag and drop operation is in the xOffset and yOffset.

65, the content coordinates are relative to the component content of the upper-left corner. With global and local coordinate different components of content, including content area coordinates. Component contentMouseX / contentMouseY attribute is the value of the content coordinates.

66, the contents of the mouse event coordinates and local coordinates of the goal for the event on the image, the target is not necessarily like you on the operation of the image. Therefore, under normal circumstances you need to local coordinates into global coordinates and global coordinates into the content then sit shot.

67, all visual components in the coordinates of the property. contentMouseX / contentMouseY: Mouse in the component content coordinates.

68, all visual components in the coordinate method: contentToGlobal / contentToLocal, globalToContent / globalToLocal, locatToContent / localToGlobal.

69, the layout (layout) in two segments, one for the size (sizing) the other part is the positioning (positioning).

70, the layout manager (layout manager) to go through three stages of layout of your components. Guarantee period (Commitment pass), measurement of phase (Measurement Pass), the layout phase (Layout Pass). Ensuring the stage manager first make sure you set some of the components and layout of the value. Manager will then call the various components of the commitProperties (). In the measurement stage manager to set or calculated for each component of some size-related properties of the default values. This stage manager calls the various components of the measure () method. In the layout stage, the manager will move and set up components and the associated drawing method. Manager will then call the various components of the updateDisplayList ().

71, flex in the program initialization (initializes) or at some of the attributes associated with the layout will automatically change the layout.

72, at some point you need to manually call the components of validateNow () method to force re-layout. However, this method is to calculate the centralized computing, so really treasure called when needed.

73, the properties of commonly used layout. x / y: the upper left corner relative to the coordinates of the parent container. Effective in absolute layout. height / width: call the pixel value or percentage. top, bottom, left, right: the component relative to a distance of up and down the parent container. In the constrained layout / flow layout is often used. These properties are only valid in an absolute layout.

74, flex components without regard to whether the layout is in a visible state. That is regardless of whether the visual component, it will be accounted for in the region of space. But you can set the component is involved includeInLayout layout. Note that only affects the component includeInLayout is in the container without affecting the layout of visual components is in the state.

75, the layout, adobe recommended way to set percentage of the size of components and containers.

76, the automatic layout container, x / y property settings are not working.

77, Spacer is involved in the control layout, but not visible. In some rules of the layout of the container Spacer can play the role of placeholder. Also, if the spacer's width set to 100% can be played to the left of the left elements of the layout, the layout of the right elements to the right role.

78, although the automatic layout of container, set the components of x and y will not work. But you can effect (effects) for the time being to change the location and size of components. Typical, for example, when users move the mouse components, component size changes in both the original and move to the top of the container.

79, the automatic layout of the container, if you autoLayout property is set to false, the container will not automatically layout. However, this property in the mx container will become invalid in some cases.

80, components of the visible control is visible, but includeInLayout control components are involved in the layout.

81, constraint-based layout of the properties of commonly used top / bottom / left / right are the four properties of the code of the component relative to the parent container of the vertical and horizontal distance. baseline text on behalf of components (title) of the bottom line and the distance between the container top. verticalCenter / HorizontalCenter component is the distance between center and container center. These properties often with some proportion of the size used, so that the effect of flow of the layout. Some of these properties in the conflict, such as left / right and horizontalCenter.

82, Application there are two distinct events: applicationComplete and error. applicationComplete after the completion of all the initialization call. error that is triggered after the httpservice call failed.

83, you can add a label in the application viewSourceURL property, and point to a file. During operation in the application of any right-click a blank place will appear a view source menu.

Of 84, in the application of some properties can be set. frameRate: frame rate, frame / sec. The default is 24. pageTitle: html in the title role and the same. preloader: point to a custom progress bar in the swc or a class. scriptRecursionLimit: defined as the depth of call stack, the default is 100. scriptTimeLimit: fp forced to stop operations in the former, the listener can operate time. The default value is the maximum value is 60 seconds. usePreloader: whether to use the default progress bar. To use the progress bar, app width greater than 160px. Also note that the above attributes can only be set in the mxml.

85, flex, there are two progress bars. One for DownloadProgressBar (MX), the other is SparkDownloadProgressBar (Spark). You can extend the above class to achieve a custom progress bar, you can also inherit Sprite, and to achieve IPreloaderDisplay interfaces. Another issue to note, the progress bar should be as small as possible to reference the class library, this can reduce the size of the progress bar.

86, in order to improve performance and reduce the size of the program, there is a container that does not support some spark skin. In general, you use the Group and DataGroup to manage layout. Use SkinnableContainer / SkinnableDataContainer to manage the layout and custom skin.

87, on VerticalLayout / HorizontalLayout in verticalAlign / HorizontalALign property. In addition to the conventional top / bottom alignment, etc., there justify: Set child component of the high / wide, and high-container / width the same. conentJustify: the height of all the sub-components set to the highest of all sub-components in component height, or height of the container contents.

88, VerticalLayout.variableRowHeight: Set the height of each line is determined by the sub-components. HorizontalColumnWidth: Set the width of each line is determined by the sub-components. Both the default value ture. If set to false, then the width of each line of the decision by the rowHeight. If rowHeight not decided by the VerticalLayout.typicalLayoutElement decision. The case to the elements are small, the width by the height of the first element of the decision.

89, the control field (Control bar) benefit is there when the container rolling, the control bar absolute position remains unchanged. By default, the Panel in the control bar at the bottom panel. If you need to change the control bar position can modify the default PanelSkin.

90, TitleWindow is a subclass of Panel, as long as for the use of pop-up windows. TitleWindow are designed to be drag and drop, the upper right corner with the default Close button, etc..

91, you can use PopUpManager.createPopUp (parent: DisplayObject, class: Class, modal: Boolean = false): IFlexDisplayObject. Pop-up window and the script does not prevent the implementation of the main window. Use removePopUp () method to remove the pop-up window. Conventional processes use TitleWindow inherited from TitleWindow to create a custom component. Then in the above definition of a number of event handling. Remove method generally PopUpManager.removePopUp (this). Of <s: TitleWindow close = "PopUpManager.removePopUp (this)". Also you can use PopUpManager.centerPopUp (obj) the way that pop-up play.

92, mouseDownOutside events outside the user clicks in the pop-up window when the trigger event. You can use this event to close the window.

93, TitleWindow and data exchange between applications. Method 1: to return the call when the results of transformation PopUpManager.createPopup for your custom components titlewindow component type, and then directly call the method or property which the incoming group related items or variables. The second method also can use a generic approach. To process information in a single case of or static variable. Method 3, by way of events to transfer data. Method 5: In the component properties directly in reference to the parent with parentApplication other components. The above method of coupling the five different procedures, different reusability, ease of use are different. In different scenarios can choose the appropriate method according to the demand to transfer data.

94, the client-side programming in different programming and services. Server is multi-threaded, multi-user, so typically there are multiple instances of a class. However, the client in the same time a class is usually only one instance, at this time if using a static variable or a single case allows a simpler programming model.

95, dataprivider need an implementation of the IList interface as a data source on the image. Implements IList interface to the like are: ArrayList, ArrayCollection, XMLListCollection.

96, DataGroup / SkinnableDataContainer need entry renderer (item renderer) to manifest as the entry. You need to configure the default or custom item renderer to significant depending on the data. flex provides two entries in the default renderer: spark.skins.spark.DefaultItemRenderer / DefaultComplexItemRenderer.

97, DefaultItemRenderer: corresponding to each data entry was used as a label to. For simple String / Number of data can be used DefaultItemRenderer.

98, DefaultComplexItemRenderer: to put each entry in a separate DataGroup. If the data items are all visual components, you can use this item renderer.

99, can dataProvider directly add / delete data.

100, in DataGroup / SkinnableDataContainer the use of virtualization technology. Significant, as each data requires a corresponding entry renderer. When the data for a long time, performance will decline.

101, using the virtual layout (virtual layout), only visual element to establish entry renderer then reused for each entry are not set up renderer, this approach can improve performance. Using the virtual layout containers useVirtualLayout need to set ture. Only DataGroup / SkinnableDataContainer in the V / H / TLayout layout support useVirtureLayout.

102, you can use itemRenderer property to specify a data entry container renderer, other decisions can also be used itemRendererFunction dynamic renderer for each entry.

103, data entry container renderer by highest to lowest priority as follows: itemRendererFunctin-> itemRenderer-> item (if implemented IVisualElement or DisplayObject itself. If the above are not or are not, it will error.

104, you can use a separate file can also be custom itemRender directly within the data container itemRender.

105, List type of control, if dataPrivider data is a simple type such as String / Number Time, List was as directly as the right. If a complex type, you need to specify labelField / labelFunction or rewrite itemToLabel () method.

106, list type component of the event. caretChange: the focus from one option to another option. change: select items manually triggered by the change. changing: Select this change of events issued before, this incident may call preventDefault () to prevent selected item changes. valueComit: programmatically select the item to trigger change. The above events are subclass.

107, List system components to support the layout settings. This makes the vertical layout of the original supports only List Series components can become horizontal or grid layout.

108, List series components in some of the properties. requireSelection: If true, the List option to set the default will be the first option. If false, the first option is empty. The default is false. selectedIndex: currently selected item in the order, from scratch. If requireSelecttion is false, can selectedIndex set to -1, that is not selected. selectedItem: The currently selected item.

109, caret item means that the current focus item. It may selectedItem to the same, or may not be.

110, List Series component is SkinnableDataContainer subclass. SkinnableDataContainer no default itemRenderer, but List Series components have. The following are components of the corresponding Series List itemRenderer. ButtonBar: ButtonBarButton; ComboBox: DefaultItemRenderer; DropDownList: DefaultItemRenderer; List: DefaultItemRenderer; TabBar: ButtonBarButton.

111, in the List component, you can allowMultipleSelection set to true, so the user According to the ctrl key to select multiple items.

112, List component selectedIndices / selectedItems as the serial number and the item is selected, they are on like Vector.

113, ButtonBar and TabBar role similar to the radio button is clicked will be issued itemClick event.

114, ButtonBar / TabBar can pay for an array value to dataprivider. This is a simple button can also be paid to a mx of ViewStack dataPrivider. This ButtonBar / TabBar will directly control the group ViewStack.

115, DropDownList and ComboBox difference: ComboBox is a subclass of DropDownList. DropDownList is a pure radio's. In addition to the ComboBox choices can be hand filled. DropDownList in the prompt is selected attribute is not significant, as the document. DropDownList's main events: close / open.

116, in the ComboBox, if you write the value of the collection does not match, the change event, it selectedIndex value of -3, the corresponding variables: ComboBox.CUSTOM_SELECTED_ITEM. Method then calls the ComboBox.labelToItemFunction this value is transformed into image. So if you set a non-simple elements, you need to rewrite labelToItemFunction method.

117, in a navigation container can result in creationCompleteEffect in WideRight. Then in the sub-container showEffec use WideUp, hideEffect use WideDown. This effect is more vivid.

118, DateChooser set by selectableRange optional date range, disabledRanges settings are not selectable date range, disableDays settings are not optional days. Another remarkable property is set by dayNames the text as a week. FormatString can be set by the date format, for example: MM / DD / YYYY. Another method or by parseFunction inputFormat to enter text into a date like.

119, run-time load the image supports the following formats: GIF / JPEG / PNG / SWF. Loaded at compile time to support GIF / JPEG / PNG / SVG / SWF. SVG file that is loaded only supports compile-time. SVG files will be affected by a number of other restrictions, such as filter does not support the environment, script, etc..

200, image control, if you want to load images at run time, you can specify the path in the source, such as: source = "url". If you want to load the image at compile time, you can use the Embed, the code is as follows: source = "@ Embed (source = 'assets / logo.jpg')". For the same picture, no matter how small time to introduce you, pictures will only be loaded once.

201, if you do not set width / height, image by default will be significant as the size of images. Set width / height of the case, according to scaleContent value to decide whether to enlarge or reduce the image width / height size, another to decide whether to change according to maintainAspectRatio ratio of horizontal width.

202, in a picture of rollOverEffect / rollOutEffect use Reside effect will play a move to enlarge, reduce the effect of leaving.

203, PopUpAnchor is a pop-up control. Its role is to control it which was as the forefront in the application and it does not have any appearance. Generally in the following scenarios will be used: one was somewhere in the page as the operation of feedback information. Second, similar to the search engine-related boxes. Double-click a control, the editor of a small window pops up.

204, PopUpAnchor the displayPopUp control whether it can be seen. PopUpAnchor components inside width initially popUpWidthMatchesAnchorWidth property decisions, and then the inside width of the component. Also you can set the component pop-up at the time of popUpPosition PopUpAnchor position. If PopUpAnchor used in conjunction with the Effect would be more effective.

205, progress bar (ProgressBar) there are two, one is obviously depending on the specific schedule (Determinate), the other is not significantly depending on the specific schedule (Indeterminate).

206, ProgressBar, there are three modes event (default), polled, manual. event mode of response by source properties such as the progress / complete change in the state. polled mode by bytesLoaded / bytesTotal transition state. manual mode by manually setting maxinum / mininum changes in the state.

207, ProgressBar has a label attribute, the default value LOADING xx%. This property can be manually set, including four placeholder% 1: number of bytes read,% 2: The total number of bytes,% 3: percentage of completed ,%%:% character string.

208, radio buttons (RadioButton), you can set the groupName property of the same group of radio buttons grouped. In addition you can define a <s:RadiioButtonGroup>, and then set the group specified radio button. The latter has the advantage of related events can be located in the group in a unified. In addition, RadioButtonGroup if defined in the mxml, it should be defined in <fx:Declarations> in.

209, NumericStepper is a digital control, Spinner is NumericStepper the parent class, you can click the event with co-Spinner with other controls to use.

210, VideoDisplay is the multimedia controls, it has no border and the related button. Control the size of the property are: maintainAspectRatio / height / width. Methods of play by the system: close / load / pause / play / stop. Can be placed in VideoDisplay cuePoints (name / time) elements, while registered in VideoDisplay cuePoint event, whenever the video playback to a specified point, will trigger cuePoint event. If it plays video, you can set the path in the source property, if the camera can call attachCamera (cam) method.

211, VideoPlay that owns the default button on the video player.

212, flex file controls five Label, RichText, RichEditableText, TextArea, TextInput. The first four of them multi-line, the last one for a single line. The first two read-only, after the three to be edited.

213, MX text format control primarily through style and htmlText control, spark control file format mainly through the FTE (Flash Text Engine) and TLF (Text Layout Framework).

214, as the text for the main controls were three: Label, RichText, RichEditableText. Three, while the left features the most lightweight the least, contrary to the right.

215, in support of the tlf the controls, you can directly control what TextFlow textFlow node up the node. TextFlow node can be placed under the class html tag (tag life outside the space for <s:). Also you can set the control's text property, so the control will ignore some <p> tabs. If you use the content attribute, TLF will be learned and translated into TextFlow solution on the image. Also you can use html tags as text in a xml on, and then use TextFlowUtil.importFromXML (xml: XML) or TextConverter.importToFlow (str: String, type: String) into TextFlow on like.

216, related to TLF in mxml element if it contains a number of special characters such as <,>, etc., you can use the relevant escape character to replace it, you need to use relevant tag <! [CDATA []]>, in as the need to use the escape character \ or escape.

217, when you need to put in a container more than the same type of component, you can use the Repeater. Usage is placed in a container of a Repeater, and then placed in the Repeater component, such as <mx:VBox> <mx:Repeater> <mx:Label>. Repeater need to set a dataprivider. The inside of the components can be referenced through the repeater's ID.currentItem dataPrivider current components represented in the current of the image.
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Chapter 4: Building the user interface

  • Ext common problem of summing up

    scripts / ext / resources / css / ext-all.css / / EXT generic CSS, contains all the style (must) scripts / ext / resources / css / icon.css / / custom menu item or other storage page icon scripts / utils / HiTRUST-CMS.css / / old version of the payment sy

  • IE and Firefox (Firefox) in the JavaScript area is not compatible and unified method summarized

    Today, the test code, found ajax can be run in IE, but in FF. IEAnd Firefox (Firefox )In JavaScript incompatibility and unified approach summarized as follows: 1.Compatible with Firefox outerHTML, FF no outerHtml method. if (window.HTMLElement) { HTMLElem

  • The use of Ajax-bridge

    Administrative divisions in the choice of the function of the tree to use the ajax-bridge, Flex part can have a Tree Choose administrative divisions, after the completion of selection AJAX to refresh the page of data; AJAX pop-up page one and another ...

  • Play flash page 3 (javascript script swfobject.js1)

    / ** * SWFObject v1.5: Flash Player detection and embed - * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * Http:// * * / if (typeof deconc ...

  • javascript built-in functions Info

    48. In the old browsers do not perform this JS :<!-- //--> 49. To quote a document-style JS: <script type="text/javascript" src="/blog/aaa.js"> </ script> 50. Specified in the script does not support the browser displ

  • common event in js

    / / 1: onblur event occurs when the object loses focus function upperCase () ( var x = document.getElementById ( "fname"). value document.getElementById ( "fname"). value = x.toUpperCase () ) </ script> Enter your name: <input

  • SUI-JavaScript rich UI library integration solution

    Introduction: SUI is not a class implementation of the UI, nor is it a standard set of UI markup language, it is just to help the existing UI frameworks (such as Ext, YUI like) to mark the way to the statement and the creation of UI. The names of these ta

  • Workspace run under different Eclipse

    Now do live more and more often required to use eclipse in java and ruby & rails project conducted between the tangential shear from the past, because in the rails project used a coloring Aptana preferences, the results open the java project sour ...

  • EJB

    public transient int counter; / / transient property private String firstname; / / persistent property @ Transient String getLengthInMeter () (...) / / transient property String getName () (...) / / persistent property @ Basic int getLength () (...) / / p

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries