| Package | potomac.ui |
| Class | public class Folder |
| Inheritance | Folder Object |
| Property | Defined By | ||
|---|---|---|---|
| id : String
The id of the folder. | Folder | ||
| page : Page
The page the folder resides in. | Folder | ||
| pageInput : PageInput
The input for the page the folder resides in. | Folder | ||
| Method | Defined By | ||
|---|---|---|---|
Folder()
Callers should not create Folders. | Folder | ||
closePart(reference:PartReference, promptForSave:Boolean = true):void
Closes the given part. | Folder | ||
containsDirty():Boolean
Returns true if any part within this folder has unsaved changes. | Folder | ||
create(options:FolderOptions = null):Container
Creates the folder UI. | Folder | ||
dispose():void
Callback that allows folders to dispose of any necessary resources or
remove event listeners before being unreferenced for GC. | Folder | ||
Returns the part references for the part with the given id and matching the given input. | Folder | ||
getContainer():Container
Returns the UI control for this folder. | Folder | ||
Returns the options used when creating the folder. | Folder | ||
getPartReference(control:UIComponent):PartReference
Returns the reference for the given part UI control. | Folder | ||
getPartReferences():Array
Returns all part references in this folder. | Folder | ||
isDirty(partReference:PartReference):Boolean
True if the part has unsaved changes. | Folder | ||
openPart(id:String, input:PartInput = null, options:PartOptions = null, setFocus:Boolean = true):void
Opens an instance of a part with the given id and input in this folder. | Folder | ||
savePart(reference:PartReference):void
Initiates a save of the part represented by the given reference. | Folder | ||
showPart(partReference:PartReference):void
Makes the given part visible (ex. | Folder | ||
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT_ID : String = default [static]
The id of the default folder. | Folder | ||
| id | property |
id:StringThe id of the folder.
public function get id():String public function set id(value:String):void| page | property |
page:PageThe page the folder resides in.
public function get page():Page public function set page(value:Page):void| pageInput | property |
pageInput:PageInputThe input for the page the folder resides in.
public function get pageInput():PageInput public function set pageInput(value:PageInput):void| Folder | () | Constructor |
public function Folder()Callers should not create Folders. Only Page instances should create folders via FolderFactory.
| closePart | () | method |
public function closePart(reference:PartReference, promptForSave:Boolean = true):void
Closes the given part. If promptForSave is true and the part is dirty, the user will
be given an opportunity to save the part. If promptForSave is true and the part is dirty,
this method runs asynchronously. When the user is prompted to save, he/she may select "Cancel" thus preventing
the part from closing. Similarly if the part save fails, the part will stay open to allow the user to
view the save errors.
Parameters
reference:PartReference — part to close.
| |
promptForSave:Boolean (default = true) — True to prompt the user to save if the part is dirty, false to close immediately.
|
| containsDirty | () | method |
public function containsDirty():BooleanReturns true if any part within this folder has unsaved changes.
ReturnsBoolean — returns true if any part in the folder has unsaved changes.
|
| create | () | method |
public function create(options:FolderOptions = null):ContainerCreates the folder UI. Only Page instances should call this method.
Parameters
options:FolderOptions (default = null) — The folder options.
|
Container — The folder UI control.
|
| dispose | () | method |
public function dispose():voidCallback that allows folders to dispose of any necessary resources or remove event listeners before being unreferenced for GC.
| findPart | () | method |
public function findPart(id:String, input:PartInput = null):PartReferenceReturns the part references for the part with the given id and matching the given input.
Parameters
id:String — id of the part to find.
| |
input:PartInput (default = null) — input of the part to find.
|
PartReference — the part reference.
|
| getContainer | () | method |
public function getContainer():ContainerReturns the UI control for this folder.
ReturnsContainer — The UI control for this folder.
|
| getOptions | () | method |
public function getOptions():FolderOptionsReturns the options used when creating the folder.
ReturnsFolderOptions — the folder options.
|
| getPartReference | () | method |
public function getPartReference(control:UIComponent):PartReferenceReturns the reference for the given part UI control.
Parameters
control:UIComponent — the part UI itself.
|
PartReference — the part reference.
|
| getPartReferences | () | method |
public function getPartReferences():ArrayReturns all part references in this folder.
ReturnsArray — all part references in this folder.
|
| isDirty | () | method |
public function isDirty(partReference:PartReference):BooleanTrue if the part has unsaved changes.
Parameters
partReference:PartReference — part reference
|
Boolean — true if the part has unsaved changes.
|
| openPart | () | method |
public function openPart(id:String, input:PartInput = null, options:PartOptions = null, setFocus:Boolean = true):voidOpens an instance of a part with the given id and input in this folder. If a part with this id and a matching input already exists within this folder, it will be made visible and the part creation will be prevented.
Parameters
id:String — The id of the part to open.
| |
input:PartInput (default = null) — The input of the part.
| |
options:PartOptions (default = null) — The options for the part instance.
| |
setFocus:Boolean (default = true) — True if the part should be made visible (ex. its tab selected).
|
| savePart | () | method |
public function savePart(reference:PartReference):voidInitiates a save of the part represented by the given reference. Saves are asynchronous and therefore this method returns before the save is complete.
Parameters
reference:PartReference — part to save.
|
| showPart | () | method |
public function showPart(partReference:PartReference):voidMakes the given part visible (ex. selecting the tab in a tabnavigator).
Parameters
partReference:PartReference — part reference to show.
|
| DEFAULT_ID | Constant |
public static const DEFAULT_ID:String = defaultThe id of the default folder.