FLEX组件继承关系

    技术2022-05-11  4

    通过继承,会了某一个组件的用法,与它有同样的继承关系的组件也就了解了

     

    FLEX组件继承关系:Object->EventDispather->DisplayObject->InteractiveObject->DisplayObjectContainer->Sprite->UIcomponet->All components

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>容器类组件

    Application继承关系UIComponent->Container->LayoutContainer->Application

    ApplicationControlBar继承关系UIcomponent->Container->Box->ControlBar->ApplicationControlBar其主要用于全局导航,其是ControlBar的子类,后者用于Panel及itleWindow

    Canvas继承关系UIcomponent->Container->Canvas其只有absolute布局

    Box,HBox,VBox继承关系UIcomponent->Container->Box,然后HBox,VBox是Box的子类,实际上Box有个属性direction,可以使其显示为HBox或HBox

    DividedBox,HDividedBox,VDividedBox继承关系

    UIcomponent->Container->Box->DividedBox ,然后HDividedBox,VDividedBox是其子类,三者之间的关系同Box与HBox,Vbox的关系一样

    Panel继承关系UIcomponent->Container->PanelPanel可以在下部包含一个ControlBarPanel的布局方式为absolute时,相当于Canvas               为vertical时,相当于VBox               为horizontal时,相当于HBox

    TitleWindow继承关系UIcomponent->Container->Panel->TitleWindow,其与Panel基本一样,它可以在右上角显示一个关闭按钮,其一般当做弹出窗口使用,当做弹出窗口时,用PopUpManager类来管理在Flex自带的帮助TitleWindow layout container中有大量的例子及教程,关于用PopUpManager来操作TitleWindow的

    Form继承关系UIcomponent->Container->FormForm内部可以有UIComponent->FormHeadingUIcomponent->Container->FormItem这里看下Flex自带的帮助中的Form, FormHeading, and FormItem layout containers,里边有如何设置各部分的间隔等教程

    Title继承关系UIcomponent->Container->Title

    Grid继承关系UIcomponent->Container->Box->Grid其内部可以有UIcomponent->Container->Box->HBox->GridRowUIcomponent->Container->Box->HBox->GridItem

    Accordion继承关系UIcomponent->Container->Accordion

    ViewStack继承关系UIcomponent->Container->ViewStackViewStack没有内建的切换内部容器的机制,其必须和一组按钮或LinkBar,ButtonBar,ToggleButtonBar,TabBar配合使用,这些都是NavBar的子类或子子类

    TabNavigator继承关系UIcomponent->Container->ViewStack->TabNavigatorTabNavigato是ViewStack加TabBar的效果

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>常规组件Alert继承关系UIcomponent->Container->Panel->Alert

    ColorPicker继承关系UIcomponent->ComboBase->ColorPicker其有个dataProvider属性,可以指定提供哪些颜色供选择

    ComboBox继承关系UIcomponent->ComboBase->ComboBox

    HorizontalList继承关系UIcomponent->ScrollControlBase->ListBase->TileBase->HorizontalList

    TileList继承关系UIcomponent->ScrollControlBase->ListBase->TileBase->TitleList

    List继承关系UIcomponent->ScrollControlBase->ListBase->List

    Tree继承关系UIcomponent->ScrollControlBase->ListBase->List->Tree

    DataGrid继承关系UIComponent->ScrollControlBase->ListBase->DataGridBase->DataGrid

    TabBar继承关系UIcomponent->Container->Box->NavBar->ButtonBar->ToggleButtonBar->TabBarButtonBar与ToggleButtonBar类似,后者放开鼠标后能显示按下的状态,TabBar也是显示按下状态,但外观不一样

    LinkBar继承关系UIcomponent->Container->Box->NavBar->LinkBar其在内部根据数据源产生LinkButton

    几个简单的组件:UIcomponent->ProgressBar进度条UIcomponent->Spacer 空生空白的空间UIComponent->HRule及VRule 创建水平或坚直的线UIComponent->NumericStepper 提供数据供选择,类似于ComboBox,但不产生下拉列表UIComponent->Slider->HSlider及VSlider 通过拖到选择数据UIComponent->ScrollBar->HScrollBar及VScrollBar,通常不单独使用,空间不够时自动产生

    UIComponent->ButtonUIComponent->Button->CheckBoxUIComponent->Button->RadioButtonObject->EventDispatcher->RadioButtonGroup 这个比较特别UIComponent->Button->LinkButton UIComponent->Button->PopUpButton 弹出一个菜单UIComponent->Button->PopUpButton->PopUpMenuButton 数据源自动转成一个菜单 PopUpButton比Button多了一个pop-up button可以弹出Menu或List,通过属性Popup指定

    UIComponent->DateChooserUIcomponent->ComboBase->DateField

    UIComponent->MenuBar 横向菜单

    UIComponent->Label->Text Lable显示单行字,Text可以显示多行

    UIComponent->ScrollControlBase->TextAreaUIComponent->TextInput    UIcomponent->Container->Panel-> RichTextEditor 这个控件的外观不是固定的,可以添加删除其它组件,具体看下帮助

    补充:一:集合ArrayCollection,XMLListCollection 继承了mx.collections.ListCollectionView ,其实现了mx.collections.ICollectionView 和mx.collections.IList接口. 这两个接口提供了查看和

    修改数据的基本方法,ArrayCollection用一个数组做数据源. XMLListCollection用XMLLIST做数据源对象

    总的来说集特征如下:当数据源发生改变生,组件即时更新显示,可以查看,修改,排序源数据

    有两种数据源类型线性的

    层级的,一般用于Tree,Menu,MenuBar,PopUpMenuButton

    定义数据源的方法用<mx:dataProvider>标签在AS中定义

    二:层级数据对象

    可以是XML相关格式或Objects

    三:使用条目逞现器和编辑器,用于ListBase下相关的控件

    四:Menu,这个只能通过AS来创建


    最新回复(0)