The
metadata tag has the following syntax:
[IconFile]
[IconFile("fileName")]
The
property specifies a PNG, GIF, or JPEG file that contains the icon, as the
fileName
following example shows:
[IconFile("MyButton.png")]
public class MyButton extends Button
{
...
}
Inspectable metadata tag
The
[Inspectable]
that you expose in code hints and in the Property Inspector area of Flex Builder. The
metadata tag is not required for either code hints or the Property Inspector.
[Inspectable]
The following rules determine how Flex Builder displays this information:
All public properties in components appear in code hints and in the Flex Builder Property
■
Inspector. If you have extra information about the property that you want to add, such as
enumeration values or that a String property represents a file path, then add the
metadata tag with that information.
[Inspectable]
Code hints for components and the information in the Property Inspector come from the
■
same data. Therefore, if the attribute appears in one, it should appear in the other.
Code hints for ActionScript components do not require metadata to work correctly so you
■
always see the appropriate code hints, depending the current scope. Flex Builder uses the
,
public
protected
which ActionScript code hints to show.
The
[Inspectable]
declaration or the setter and getter methods to be bound to that property.
The
[Inspectable]
[Inspectable(attribute=value[,attribute=value,...])]
property_declaration name:type;
[Inspectable(attribute=value[,attribute=value,...])]
setter_getter_declarations;
58
Using Metadata Tags in Custom Components
metadata tag defines information about an attribute of your component
,
, and
private
static
metadata tag must immediately precede the property's variable
metadata tag has the following syntaxes:
keywords plus the current scope to determine