Packagecom.afcomponents.umap.display.infowindow
Classpublic class ImagePanel
InheritanceImagePanel Inheritance Panel Inheritance flash.display.Sprite
ImplementsIPanel

ImagePanel defines a special InfoWindow panel which can load and display a .jpg, .png, .gif, .swf asset file. Asset uri can be specified via InfoWindow.content property, as a String object.


Example
In this short sample we open up a custom styled info window with the .gif file as it's content:
 import com.afcomponents.umap.core.UMap;
 import com.afcomponents.umap.display.infowindow.ImagePanel;
  
 // create UMap object
 var map:UMap = new UMap();
 map.setSize(550, 400);
 addChild(map);
  
 // init info window param object
 var param:Object = {
   content: "http://www.afcomponents.com/content/images/layout/logo.gif",
   contentType: ImagePanel
 }
  
 // define info window style
 var style:Object = {
   fill: "rgb",
   fillRGB: 0x555555,
   fillAlpha: 1,
   strokeRGB: 0x0,
   close: false
 }
  
 // open info window with a specific style
 map.openInfoWindow(param, style);
 
Consider using ContentType constants instead of direct class importing.

See also

com.afcomponents.umap.display.InfoWindow
com.afcomponents.umap.styles.MediaStyle
com.afcomponents.umap.styles.ContentType


Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns a reference to the Panel as a DisplayObject.
Panel
  loader : Loader
[read-only] Returns reference to the asset loader object.
ImagePanel
Protected Properties
 PropertyDefined by
 Inherited_autoSize : String
Auto size type.
Panel
 Inherited_data : *
Panel data.
Panel
  _loaded : Boolean
Indicates whether content has been loaded.
ImagePanel
  _loader : Loader
Loader used for loading the asset.
ImagePanel
 Inherited_maxSize : Size
Maximum possible size.
Panel
 Inherited_size : Size
Desired size.
Panel
  _style : MediaStyle
MediaStyle object which defines the asset display style.
ImagePanel
Public Methods
 MethodDefined by
 Inherited
close():void
Invoked by info window when it has been closed.
Panel
 Inherited
dispose():void
Invoked by Info Window to tell the panel auto size type and maximum size.
Panel
 Inherited
getData():*
Returns panel data.
Panel
  
Returns actual size of the Panel.
ImagePanel
 Inherited
Returns the style object associated with the panel.
Panel
 Inherited
init(data:*, maxSize:Size, autoSizeType:String, style:Object = null):void
Initalizes the panel options.
Panel
 Inherited
move(x:Number, y:Number):void
Moves panel to the specified point.
Panel
 Inherited
reset():void
Refreshes the panel.
Panel
 Inherited
resize():void
Invoked when the size of the panel should be updated.
Panel
 Inherited
setData(value:*):void
Sets new panel data.
Panel
 Inherited
setFinalSize(size:Size):void
Invoked by InfoWindow to inform the Panel about the final available size for the panel.
Panel
 Inherited
setSize(size:Size, maxSize:Size = null):void
Invoked by InfoWindow to inform the Panel about the desired size.
Panel
 Inherited
setStyle(style:Object):void
Sets the style of the panel.
Panel
Property detail
_loadedproperty
protected var _loaded:Boolean

Indicates whether content has been loaded.

_loaderproperty 
protected var _loader:Loader

Loader used for loading the asset.

loaderproperty 
loader:Loader  [read-only]

Returns reference to the asset loader object.

Implementation
    public function get loader():Loader
_styleproperty 
protected var _style:MediaStyle

MediaStyle object which defines the asset display style.

Method detail
getSize()method
public override function getSize():Size

Returns actual size of the Panel.

Returns
Size