Class fvaswing.components.filechooser.FvFileView

Description

Defines UI informations for a fvaswing.components.filechooser.FvFileItem object.

Method Index

addExtension(), addExtensions(), clearExtensions(), getExtensions(), getIcon(), register(), registerDefaultViews(), removeExtension(), toString(), unregister()

Method Detail

registerDefaultViews

static public function registerDefaultViews():Void

Registers defaults icon views.

You must define a "filechooser" repository in your configuration file, either icons views are just ignored.

Example

   <repository id="filechooser">
 	   <asset id="as_icon" url="icons/16x16/filesys/icon_as.png" />
 	   <asset id="fla_icon" url="icons/16x16/filesys/icon_fla.png" />
 	   <asset id="html_icon" url="icons/16x16/filesys/icon_html.png" />
 	   <asset id="xml_icon" url="icons/16x16/filesys/icon_xml.png" />
 	   <asset id="jpg_icon" url="icons/16x16/filesys/icon_jpg.png" />
 	   <asset id="php_icon" url="icons/16x16/filesys/icon_php.png" />
 	   <asset id="text_icon" url="icons/16x16/filesys/icon_text.png" />
 	   <asset id="zip_icon" url="icons/16x16/filesys/icon_zip.png" />
   </repository>
 

Otherwise you can register your own views with register method.

register

static public function register(icon:Icon):FvFileView

Adds new fvaswing.components.filechooser.FvFileItem structure.

unregister

static public function unregister(view:FvFileView):Boolean

Removes passed-in fvaswing.components.filechooser.FvFileItem from list.

getIcon

static public function getIcon(file:FvFileChooserItem):Icon

Returns registred AsWng Icon with passed in fvaswing.components.filechooser.FvFileItem item.

If no icon is found, use the default one depending of item type ( file or directory )

addExtension

public function addExtension(extension:String):Boolean

Adds a new possible extension to the filter.

addExtensions

public function addExtensions(extensions:Array):Void

Adds extensions list to the filter

Parameters

extensionsArray list of extensions

getExtensions

public function getExtensions():IndexedArray

Returns extensions list defined for this filter.

removeExtension

public function removeExtension(extension:String):Boolean

Removes passed-in extension from filter.

clearExtensions

public function clearExtensions():Void

Resets filter extension list.

toString

public function toString():String

Returns a string representation of this view.