Layouts and Containers"

From Documentation
Line 27: Line 27:
 
=Containers=
 
=Containers=
 
Here are a brief introductions. For detailed information and a complete list, please refer to [[ZK Component Reference/Containers|ZK Component Reference: Containers]].
 
Here are a brief introductions. For detailed information and a complete list, please refer to [[ZK Component Reference/Containers|ZK Component Reference: Containers]].
 +
 +
==Div and Span==
 +
[[ZK Component Reference/Containers/Div|Div]] and [[ZK Component Reference/Containers/Span|span]] are the most lightweight containers to group child components. They are the same as HTML DIV and SPAN tags respectively. Div is displayed as block that the following sibling won't be displayed in the same vertical position; as if there is a line break before and after it. On the other hand, span is displayed ''inline'' with siblings (as if no line break in between).
 +
 
==Window==
 
==Window==
 +
[[ZK Component Reference/Containers/Window|Window]] is a container providing caption, border, overlapped, draggable, closable, sizable, and many other features. Window is also a owner of [[ZK Developer's Reference/UI Composing/ID Space|a ID space]], such that the IDs of its child components won't be conflict with others.
 +
 
==Panel==
 
==Panel==
==Div and Span==
+
Like [[ZK Component Reference/Containers/Window|Window]], [[ZK Component Reference/Containers/Panel]] is another powerful container, supporting caption, border, overlapped and many other features. However, it does not implement <javadoc type="interface">org.zkoss.zk.ui.IdSpace</javadoc>, so all of its children belongs to the same ID space of its parent.
 +
 
 
==Groupbox==
 
==Groupbox==
 +
[[ZK Component Reference/Containers/Groupbox|Groupbox]] is a lightweight way to group child components. It supports the [[ZK Component Reference/Containers/Caption|caption]] and border, but it can not be overlapped or sized. It does not implement <javadoc type="interface">org.zkoss.zk.ui.IdSpace</javadoc> either.
 +
 
==Tabbox==
 
==Tabbox==
 +
[[ZK Component Reference/Containers/Tabbox|Tabbox]] is a container used to display a set of tabbed groups of components. A row of tabs is displayed at the top (or left or other location) of tabbox which may be used to switch between each group.
 +
It does not implement <javadoc type="interface">org.zkoss.zk.ui.IdSpace</javadoc> either.
 +
 
=Version History=
 
=Version History=
 
{{LastUpdated}}
 
{{LastUpdated}}

Revision as of 03:49, 23 December 2010


Layouts and Containers


Layouts are components used to partition the display area it owns into several sub-areas for its child components, while containers group its child components into the display area it owns.

Layouts

Here are a brief introductions. For detailed information and a complete list, please refer to ZK Component Reference: Layouts.

Hlayout and Vlayout

Hlayout and vlayout are a simple and lightweight layout that arranges its children to be displayed horizontally and vertically, respectively.

Hbox and Vbox

Similar to Hlayout and vlayout, hbox and vbox arrange its children to be displayed horizontally and vertically. However, they provide more functionality, such as splitter, align and pack, but the performance is slower.

Borderlayout

borderlayout places its child components in up to five areas: north, east, south, west and center. All extra space is placed in the center area.

Columnlayout

Columnlayout places its child components into multiple columns, and each column could have any number of child components placed vertically with different height (but the same width). Unlike portallayout, the user cannot move the child components to different locations (of course, the application can re-arrange the order anytime it likes).

Portallayout

portallayout places its child components into multiple columns, and each column could have any number of child components placed vertically with different height (but the same width). The user can move any of them to another location he want like a portal.

Tablelayout

tablelayout places its child components in a table. The implementation is based on HTML TABLE tag.

Containers

Here are a brief introductions. For detailed information and a complete list, please refer to ZK Component Reference: Containers.

Div and Span

Div and span are the most lightweight containers to group child components. They are the same as HTML DIV and SPAN tags respectively. Div is displayed as block that the following sibling won't be displayed in the same vertical position; as if there is a line break before and after it. On the other hand, span is displayed inline with siblings (as if no line break in between).

Window

Window is a container providing caption, border, overlapped, draggable, closable, sizable, and many other features. Window is also a owner of a ID space, such that the IDs of its child components won't be conflict with others.

Panel

Like Window, ZK Component Reference/Containers/Panel is another powerful container, supporting caption, border, overlapped and many other features. However, it does not implement IdSpace, so all of its children belongs to the same ID space of its parent.

Groupbox

Groupbox is a lightweight way to group child components. It supports the caption and border, but it can not be overlapped or sized. It does not implement IdSpace either.

Tabbox

Tabbox is a container used to display a set of tabbed groups of components. A row of tabs is displayed at the top (or left or other location) of tabbox which may be used to switch between each group. It does not implement IdSpace either.

Version History

Last Update : 2010/12/23


Version Date Content
     



Last Update : 2010/12/23

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.