Package | flexlib.controls |
Class | public class IconLoader |
Inheritance | IconLoader ![]() |
Property | Defined By | ||
---|---|---|---|
scaleContent : Boolean
Enables or disables scaling of the icon content to fit this control's bounds. | IconLoader | ||
source : Object
Sets the location of the icon data. | IconLoader |
Method | Defined By | ||
---|---|---|---|
Constructor
| IconLoader |
scaleContent | property |
scaleContent:Boolean
Enables or disables scaling of the icon content to fit this control's bounds. <p>When this property is set to <codeph>true</codeph>, the icon's image will be scaled to fill the bounds of this control. When calculating the scale ratio, the lesser of the bouding width and height is used.</p> <p>If this property is set to <codeph>false</codeph> an icon is chosen from those contained in the source file based on the size of this control.</p> <p>Icon files typically contain icons at multiple sizes. When choosing which icon to display, this control considers the value of the <codeph>scaleContents</codeph> propety. If <codeph>scaleContents</codeph> is <codeph>false</codeph>, the largest icon that does not exceed the control's bounds is chosen. When the value is <codeph>true</codeph>, the icon chosen is the smallest icon that exceeds this control's bounds.</p>
The default value is false
.
This property can be used as the source for data binding.
public function get scaleContent():Boolean
public function set scaleContent(value:Boolean):void
source | property |
source:Object
Sets the location of the icon data. <p>This property can be set to either a String or a class that extends ByteArray. In the case where the source is a String, it is treated as a URL from which an icon file can be retrieved. Setting <codeph>source</codeph> to a String initiates a process where the image is retrieved from the URL. In the case of a ByteArray subclass, the class is immediately parsed and the display list is updated. The latter scenario is the result of using the @Embed(...) compiler directive.</p> <p>Note that when using the @Embed(...) directive, the <codeph>mime-type</codeph> property of the @Embed directive must be set to <codeph>application/octet-stream</codeph></p>
This property can be used as the source for data binding.
public function get source():Object
public function set source(value:Object):void
IconLoader | () | Constructor |
public function IconLoader()
Constructor