AS3: Display and direct edit trait Metadata

This commit is contained in:
Jindra Petřík
2015-07-17 14:33:15 +02:00
parent 5462342e3a
commit 113510a105
27 changed files with 311 additions and 35 deletions

View File

@@ -0,0 +1,8 @@
package classes
{
public class Test
{
}
}

View File

@@ -0,0 +1,9 @@
package classes
{
[Alternative(replacement="classes.Old", since="2.0")]
public class TestAlternative
{
}
}

View File

@@ -0,0 +1,9 @@
package classes
{
public class TestArrayElementType
{
[ArrayElementType("String")]
public var myStringProperty:Array;
}
}

View File

@@ -0,0 +1,9 @@
package classes
{
public class TestBindable
{
[Bindable("myevent")]
public var minFontSize:Number = 5;
}
}

View File

@@ -0,0 +1,21 @@
package classes
{
import spark.components.TextArea;
// Define the default property.
[DefaultProperty("defaultText")]
public class TestDefaultProperty extends TextArea {
// Define a setter method to set the text property
// to the value of the default property.
public function set defaultText(value:String):void {
if (value!=null)
text=value;
}
public function get defaultText():String {
return text;
}
}
}

View File

@@ -0,0 +1,10 @@
package classes
{
[Deprecated(message="Do not use this", replacement="Test class", since="2.0")]
public class TestDeprecated
{
[Deprecated("Obsolete attribute")]
public var a:int;
}
}

View File

@@ -0,0 +1,12 @@
package classes
{
// Define event corresponding to the effect trigger.
[Event(name="darken", type="flash.events.Event")]
// Define the effect.
[Effect(name="darkenEffect", event="darken")]
public class TestEffect_Event
{
}
}