Package heronarts.lx

Class LXRegistry

java.lang.Object
heronarts.lx.LXRegistry
All Implemented Interfaces:
LXSerializable
Direct Known Subclasses:
LXStudio.Registry

public class LXRegistry extends Object implements LXSerializable
Registry container for content classes used by the LX implementation
  • Field Details

    • patterns

      public final List<Class<? extends LXPattern>> patterns
    • effects

      public final List<Class<? extends LXEffect>> effects
      The list of globally registered effects
    • modulators

      public final List<Class<? extends LXModulator>> modulators
      The list of globally registered effects
    • channelBlends

      public final List<Class<? extends LXBlend>> channelBlends
      The list of globally registered channel blend classes
    • transitionBlends

      public final List<Class<? extends LXBlend>> transitionBlends
      The list of globally registered transition blend classes
    • crossfaderBlends

      public final List<Class<? extends LXBlend>> crossfaderBlends
      The list of globally registered crossfader blend classes
    • fixtures

      public final List<Class<? extends LXFixture>> fixtures
      List of globally registered fixtures.
    • jsonFixtures

      public final List<LXRegistry.JsonFixture> jsonFixtures
      The list of globally registered JSON fixture types
    • jsonFixtureErrors

      public final List<LXRegistry.JsonFixture.Error> jsonFixtureErrors
    • packages

      public final List<LXClassLoader.Package> packages
      Registered packages
    • plugins

      public final List<LXRegistry.Plugin> plugins
      Registered plugins
    • lx

      public final LX lx
    • classLoader

      protected LXClassLoader classLoader
  • Constructor Details

    • LXRegistry

      public LXRegistry(LX lx)
  • Method Details

    • addListener

      public LXRegistry addListener(LXRegistry.Listener listener)
    • removeListener

      public LXRegistry removeListener(LXRegistry.Listener listener)
    • initialize

      protected void initialize()
    • checkRegistration

      public void checkRegistration()
    • reloadContent

      public void reloadContent()
    • installPackage

      public boolean installPackage(File file)
    • installPackage

      public boolean installPackage(File file, boolean overwrite)
    • uninstallPackage

      public void uninstallPackage(LXClassLoader.Package pack)
    • addClass

      protected void addClass(Class<?> clz)
    • removeClass

      protected void removeClass(Class<?> clz)
    • addPattern

      public LXRegistry addPattern(Class<? extends LXPattern> pattern)
      Register a pattern class with the engine
      Parameters:
      pattern - Pattern class
      Returns:
      this
    • addPatterns

      public LXRegistry addPatterns(Class<? extends LXPattern>[] patterns)
      Register a pattern class with the engine
      Parameters:
      patterns - List of pattern classes
      Returns:
      this
    • removePattern

      public LXRegistry removePattern(Class<? extends LXPattern> pattern)
      Unregister pattern class with the engine
      Parameters:
      pattern - Pattern class
      Returns:
      this
    • removePatterns

      public LXRegistry removePatterns(List<Class<? extends LXPattern>> patterns)
      Unregister pattern classes with the engine
      Parameters:
      patterns - Pattern classes
      Returns:
      this
    • addEffect

      public LXRegistry addEffect(Class<? extends LXEffect> effect)
      Register an effect class with the engine
      Parameters:
      effect - Effect class
      Returns:
      this
    • addEffects

      public LXRegistry addEffects(Class<? extends LXEffect>[] effects)
      Register an effect class with the engine
      Parameters:
      effects - List of effect classes
      Returns:
      this
    • removeEffect

      public LXRegistry removeEffect(Class<? extends LXEffect> effect)
      Unregister effect class with the engine
      Parameters:
      effect - Effect class
      Returns:
      this
    • removeEffects

      public LXRegistry removeEffects(List<Class<? extends LXEffect>> effects)
      Unregister effect classes with the engine
      Parameters:
      effects - Effect classes
      Returns:
      this
    • addModulator

      public LXRegistry addModulator(Class<? extends LXModulator> modulator)
      Register a modulator class with the engine
      Parameters:
      modulator - Modulator class
      Returns:
      this
    • addModulataors

      @Deprecated public LXRegistry addModulataors(Class<? extends LXModulator>[] modulators)
      Deprecated.
      Use addModulators without typo
      Register an array of modulator classes with the engine
      Parameters:
      modulators - List of modulator classes
      Returns:
      this
    • addModulators

      public LXRegistry addModulators(Class<? extends LXModulator>[] modulators)
      Register an array of modulator classes with the engine
      Parameters:
      modulators - List of modulator classes
      Returns:
      this
    • removeModulator

      public LXRegistry removeModulator(Class<? extends LXModulator> modulator)
      Unregister modulator class with the engine
      Parameters:
      modulator - Modulator class
      Returns:
      this
    • removeModulators

      public LXRegistry removeModulators(List<Class<? extends LXModulator>> modulators)
      Unregister modulators classes with the engine
      Parameters:
      modulators - Modulators classes
      Returns:
      this
    • addFixture

      public LXRegistry addFixture(Class<? extends LXFixture> fixture)
      Register a fixture class with the engine
      Parameters:
      fixture - Fixture class
      Returns:
      this
    • addFixtures

      public LXRegistry addFixtures(List<Class<? extends LXFixture>> fixtures)
      Register a set of fixture classes with the engine
      Parameters:
      fixtures - List of fixture classes
      Returns:
      this
    • removeFixture

      public LXRegistry removeFixture(Class<? extends LXFixture> fixture)
      Unregister fixture class with the engine
      Parameters:
      fixture - Fixture class
      Returns:
      this
    • removeFixtures

      public LXRegistry removeFixtures(List<Class<? extends LXFixture>> fixtures)
      Unregister fixture classes with the engine
      Parameters:
      fixtures - Fixture classes
      Returns:
      this
    • addBlend

      public LXRegistry addBlend(Class<? extends LXBlend> blend)
      Register a [channel and crossfader] blend class with the engine
      Parameters:
      blend - Blend class
      Returns:
      this
    • addBlends

      public LXRegistry addBlends(Class<LXBlend>[] blends)
      Register multiple [channel and crossfader] blend classes with the engine
      Parameters:
      blends - List of blend classes
      Returns:
      this
    • addChannelBlend

      public LXRegistry addChannelBlend(Class<? extends LXBlend> blend)
      Register a channel blend class with the engine
      Parameters:
      blend - Blend class
      Returns:
      this
    • addChannelBlends

      public LXRegistry addChannelBlends(Class<LXBlend>[] blends)
      Register multiple channel blend classes with the engine
      Parameters:
      blends - List of blend classes
      Returns:
      this
    • addTransitionBlend

      public LXRegistry addTransitionBlend(Class<? extends LXBlend> blend)
      Register a transition blend class with the engine
      Parameters:
      blend - Blend class
      Returns:
      this
    • addTransitionBlends

      public LXRegistry addTransitionBlends(Class<LXBlend>[] blends)
      Register multiple channel blend classes with the engine
      Parameters:
      blends - List of blend classes
      Returns:
      this
    • addCrossfaderBlend

      public LXRegistry addCrossfaderBlend(Class<? extends LXBlend> blend)
      Register a crossfader blend class with the engine
      Parameters:
      blend - Blend class
      Returns:
      this
    • addCrossfaderBlends

      public LXRegistry addCrossfaderBlends(Class<LXBlend>[] blends)
      Register multiple crossfader blend classes with the engine
      Parameters:
      blends - List of blend classes
      Returns:
      this
    • addPlugin

      protected void addPlugin(Class<? extends LXPlugin> plugin)
    • initializePlugins

      protected void initializePlugins()
    • disposePlugins

      protected void disposePlugins()
    • save

      public void save(LX lx, JsonObject object)
      Description copied from interface: LXSerializable
      Serializes this instance into the JSON object
      Specified by:
      save in interface LXSerializable
      Parameters:
      lx - LX instance
      object - Object to serialize into
    • load

      public void load(LX lx, JsonObject object)
      Description copied from interface: LXSerializable
      Restores this instance from a JSON object
      Specified by:
      load in interface LXSerializable
      Parameters:
      lx - LX instance
      object - Object to deserialize