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.
  • Constructor Details

    • ControlDescriptor

      protected ControlDescriptor(Class<T> type, String id, ControlDescriptor.Category category, int index)
      Create a ControlDescriptor.
      Parameters:
      type - type of the descriptor
      id - the ID (must be a valid control ID)
      category - the category
      index - the index within the category (used for ordering - must be unique)
  • Method Details

    • category

      public ControlDescriptor.Category category()
      Get the category.
      Returns:
      category
    • index

      public int index()
      Get the index.
      Returns:
      index
    • controlInfo

      public abstract ControlInfo controlInfo()
      Get the control info for this control.
      Returns:
      info
    • control

      public abstract Control control()
      Get the wrapped control. Should only be called when attached - behaviour is otherwise undefined.
      Returns:
      control