Packagecom.afcomponents.umap.display.infowindow
Classpublic class TextPanel
InheritanceTextPanel Inheritance Panel Inheritance flash.display.Sprite
ImplementsIPanel

TextPanel handles the textual InfoWindow content. It is the default panel for the InfoWindow content & title, accept and displays String data. Uses styling via the TextStyle object.


Example
Short html link example:
 import com.afcomponents.umap.core.UMap;
  
 // create UMap object
 var map:UMap = new UMap();
 map.setSize(550, 400);
 addChild(map);
  
 // init info window param object
 var param:Object = {
   content: "Visit <a href=\"http://afcomponents.com\">afcomponents.com</a>!"
 }
  
 // define custom style
 var style:Object = {
   contentStyle: {
     html: true
   },
   close: false
 }
  
 // open info window with a specified content & 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.TextStyle
com.afcomponents.umap.styles.ContentType


Public Properties
 PropertyDefined by
 InheritedasDisplayObject : DisplayObject
Returns a reference to the Panel as a DisplayObject.
Panel
Protected Properties
 PropertyDefined by
 Inherited_autoSize : String
Auto size type.
Panel
 Inherited_data : *
Panel data.
Panel
 Inherited_maxSize : Size
Maximum possible size.
Panel
  _realSize : Size
Size that will be returned by getSize() method
TextPanel
  _scroll : *
Reference to the scroll bar created in the panel.
TextPanel
 Inherited_size : Size
Desired size.
Panel
  _style : TextStyle
Text style.
TextPanel
  _txt : TextField
Text field.
TextPanel
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
  
enableScrollBar(scrollBarClass:Class):void
Enables scroll bar for this text panel.
TextPanel
 Inherited
getData():*
Returns panel data.
Panel
 Inherited
Returns actual size of the Panel.
Panel
 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
_realSizeproperty
protected var _realSize:Size

Size that will be returned by getSize() method

_scrollproperty 
protected var _scroll:*

Reference to the scroll bar created in the panel.

_styleproperty 
protected var _style:TextStyle

Text style.

_txtproperty 
protected var _txt:TextField

Text field.

Method detail
enableScrollBar()method
public function enableScrollBar(scrollBarClass:Class):void

Enables scroll bar for this text panel. Specify UIScrollBar class that should be used. If you want to disable scroll, pass null value.

Parameters
scrollBarClass:Class — UIScrollBar class or