Class fvaswing.components.FvBitmapIcon

Implemented Interfaces

Icon

Description

Use BitmapData feature to paint AsWing Icons.

Method Index

new FvBitmapIcon()
applyFilter(), create(), getIconHeight(), getIconWidth(), paintIcon(), toString(), uninstallIcon()

Constructor Detail

FvBitmapIcon

public function FvBitmapIcon(bmp:BitmapData, width:Number, height:Number, scale:Boolean)

Constructor.

Parameters

bmpBitmapData to use
width( optional ) Prefered icon's width
height( optional ) Prefered icon's height
scale( optional ) Indicates if BitmapData is scaled to icon's size. ( default true ).

Method Detail

create

static public function create(id:String, repository:String, scale:Boolean):FvBitmapIcon

Creates and returns FvBitmapIcon using passed-in bitmap id and repository arguments.

Parameters

idRegistration bitmap id.
repositoryLocator name

applyFilter

public function applyFilter(f:BitmapFilter):Void

Apply the new passed-in filter to BitmapData instance.

Filter is applied to enabled and disabled bitmap.

getIconWidth

public function getIconWidth():Number

Returns the icon's width.

getIconHeight

public function getIconHeight():Number

Returns the icon's height.

paintIcon

public function paintIcon(com:Component, g:Graphics, x:Number, y:Number):Void

Draw the icon at the specified location.

uninstallIcon

public function uninstallIcon(com:Component):Void

Remove things in the icon object related to the component. For example remove the MCs created at the first paint time.

There is not installIcon method, so you must install icon related things at the first time of paintIcon, for example attach a MC if needed.

See Also

toString

public function toString():String

String representation of instance