Package ca.cgjennings.apps.arkham
Interface StrangeEons.PluginLoadingListener
-
- All Superinterfaces:
java.util.EventListener
- Enclosing class:
- StrangeEons
public static interface StrangeEons.PluginLoadingListener extends java.util.EventListener
An event interface implemented by classes that will listen for plug-ins to be loaded or unloaded. Code that wishes to behave differently depending on whether a (non-extension) plug-in is loaded should listen for plug-ins to be reloaded and update their behaviour accordingly. For example, suppose you have a game component editor that can make use of a tool provided by a plug-in, if that plug-in is installed. The editor can add a button to its interface which is only enabled if the plug-in is loaded. It should check if the plug-in is installed when the editor is first created and set the button's initial enabled state accordingly. It should also add a listener so it can update the button whenever plug-ins are reloaded. Finally, it should remove the listener when the editor is closed to ensure that editor can be garbage collected.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PLUGIN_LOAD_EVENT
Event type code indicating that the application has just loaded (or reloaded) the plug-in set.static int
PLUGIN_UNLOAD_EVENT
Event type code indicating that the application has just unloaded all loaded plug-ins.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
pluginsLoaded(int eventType)
Called after the application loads, reloads, or unloads plug-ins.
-
-
-
Field Detail
-
PLUGIN_LOAD_EVENT
static final int PLUGIN_LOAD_EVENT
Event type code indicating that the application has just loaded (or reloaded) the plug-in set.- See Also:
- Constant Field Values
-
PLUGIN_UNLOAD_EVENT
static final int PLUGIN_UNLOAD_EVENT
Event type code indicating that the application has just unloaded all loaded plug-ins.- See Also:
- Constant Field Values
-
-
Method Detail
-
pluginsLoaded
void pluginsLoaded(int eventType)
Called after the application loads, reloads, or unloads plug-ins. The value ofeventType
describes the type of load event:
PLUGIN_LOAD_EVENT
: plug-ins have been loaded (or reloaded)
PLUGIN_UNLOAD_EVENT
: plug-ins have been unloaded- Parameters:
eventType
- the type of load event
-
-