Class fvaswing.components.filechooser.mvc.FvFileChooserController

Description

FvFileChooserController is the controller part of the MVC Design pattern implemented in FvFileChooser.

Method Index

new FvFileChooserController()
addChoosableFileFilter(), addPreviewCommand(), changeToHomeDirectory(), changeToParentDirectory(), getAcceptAllFileFilter(), getChoosableFileFilters(), getFileFilter(), handleResultEvent(), isAcceptAllFileFilterUsed(), isMultiSelectionEnabled(), isPreviewEnabled(), isUploadEnabled(), lockUI(), removeChoosableFileFilter(), rescanCurrentDirectory(), resetChoosableFileFilters(), retreiveDirectory(), setAcceptAllFileFilterUsed(), setCurrentDirectory(), setFileFilter(), setMultiSelectionEnabled(), setPreviewEnabled(), setUploadEnabled(), showDialog(), toString(), unlockUI()

Constructor Detail

FvFileChooserController

public function FvFileChooserController(owner:FvFileChooser)

Constructor.

Method Detail

showDialog

public function showDialog(id:Number, buttonCaption:String):Void

Show a 'custom' modal dialog containing the file chooser.

Parameters

buttonCaptionCaption of the 'ok' button

setMultiSelectionEnabled

public function setMultiSelectionEnabled(enabled:Boolean):Void

Sets whether multiple files can be selected at once.

By default, a user can choose only one file.

isMultiSelectionEnabled

public function isMultiSelectionEnabled():Boolean

Returns whether multiple files can be selected at once.

setUploadEnabled

public function setUploadEnabled(enabled:Boolean):Void

Sets whether upload feature is enabled true or not false

Default is false

isUploadEnabled

public function isUploadEnabled():Boolean

Returns true if upload feature is enabled in current FvFileChooser component.

setPreviewEnabled

public function setPreviewEnabled(enabled:Boolean):Void

Sets whether preview feature is enabled true or not false

Default is false

isPreviewEnabled

public function isPreviewEnabled():Boolean

Returns true if preview feature is enabled in current FvFileChooser component.

addPreviewCommand

public function addPreviewCommand(type:String, previewCommand:Command):Void

Adds type to preview loader.

setCurrentDirectory

public function setCurrentDirectory(file:FvFileChooserItem):Void

Sets the directory whose files are displayed in the file chooser's list.

retreiveDirectory

public function retreiveDirectory(path:String):Void

Retreives directory listing from model cache.

This method is called by the UI Combobox.

changeToParentDirectory

public function changeToParentDirectory():Void

Change the list to display the current directory's parent.

changeToHomeDirectory

public function changeToHomeDirectory():Void

Change the list to display to home directory.

rescanCurrentDirectory

public function rescanCurrentDirectory(path:String):Void

Check the file system and update the chooser's list.

setAcceptAllFileFilterUsed

public function setAcceptAllFileFilterUsed(enabled:Boolean):Void

Sets whether the AcceptAll file filter is used as an allowable choice in the choosable filter list; the default value is true.

isAcceptAllFileFilterUsed

public function isAcceptAllFileFilterUsed():Boolean

Returns whether the AcceptAll file filter is used as an allowable choice in the choosable filter list.

setFileFilter

public function setFileFilter(filter:FileFilter):Void

Sets the file chooser's primary file filter.

getFileFilter

public function getFileFilter():FileFilter

Returns the file chooser's primary file filter.

getChoosableFileFilters

public function getChoosableFileFilters():IndexedArray

Returns file chooser filter list.

addChoosableFileFilter

public function addChoosableFileFilter(filter:FileFilter):Void

Adds a new custom file filter.

removeChoosableFileFilter

public function removeChoosableFileFilter(filter:FileFilter):Boolean

Removes passed-in fvaswing.components.filechooser.FvFileFilter from file chooser filter list.

Return

true is filter is removed, otherwise false

resetChoosableFileFilters

public function resetChoosableFileFilters():Void

Resets file chooser filter list to primary filter list.

getAcceptAllFileFilter

public function getAcceptAllFileFilter():FileFilter

Returns the default 'AcceptAll' filter instance.

lockUI

public function lockUI():Void

Locks the chooser UI during remoting process.

unlockUI

public function unlockUI():Void

Unlocks the chooser UI.

handleResultEvent

public function handleResultEvent(type:Number, files:Array, path:String):Void

Triggered by user when the chooser is closed.

Parameters

typePossible values are
filesArray structure with all selected files
pathBase path of selected files

toString

public function toString():String

Returns string representation.