Folders

Folders separate a page into different sections. A folder may contain one or more parts within it. Folders are represented by Flex controls that extend from mx.core.Container. A typical example of a folder is a TabNavigator.

Folders chop a page up into pieces. When you declare a folder you specify how to chop up the space on the parent page. The page will display the folders separated by draggable splitters.

Every page has a default folder with the id of “default”. This is important when creating new folders as each folder’s location is specified relative to another folder. Thus declaring a second folder in a page requires it to be relative to the default folder.

Folders are similar to pages in that they can be declared at the top of any class or mxml file. They do not instantiate or call the declaring class. Multiple folders may be declared in one class.

Folder Attributes
id A unique identifier.
page The id of the folder’s parent page.
relativeTo The id of a folder where this folder will be placed in relative location.
location One of ‘top’,'bottom’,'left’,'right’. The relative position of the folder.
percent From 1 through 99. The relative width of the relativeTo folder to take up.
open Optional. True/false. Defaults to true. If false, the folder will not be opened automatically.
folderType Optional. Defaults to ‘tabs’. The type of control that should represent this folder. Values are the identifiers of valid FolderType extensions. The FolderType extensions that ship with Potomac are ‘tabs’,'naked’,'accordion’,'closeableTabs’, and ‘titleWindow’.

The default folder on a page defaults to folderType=”tabs”. This can be overridden by re-declaring the default folder like:

[Folder(id="default",page="myPage",relative="n/a",
location="top",percent="100",folderType="accordion")]