|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Property
public class Property
Internal class for handling of dynamic properties. Should only be used
through the methods provided by Class
.
For a complete documentation of properties take a look at http://qooxdoo.org/documentation/developer_manual/properties.
Normal properties
The properties
key in the class definition map of qx.Class#define
is used to generate the properties.
Valid keys of a property definition are:
Name | Type | Description |
---|---|---|
check | Array, String, Function |
The check is used to validate the incoming value of a property. The check can be:
|
init | var |
Sets the default/initial value of the property. If no property value is set or the property
gets reset, the getter will return the init value.
|
apply | String |
On change of the property value the method of the specified name will be called. The signature of
the method is function(newValue, oldValue) .
|
event | String |
On change of the property value an event with the given name will be dispached. The event type is
ChangeEvent .
|
themeable | Boolean | Whether this property can be set using themes. |
inheritable | Boolean | Whether the property value should be inheritable. If the property does not have a user defined or an init value, the property will try to get the value from the parent of the current object. |
nullable | Boolean |
Whether null is an allowed value of the property. This is complemental to the check
defined using the check key.
|
refine | Boolean |
Whether the property definition is a refinemnet of a property in one of the super classes of the class.
Only the init value can be changed using refine.
|
transform | String |
On setting of the property value the method of the specified name will
be called. The signature of the method is function(value) .
The parameter value is the value passed to the setter.
The function must return the modified or unmodified value.
Transformation occurs before the check function, so both may be
specified if desired. Alternatively, the transform function may throw
an error if the value passed to it is invalid.
|
Property groups
Property groups are defined in a similar way but support a different set of keys:
Name | Type | Description |
---|---|---|
group | String[] | A list of property names which should be set using the propery group. |
mode | String |
If mode is set to "shorthand" , the properties can be set using a CSS like shorthand mode.
|
themeable | Boolean | Whether this property can be set using themes. |
Constructor Summary | |
---|---|
Property()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Property()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |