| Package | org.aswing |
| Class | public class MultipleAssetIcon |
| Implements | Icon |
See also
| Method | Defined 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 | ||
|
getIconHeight(c:Component):int
| MultipleAssetIcon | ||
|
getIconWidth(c:Component):int
| MultipleAssetIcon | ||
|
setGapFromEdge(insets:Insets):void
Set value for a blank space from each one side of asset.
| MultipleAssetIcon | ||
| MultipleAssetIcon | |||
| Constant | Defined 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 | ||
| MultipleAssetIcon | () | constructor |
public function MultipleAssetIcon(absoluteSize:IntDimension = null)Creates a MultipleAssetIcon.
ParametersabsoluteSize: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.
|
| addAsset | () | method |
public function addAsset(asset:DisplayObject, width:Number = -1, height:Number = -1, scale:Boolean = false, horizontalPosition:int = -1, verticalPosition:int = -1):voidAdd a new asset to asset container. Last added asset will be at the top of all other.
Parametersasset: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():MultipleAssetIconClone the MultipleAssetIcon instance
ReturnsMultipleAssetIcon —
Cloned MultipleAssetIcon
|
| getDisplay | () | method |
| getGapFromEdge | () | method |
public function getGapFromEdge():InsetsReturn value for a blank space from each one side of asset.
ReturnsInsets |
| getIconHeight | () | method |
| getIconWidth | () | method |
| setGapFromEdge | () | method |
public function setGapFromEdge(insets:Insets):voidSet value for a blank space from each one side of asset.
Parametersinsets:Insets |
| updateIcon | () | method |
public function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidParameters
c:Component |
|
g:Graphics2D |
|
x:int |
|
y:int |
| BOTTOM | constant |
public static const BOTTOM:uint = 2Align asset to bottom position.
| CENTER | constant |
public static const CENTER:uint = 0Align asset to horizontal or vertical center position.
| LEFT | constant |
public static const LEFT:uint = 3Align asset to left position.
| RIGHT | constant |
public static const RIGHT:uint = 4Align asset to right position.
| TOP | constant |
public static const TOP:uint = 1Align asset to top position.