Packageorg.aswing
Classpublic class MultipleAssetIcon
ImplementsIcon

MultipleAssetIcon is a Icon impelmentation that use multiple decorative DisplayObject-s.

See also

org.aswing.AssetIcon
org.aswing.AttachIcon
org.aswing.LoadIcon


Public Methods
 MethodDefined by
  
MultipleAssetIcon(absoluteSize:IntDimension = null)
Creates a MultipleAssetIcon.
MultipleAssetIcon
  
addAsset(asset:DisplayObject, width:Number = -1, height:Number = -1, scale:Boolean = false, horizontalPosition:int = -1, verticalPosition:int = -1):void
Add a new asset to asset container.
MultipleAssetIcon
  
Clone the MultipleAssetIcon instance
MultipleAssetIcon
  
getDisplay(c:Component):DisplayObject
MultipleAssetIcon
  
Return value for a blank space from each one side of asset.
MultipleAssetIcon
  
MultipleAssetIcon
  
MultipleAssetIcon
  
setGapFromEdge(insets:Insets):void
Set value for a blank space from each one side of asset.
MultipleAssetIcon
  
updateIcon(c:Component, g:Graphics2D, x:int, y:int):void
MultipleAssetIcon
Public Constants
 ConstantDefined by
  BOTTOM : uint = 2
[static] Align asset to bottom position.
MultipleAssetIcon
  CENTER : uint = 0
[static] Align asset to horizontal or vertical center position.
MultipleAssetIcon
  LEFT : uint = 3
[static] Align asset to left position.
MultipleAssetIcon
  RIGHT : uint = 4
[static] Align asset to right position.
MultipleAssetIcon
  TOP : uint = 1
[static] Align asset to top position.
MultipleAssetIcon
Constructor detail
MultipleAssetIcon()constructor
public function MultipleAssetIcon(absoluteSize:IntDimension = null)

Creates a MultipleAssetIcon.

Parameters
absoluteSize:IntDimension (default = null) — set the absolute size of a asset. If it's not set it will be used size of the biggest asset that it's added with addAsset() method.
Method detail
addAsset()method
public function addAsset(asset:DisplayObject, width:Number = -1, height:Number = -1, scale:Boolean = false, horizontalPosition:int = -1, verticalPosition:int = -1):void

Add a new asset to asset container. Last added asset will be at the top of all other.

Parameters
asset:DisplayObject — display object to be show.
 
width:Number (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:Number (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
 
horizontalPosition:int (default = -1) — The horizontal position of asset
 
verticalPosition:int (default = -1) — The vertical position of asset (affect only if scale is not true and asset size is bigged than asset)

See also

clone()method 
public function clone():MultipleAssetIcon

Clone the MultipleAssetIcon instance

Returns
MultipleAssetIcon — Cloned MultipleAssetIcon
getDisplay()method 
public function getDisplay(c:Component):DisplayObjectParameters
c:Component

Returns
DisplayObject
getGapFromEdge()method 
public function getGapFromEdge():Insets

Return value for a blank space from each one side of asset.

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

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

Returns
int
setGapFromEdge()method 
public function setGapFromEdge(insets:Insets):void

Set value for a blank space from each one side of asset.

Parameters
insets:Insets
updateIcon()method 
public function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidParameters
c:Component
 
g:Graphics2D
 
x:int
 
y:int
Constant detail
BOTTOMconstant
public static const BOTTOM:uint = 2

Align asset to bottom position.

CENTERconstant 
public static const CENTER:uint = 0

Align asset to horizontal or vertical center position.

LEFTconstant 
public static const LEFT:uint = 3

Align asset to left position.

RIGHTconstant 
public static const RIGHT:uint = 4

Align asset to right position.

TOPconstant 
public static const TOP:uint = 1

Align asset to top position.