Packageorg.aswing
Classpublic class AssetIcon
ImplementsIcon
SubclassesAttachIcon, LoadIcon

Abstract class for A icon with a decorative displayObject.

See also

org.aswing.AttachIcon
org.aswing.LoadIcon


Protected Properties
 PropertyDefined by
  asset : DisplayObject
AssetIcon
  assetContainer : DisplayObjectContainer
AssetIcon
  height : int
AssetIcon
  maskShape : Shape
AssetIcon
  scale : Boolean
AssetIcon
  width : int
AssetIcon
Public Methods
 MethodDefined by
  
AssetIcon(asset:DisplayObject = null, width:int = -1, height:int = -1, scale:Boolean = false)
Creates a AssetIcon with a path to load external content.
AssetIcon
  
getAsset():DisplayObject
AssetIcon
  
getDisplay(c:Component):DisplayObject
AssetIcon
  
AssetIcon
  
AssetIcon
  
updateIcon(c:Component, g:Graphics2D, x:int, y:int):void
AssetIcon
Protected Methods
 MethodDefined by
  
setHeight(height:int):void
AssetIcon
  
setWidth(width:int):void
AssetIcon
Property detail
assetproperty
protected var asset:DisplayObject
assetContainerproperty 
protected var assetContainer:DisplayObjectContainer
heightproperty 
protected var height:int
maskShapeproperty 
protected var maskShape:Shape
scaleproperty 
protected var scale:Boolean
widthproperty 
protected var width:int
Constructor detail
AssetIcon()constructor
public function AssetIcon(asset:DisplayObject = null, width:int = -1, height:int = -1, scale:Boolean = false)

Creates a AssetIcon with a path to load external content.

Parameters
asset:DisplayObject (default = null) — the path of the external content.
 
width:int (default = -1) — (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:int (default = -1) — (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:Boolean (default = false) — (optional)whether scale MC to fix the width and height specified. Default is true
Method detail
getAsset()method
public function getAsset():DisplayObject

Returns
DisplayObject
getDisplay()method 
public function getDisplay(c:Component):DisplayObjectParameters
c:Component

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

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

Returns
int
setHeight()method 
protected function setHeight(height:int):voidParameters
height:int
setWidth()method 
protected function setWidth(width:int):voidParameters
width:int
updateIcon()method 
public function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidParameters
c:Component
 
g:Graphics2D
 
x:int
 
y:int