class org.aswing.AssetPane extends Container
| Sub classes | ||||
![]()  | JLoadPane | 
  | ||
Abstract class for A container with a decorative asset.
External content will be load automatically when the pane was created if floorEnabled.
@see JLoadPane
@author paling @author ngrebenshikov
Class Fields
static var PREFER_SIZE_BOTH:Int
Preffered size of this component will be the fit to contain both size of extenal image/animation
 and counted from LayoutManager
static var PREFER_SIZE_IMAGE:Int
preffered size of this component will be the size of extenal image/animation
Instance Fields
var actualScale:Null<Int>
A readonly current actual scale value in percents. If AssetPane.scaleMode is
AssetPane.SCALE_STRETCH_PANE returns null.
var asset:DisplayObject
The content
You should take care to do operation at this display object,
if you want to remove it, you should call unloadAsset() instead of
call asset.parent.removeChild(asset)
var customScale:Int
The custom scale value in percents. Automatically turns scale mode into SCALE_CUSTOM.
@see setScaleMode
The horizontal alignment of the image/animation. Must be one of the following values:
AsWingConstants.RIGHT(the default)AsWingConstants.LEFTAsWingConstants.CENTER
The x offset of the position of the loaded image/animation. If you dont want to locate the content to the topleft of the pane, you can set the offsets.
The y offset of the position of the loaded image/animation. If you dont want to locate the content to the topleft of the pane, you can set the offsets.
The preffered size counting strategy. Must be one of below:
AssetPane.PREFER_SIZE_BOTHAssetPane.PREFER_SIZE_IMAGEAssetPane.PREFER_SIZE_LAYOUT
The content scale mode.
AssetPane.SCALE_NONEAssetPane.SCALE_FIT_PANEAssetPane.SCALE_STRETCH_PANEAssetPane.SCALE_FIT_WIDTHAssetPane.SCALE_FIT_HEIGHTAssetPane.SCALE_CUSTOM
var verticalAlignment:Int
The vertical alignment of the image/animation. Must be one of the following values:
AsWingConstants.CENTER(the default)AsWingConstants.TOPAsWingConstants.BOTTOM
function new(?asset:DisplayObject = null, ?prefferSizeStrategy:Int = 1): Void
Creates a AssetPane with a asset content.
@see AssetPane.asset
| asset | the asset to be placed on this pane.  | 
| prefferSizeStrategy | the prefferedSize count strategy. Must be one of below: 
  | 
function getAssetOriginalSize(): IntDimension
Returns the asset's original size. If the asset are not loaded yet, return null.
| returns | the asset original size. null if it is not loaded yet.  | 
Reload the asset. This will reset the asset to count currenty size and re-layout.
See JLoadPane, JAttachPane
            
