class org.aswing.AssetIcon

Abstract class for A icon with a decorative displayObject.

See AttachIcon, LoadIcon

Authors senkay, paling, ngrebenshikov

Instance Fields

var asset:DisplayObject

The icon DisplayObject content

var height:Int

If you specifiled the height of the Icon, and scale is true, the mc will be scale to this height when paint. If you do not specified the height, it will use asset.height.

var scale:Bool

Whether scale the icont content to fix the width and height specified. Default is false

var width:Int

If you specifiled the width of the Icon, and scale is true, the mc will be scale to this width when paint. If you do not specified the with, it will use asset.width.

function new(?asset:DisplayObject = null, ?width:Int = -1, ?height:Int = -1, ?scale:Bool = false): Void

Creates a AssetIcon with a path to load external content.

asset

the icon content (DisplayObject).

width

(optional) if you specifiled the width of the Icon, and scale is true, the mc will be scale to this width when paint. If you do not specified the with, it will use asset.width.

height

(optional) if you specifiled the height of the Icon, and scale is true, the mc will be scale to this height when paint. If you do not specified the height, it will use asset.height.

scale

(optional) whether scale MC to fix the width and height specified. Default is false

function updateIcon(c:Component, g:Graphics2D, x:Int, y:Int): Void