The Meta-Environment API

nl.cwi.sen1.gui.plugin
Interface StudioPlugin

All Known Implementing Classes:
DefaultStudioPlugin

public interface StudioPlugin

A plugin for the MetaStudio. A plugin is a program that is dynamically loaded into the MetaStudio, and runs in its own thread. The thread is started with a call to @see #initStudioPlugin(Studio studio).


Method Summary
 void addStudioPluginListener(StudioPluginListener l)
          Register a listener.
 java.lang.String getName()
          Get the name of a plugin.
 void initStudioPlugin(Studio studio)
          The main method of a plugin.
 void removeStudioPluginListener(StudioPluginListener l)
          Unregister a listener.
 

Method Detail

getName

java.lang.String getName()
Get the name of a plugin. This is used to construct proper names of threads and to construct meaningfull error messages. Pick a unique name.

Returns:
The name of a plugin.

initStudioPlugin

void initStudioPlugin(Studio studio)
The main method of a plugin. This method is provided a reference to the toplevel window, and the ToolBus, via the @see Studio interface.

Parameters:
studio - Reference to functionality of the toplevel window.

addStudioPluginListener

void addStudioPluginListener(StudioPluginListener l)
Register a listener. The Studio listens to important events from all plugins. The functionality of the whole Studio may break if the observer pattern is not implemented correctly here.

Parameters:
l - An implementation of a listener (usually the studio itself).
See Also:
provides a default implementation.

removeStudioPluginListener

void removeStudioPluginListener(StudioPluginListener l)
Unregister a listener.

Parameters:
l - Listener to be unregistered.

The Meta-Environment API