-
@Retention(RUNTIME) @Target(FIELD) public @interface P
Annotate a field as a property. A control and port will be automatically created so that values of the field can be queried or set from the UI or other components. Field values will also be stored in the project, and available when copying or exporting, unless the field is read-only or transient.The @P annotation may be used on fields of type
Property
, or any field type that can be backed by a Property - String, double, float, int, boolean, PArray, PBytes, any enum, any Serializable implementation, or a List of Serializable subclasses.The @P annotation can also be used on fields that represent a represent loadable resource, in which case the port / control will accept a URL and the field type will be the loaded resource. See specific custom code types for what resources they support loading.
Use the various
Type
annotations to set default values, allowed values, ranges, etc. Use@Port
to suppress automatic creation of a port. Use@Transient
to stop the field value being saved as part of the project. Use@ReadOnly
to stop the field being settable externally (it can still be set in code).
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description int
value
Relative position compared to other @P elements.
-