Package heronarts.lx
Class LXRegistry
java.lang.Object
heronarts.lx.LXRegistry
- All Implemented Interfaces:
LXSerializable
- Direct Known Subclasses:
LXStudio.Registry
Registry container for content classes used by the LX implementation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclassJSON fixture typestatic interfaceclassNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of globally registered channel blend classesprotected LXClassLoaderThe list of globally registered crossfader blend classesThe list of globally registered effectsList of globally registered fixtures.final List<LXRegistry.JsonFixture.Error> final List<LXRegistry.JsonFixture> The list of globally registered JSON fixture typesfinal LXfinal List<Class<? extends LXModulator>> The list of globally registered effectsfinal List<LXClassLoader.Package> Registered packagesfinal List<LXRegistry.Plugin> Registered pluginsThe list of globally registered transition blend classesstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRegister a [channel and crossfader] blend class with the engineRegister multiple [channel and crossfader] blend classes with the engineaddChannelBlend(Class<? extends LXBlend> blend) Register a channel blend class with the engineaddChannelBlends(Class<LXBlend>[] blends) Register multiple channel blend classes with the engineprotected voidaddClass(Class<?> clz, LXClassLoader.Package pack) addCrossfaderBlend(Class<? extends LXBlend> blend) Register a crossfader blend class with the engineaddCrossfaderBlends(Class<LXBlend>[] blends) Register multiple crossfader blend classes with the engineRegister an effect class with the engineaddEffects(Class<? extends LXEffect>[] effects) Register an effect class with the engineaddFixture(Class<? extends LXFixture> fixture) Register a fixture class with the engineaddFixtures(List<Class<? extends LXFixture>> fixtures) Register a set of fixture classes with the engineaddListener(LXRegistry.Listener listener) addModulataors(Class<? extends LXModulator>[] modulators) Deprecated.Use addModulators without typoaddModulator(Class<? extends LXModulator> modulator) Register a modulator class with the engineaddModulators(Class<? extends LXModulator>[] modulators) Register an array of modulator classes with the engineaddPattern(Class<? extends LXPattern> pattern) Register a pattern class with the engineaddPatterns(Class<? extends LXPattern>[] patterns) Register a pattern class with the engineprotected voidprotected voidaddTag(Class<? extends LXComponent> component, String tag) Add a tag to the given component typeaddTransitionBlend(Class<? extends LXBlend> blend) Register a transition blend class with the engineaddTransitionBlends(Class<LXBlend>[] blends) Register multiple channel blend classes with the enginevoidprotected voidfindPackage(File file) Find a package that matches the package name in the given fileClass<?> protected LXRegistry.ComponentTypegetInstantiableComponentType(Class<?> clz) getTags(Class<? extends LXComponent> component) Get the set of tags for a given component classprotected voidprotected voidbooleaninstallPackage(File file) booleaninstallPackage(File file, boolean overwrite) booleanisDefaultTag(Class<? extends LXComponent> component, String tag) Whether a given tag is a default tag for the component typebooleanisPluginClassEnabled(Class<? extends LXPlugin> pluginClass) voidload(LX lx, JsonObject object) Restores this instance from a JSON objectvoidvoidvoidprotected voidremoveClass(Class<?> clz) removeEffect(Class<? extends LXEffect> effect) Unregister effect class with the engineremoveEffects(List<Class<? extends LXEffect>> effects) Unregister effect classes with the engineremoveFixture(Class<? extends LXFixture> fixture) Unregister fixture class with the engineremoveFixtures(List<Class<? extends LXFixture>> fixtures) Unregister fixture classes with the engineremoveListener(LXRegistry.Listener listener) removeModulator(Class<? extends LXModulator> modulator) Unregister modulator class with the engineremoveModulators(List<Class<? extends LXModulator>> modulators) Unregister modulators classes with the engineremovePattern(Class<? extends LXPattern> pattern) Unregister pattern class with the engineremovePatterns(List<Class<? extends LXPattern>> patterns) Unregister pattern classes with the engineremoveTag(Class<? extends LXComponent> component, String tag) Remove a tag from the given component typevoidvoidsave(LX lx, JsonObject object) Serializes this instance into the JSON objectvoidvoiduninstallPackage(LXClassLoader.Package pack, boolean reload)
-
Field Details
-
patterns
-
effects
The list of globally registered effects -
modulators
The list of globally registered effects -
fixtures
List of globally registered fixtures. -
channelBlends
The list of globally registered channel blend classes -
transitionBlends
The list of globally registered transition blend classes -
crossfaderBlends
The list of globally registered crossfader blend classes -
jsonFixtures
The list of globally registered JSON fixture types -
jsonFixtureErrors
-
packages
Registered packages -
plugins
Registered plugins -
lx
-
classLoader
-
VALID_TAG_REGEX
- See Also:
-
-
Constructor Details
-
LXRegistry
-
-
Method Details
-
addListener
-
removeListener
-
getClassLoader
-
getClass
- Throws:
ClassNotFoundException
-
initialize
protected void initialize() -
checkRegistration
public void checkRegistration() -
runWatchService
public void runWatchService() -
reloadContent
public void reloadContent() -
reloadJsonFixtures
public void reloadJsonFixtures() -
installPackage
-
reinstallPackageMedia
-
installPackage
-
uninstallPackage
-
uninstallPackage
-
findPackage
Find a package that matches the package name in the given file- Parameters:
file- Package file- Returns:
- Existing package which matches, or null if none exists
-
getInstantiableComponentType
-
addClass
-
removeClass
-
addPattern
Register a pattern class with the engine- Parameters:
pattern- Pattern class- Returns:
- this
-
addPatterns
Register a pattern class with the engine- Parameters:
patterns- List of pattern classes- Returns:
- this
-
removePattern
Unregister pattern class with the engine- Parameters:
pattern- Pattern class- Returns:
- this
-
removePatterns
Unregister pattern classes with the engine- Parameters:
patterns- Pattern classes- Returns:
- this
-
addEffect
Register an effect class with the engine- Parameters:
effect- Effect class- Returns:
- this
-
addEffects
Register an effect class with the engine- Parameters:
effects- List of effect classes- Returns:
- this
-
removeEffect
Unregister effect class with the engine- Parameters:
effect- Effect class- Returns:
- this
-
removeEffects
Unregister effect classes with the engine- Parameters:
effects- Effect classes- Returns:
- this
-
addTag
Add a tag to the given component type- Parameters:
component- Component classtag- Tag- Returns:
- this
-
removeTag
Remove a tag from the given component type- Parameters:
component- Component typetag- Tag- Returns:
- this
-
getTags
Get the set of tags for a given component class- Parameters:
component- Component type- Returns:
- An unmodifiable list of tags, or null if no tags exist
-
isDefaultTag
Whether a given tag is a default tag for the component type- Parameters:
component- Component typetag- Tag- Returns:
- Whether this tag is a default annotation-tag for the component type
-
addModulator
Register a modulator class with the engine- Parameters:
modulator- Modulator class- Returns:
- this
-
addModulataors
Deprecated.Use addModulators without typoRegister an array of modulator classes with the engine- Parameters:
modulators- List of modulator classes- Returns:
- this
-
addModulators
Register an array of modulator classes with the engine- Parameters:
modulators- List of modulator classes- Returns:
- this
-
removeModulator
Unregister modulator class with the engine- Parameters:
modulator- Modulator class- Returns:
- this
-
removeModulators
Unregister modulators classes with the engine- Parameters:
modulators- Modulators classes- Returns:
- this
-
addFixture
Register a fixture class with the engine- Parameters:
fixture- Fixture class- Returns:
- this
-
addFixtures
Register a set of fixture classes with the engine- Parameters:
fixtures- List of fixture classes- Returns:
- this
-
removeFixture
Unregister fixture class with the engine- Parameters:
fixture- Fixture class- Returns:
- this
-
removeFixtures
Unregister fixture classes with the engine- Parameters:
fixtures- Fixture classes- Returns:
- this
-
addBlend
Register a [channel and crossfader] blend class with the engine- Parameters:
blend- Blend class- Returns:
- this
-
addBlends
Register multiple [channel and crossfader] blend classes with the engine- Parameters:
blends- List of blend classes- Returns:
- this
-
addChannelBlend
Register a channel blend class with the engine- Parameters:
blend- Blend class- Returns:
- this
-
addChannelBlends
Register multiple channel blend classes with the engine- Parameters:
blends- List of blend classes- Returns:
- this
-
addTransitionBlend
Register a transition blend class with the engine- Parameters:
blend- Blend class- Returns:
- this
-
addTransitionBlends
Register multiple channel blend classes with the engine- Parameters:
blends- List of blend classes- Returns:
- this
-
addCrossfaderBlend
Register a crossfader blend class with the engine- Parameters:
blend- Blend class- Returns:
- this
-
addCrossfaderBlends
Register multiple crossfader blend classes with the engine- Parameters:
blends- List of blend classes- Returns:
- this
-
addPlugin
-
addPlugin
-
initializePlugins
protected void initializePlugins() -
disposePlugins
protected void disposePlugins() -
isPluginClassEnabled
-
save
Description copied from interface:LXSerializableSerializes this instance into the JSON object- Specified by:
savein interfaceLXSerializable- Parameters:
lx- LX instanceobject- Object to serialize into
-
load
Description copied from interface:LXSerializableRestores this instance from a JSON object- Specified by:
loadin interfaceLXSerializable- Parameters:
lx- LX instanceobject- Object to deserialize
-