Packageorg.aswing
Classpublic class LoadIcon
InheritanceLoadIcon Inheritance AssetIcon

LoadIcon allow you load extenal image/animation to be the icon content.



Protected Properties
 PropertyDefined by
 Inheritedasset : DisplayObject
AssetIcon
 InheritedassetContainer : DisplayObjectContainer
AssetIcon
 Inheritedheight : int
AssetIcon
 InheritedmaskShape : Shape
AssetIcon
 Inheritedscale : Boolean
AssetIcon
 Inheritedwidth : int
AssetIcon
Public Methods
 MethodDefined by
  
LoadIcon(url:*, width:Number = -1, height:Number = -1, scale:Boolean = false, context:LoaderContext = null)
Creates a LoadIcon with specified url/URLRequest, width, height.
LoadIcon
 Inherited
getAsset():DisplayObject
AssetIcon
  
getDisplay(c:Component):DisplayObject
LoadIcon
  
LoadIcon
  
LoadIcon
  
getLoader():Loader
Return the loader
LoadIcon
  
updateIcon(c:Component, g:Graphics2D, x:int, y:int):void
LoadIcon
Protected Methods
 MethodDefined by
 Inherited
setHeight(height:int):void
AssetIcon
 Inherited
setWidth(width:int):void
AssetIcon
Constructor detail
LoadIcon()constructor
public function LoadIcon(url:*, width:Number = -1, height:Number = -1, scale:Boolean = false, context:LoaderContext = null)

Creates a LoadIcon with specified url/URLRequest, width, height.

Parameters
url:* — the url/URLRequest for a asset location.
 
width:Number (default = -1) — (optional)the width of this icon.(miss this param mean use image width)
 
height:Number (default = -1) — (optional)the height of this icon.(miss this param mean use image height)
 
scale:Boolean (default = false) — (optional)whether scale the extenal image/anim to fit the size specified by front two params, default is false
 
context:LoaderContext (default = null)
Method detail
getDisplay()method
public override function getDisplay(c:Component):DisplayObjectParameters
c:Component

Returns
DisplayObject
getIconHeight()method 
public override function getIconHeight(c:Component):intParameters
c:Component

Returns
int
getIconWidth()method 
public override function getIconWidth(c:Component):intParameters
c:Component

Returns
int
getLoader()method 
public function getLoader():Loader

Return the loader

Returns
Loader — this loader
updateIcon()method 
public override function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidParameters
c:Component
 
g:Graphics2D
 
x:int
 
y:int