【正文】
組件可以將某一區(qū)域分成三個(gè)豎直的區(qū)域,實(shí)現(xiàn)代碼如下:borderlayout height=300px width=500px east width=150pxThe East /east center The Center /center west width=150px The West /west /borderlayout也可以將某一區(qū)域分成三個(gè)水平的區(qū)域,實(shí)現(xiàn)代碼如下:borderlayout height=300px width=500pxnorth height=100px The North /north center The Center /center south height=100px The South /south /borderlayout 嵌套的 borderlayout 組件為了將某一區(qū)域劃分更多的小區(qū)域,你可將布局組件嵌入到另一個(gè)布局組件中,即嵌套的borderlayout 。borderlayout height=300px width=500px north size=30% borderlayout west border=normal The First Area /west center The Second Area /center east size=50% border=normal The Third Area /east /borderlayout /north center border=normal borderlayout west border=normal The Forth Area /west center border=normal The Fifth Area /center east size=30% border=normal The Sixth Area /east /borderlayout /center /borderlayout 布局組建的size和border屬性north,south,east,west等子組件可以通過(guò)指定size屬性改變其大小,size屬性的功能依賴于子組件的類型,對(duì)于水平組件(north和south)size屬性決定他們的高度,而對(duì)于豎直組件(east和west)size屬性決定他們的高度。border屬性決定是否為布局組件設(shè)置邊框,包括borderlayout的所有子組件。當(dāng)border值為“none”或“default”時(shí),布局組件沒(méi)有邊框;當(dāng)border值為“normal”時(shí),布局組件顯示邊框。borderlayout height=300px width=500px north size=30% The North /north east size=30% border=normal The East /east center border=normal The Center /center west border=default The West /west south size=30% border=normal The South /south /borderlayout 布局組件的splittable和collapsible屬性將splittable屬性設(shè)置為“true”,布局組件可以拆分;將collapsible屬性設(shè)置為“true”,布局組件可以折疊。borderlayout height=300px width=500px north title=North maxsize=300 size=50% splittable=true collapsible=trueborderlayout west title=West size=25% flex=true maxsize=250 splittable=true collapsible=true div style=background:B8D335 label value=25% style=color:white。fontsize:50px / /div /west center border=none flex=true div style=background:E6D92C label value=25% style=color:white。fontsize:50px / /div /center east size=50% border=none flex=true label value=Here is a nonborder style=color:gray。fontsize:30px / /east /borderlayout /north center border=0 borderlayout west maxsize=350 size=30% flex=true border=0 splittable=true div style=background:E6D92C label value=30% style=color:white。fontsize:50px / /div /west center label value=Here is a border style=color:gray。fontsize:30px / /center east title=East size=30% flex=true collapsible=true div style=background:B8D335 label value=30% style=color:white。fontsize:50px / /div /east /borderlayout /center/borderlayout 當(dāng)布局組件被設(shè)置為可拆分時(shí),maxsize和minisize屬性決定此組件的變動(dòng)范圍,如:north splittalbe=”true” maxsize=”500px” minisize=”200px”/,則north組件的變動(dòng)范圍為200px—500px。 布局組件的其他屬性將布局組件的flex屬性設(shè)置為true時(shí),布局組件會(huì)隨著瀏覽器大小的改變自動(dòng)調(diào)整自身的尺寸來(lái)適合瀏覽器的尺寸。為了獲知一個(gè)布局組件是否已被折疊,則可以檢查其屬性的值(也就是 isOpen 方法)。若想在程序中打開(kāi)或折疊布局組件,則可以設(shè)置 open 屬性的值(也就是,setOpen方法)。 標(biāo)簽頁(yè)組件:tabbox , tabs , tab , tabpanel , tabpanels。tabbox是外層的box,包括一系列tab和tabpanel,tabs是tab的容器,也就是tab組件的集合,點(diǎn)擊tab可以將其tabpanel顯示出來(lái),tabpanels是tabpanel的容器,也就是tabpanel組件的集合,tabpanel是面板的主體,可以將一組組件放置于一個(gè)tabpanels中,第一個(gè)tabpanel對(duì)應(yīng)于第一個(gè)tab,第二個(gè)tabpanel對(duì)應(yīng)于第二個(gè)tab,以此類推。tabbox允許開(kāi)發(fā)人員將大量組件分別置于幾個(gè)組內(nèi),且每次只顯示一個(gè)組,這樣用戶界面不會(huì)太難于閱讀。 在同一時(shí)間內(nèi)僅會(huì)顯示一組。一旦一個(gè)隱藏組的 tab被點(diǎn)擊后,此組的組件變得可見(jiàn)而前一個(gè)可見(jiàn)組變得不可見(jiàn)。tabbox width=200px tabs tab label=First/ tab label=Second/ /tabs tabpanels tabpanelThe first panel./tabpanel tabpanelThe second panel/tabpanel /tabpanels /tabbox 嵌套的tabboxtabbox width=500px tabs tab label=First/ tab label=Second/ /tabs tabpanels tabpanel The first panel. tabbox tabs tab label=Nested 1/ tab label=Nested 2/ tab label=Nested 3/ /tabs tabpanels tabpanelThe first nested panel/tabpanel tabpanelThe second nested panel/tabpanel tabpanelThe third nested panel/tabpanel /tabpanels /tabbox /tabpanel tabpanelThe second panel/tabpanel /tabpanels /tabbox the accordion tabboxtabbox支持兩種模式(mold):default和accordion模式。tabbox mold=accordion width=500px tabs tab label=First/ tab label=Second/ /tabs tabpanels tabpanelThe first panel./tabpanel tabpanelThe second panel/tabpanel /tabpanels /tabbox tabbox的orient 屬性tabbox有兩種布局方位,水平布局和垂直布局,默認(rèn)為水平布局,也可以通過(guò)設(shè)置orient=”vertical”垂直布局。tabbox width=500px orient=vertical tabs tab label=A/ tab label=B/ tab label=C/ tab label=D/ tab label=E/ /tabs tabpanels tabpanelThis is panel A/tabpanel tabpanelThis is panel B/tabpanel tabpanelThis is panel C/tabpanel tabpanelThis is panel D/tabpanel tabpanelThis is panel E/tabpanel /tabpanels /tabbox tab的closable 屬性可以通過(guò)設(shè)置tab的closable屬性為true來(lái)顯示tab的關(guān)閉按鈕,這樣用戶可以通過(guò)點(diǎn)擊關(guān)閉按鈕來(lái)關(guān)閉tab和相應(yīng)的tab面板。當(dāng)用戶點(diǎn)擊了colse按鈕,onClose時(shí)間會(huì)被送至tab,此事件會(huì)由tab的onClose方法來(lái)處理。t