Module org.praxislive.code
Package org.praxislive.code
Class ControlDescriptor<T extends ControlDescriptor<T>>
java.lang.Object
org.praxislive.code.Descriptor<T>
org.praxislive.code.ControlDescriptor<T>
- Direct Known Subclasses:
InfoProperty.Descriptor,PropertyControl.Descriptor,ResourceProperty.Descriptor,TriggerControl.Descriptor
public abstract non-sealed class ControlDescriptor<T extends ControlDescriptor<T>>
extends Descriptor<T>
A ControlDescriptor wraps a Control in a CodeContext. It includes ID,
category, order and info, as well as configuring the control on attachment
and reset. The underlying control may be configured from the previous
iteration or carried across.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCategories of control, which also affects broad ordering of controls. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedControlDescriptor(Class<T> type, String id, ControlDescriptor.Category category, int index) Create a ControlDescriptor. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Get the category.abstract Controlcontrol()Get the wrapped control.abstract ControlInfoGet the control info for this control.intindex()Get the index.
-
Constructor Details
-
ControlDescriptor
protected ControlDescriptor(Class<T> type, String id, ControlDescriptor.Category category, int index) Create a ControlDescriptor.- Parameters:
type- type of the descriptorid- the ID (must be a valid control ID)category- the categoryindex- the index within the category (used for ordering - must be unique)
-
-
Method Details
-
category
Get the category.- Returns:
- category
-
index
public int index()Get the index.- Returns:
- index
-
controlInfo
Get the control info for this control.- Returns:
- info
-
control
Get the wrapped control. Should only be called when attached - behaviour is otherwise undefined.- Returns:
- control
-