Table of Contents
- Property definition
- Checking for pre-defined types
- Checking for instances
- Set of allowed values
- Custom check method
- Nullable properties
- Modifying existing properties
- Defining name of event for property changes
- Apply method
- Shared apply method
- Fallback to init value
- Distinct value for themes
- Apply of initial value
- Inheritance support
Property Summary
Property definition
Part of the class definition:
properties : { test: {} }
Checking for pre-defined types
test: { check : "String" }
The names of types are identical to the ones used in the API viewer:
Boolean,String,Number,Integer,Float,DoubleObject,Array,MapClass,Mixin,Interface,ThemeError,RegExp,Function,Date,Node,Element,Document,Window,Event
Checking for instances
test: { check : "qx.core.Object" }
Set of allowed values
Given as an array of allowed values:
test: { check : [ "red", "blue", "yellow" ] }
Custom check method
The custom check method can be placed right into the property declaration:
test: { check : function(value) { // do check..., } }
Nullable properties
By default properties are not nullable.
test: { nullable : true }
Modifying existing properties
test: { refine : true, init : "world" }
Defining name of event for property changes
test: { event : "testChanged" }
Apply method
Explicit. A leading _apply is a preferred convention.
test: { apply: "_applyTest" }
Shared apply method
width: { apply : "_applyDimension" }, height: { apply : "_applyDimension" }
Fallback to init value
Supported. Init value is recoverable using reset method.
Distinct value for themes
Supported. A themeable value is stored separately and has a lower priority than the user value.
Apply of initial value
Supported. It is possible to initialize a property in the class constructor.
Inheritance support
Supported. It is possible to enable inheritance on property level. Supports overriding, too.
