Class LXPattern.Placeholder

All Implemented Interfaces:
LXComponent.Placeholder, LXComponent.Renamable, LXLoopTask, LXPath, LXPresetComponent, LXSerializable, LXMidiListener, LXModulationContainer, LXOscComponent, LXParameterListener
Enclosing class:
LXPattern

public static class LXPattern.Placeholder extends LXPattern implements LXComponent.Placeholder
Placeholder pattern for when a class is missing
  • Constructor Details

  • Method Details

    • getPlaceholderTypeName

      public String getPlaceholderTypeName()
      Specified by:
      getPlaceholderTypeName in interface LXComponent.Placeholder
    • getPlaceholderClassName

      public String getPlaceholderClassName()
      Specified by:
      getPlaceholderClassName in interface LXComponent.Placeholder
    • getInstantiationException

      public LX.InstantiationException getInstantiationException()
      Specified by:
      getInstantiationException in interface LXComponent.Placeholder
    • save

      public void save(LX lx, JsonObject object)
      Description copied from class: LXComponent
      Serializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to call super.save(lx, obj) at the appropriate time.
      Specified by:
      save in interface LXSerializable
      Overrides:
      save in class LXPattern
      Parameters:
      lx - LX instance
      object - Object to serialize into
    • load

      public void load(LX lx, JsonObject object)
      Description copied from class: LXComponent
      Loads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.
      Specified by:
      load in interface LXSerializable
      Overrides:
      load in class LXPattern
      Parameters:
      lx - LX instance
      object - Object to deserialize
    • run

      protected void run(double deltaMs)
      Description copied from class: LXPattern
      Main pattern loop function. Invoked in a render loop. Subclasses must implement this function.
      Specified by:
      run in class LXPattern
      Parameters:
      deltaMs - Number of milliseconds elapsed since last invocation