verinec.gui
Interface IVerinecModule

All Known Implementing Classes:
AdaptationModule, Configurator, ImporterModule, Simulator, ValidationGui

public interface IVerinecModule

The Verinec Editor provides an api to plug in modules. Every plugin module must implement this interface.

When a module gets active, its load method is called. This is the moment to add custom menues or actions. To access the NwComponents currently loaded, use VerinecStudio.getNetworkComponents(). The module is unloaded and loaded again when an other network is opened in the gui.

The plugin does not need to clean up its menues or context menues at unload, because menues and items are recreated each time the module is changed.

If the module needs to store any settings, it should use the VerinecStudio.loadConfig(String) and VerinecStudio.saveConfig(String,org.jdom.Document) methods.
It can have a configuration dialog to display in the verinec application settings dialog. To announce its configurability to the GUI, it must implement the IConfigurable interface.

Author:
david.buchmann at unifr.ch

Method Summary
 void load(VerinecStudio parent)
          Load this module to be the active module.
 String toString()
          The toString method should just return the modules name for the module selection dropdown.
 void unload()
          Unload this module, it can clean up its own stuff etc.
 

Method Detail

load

void load(VerinecStudio parent)
          throws VerinecException
Load this module to be the active module. A module can rely on this method being called before it is used, except for the three configuration methods. During this method call, however, it is not yet the active module in the analyser. The module is unloaded and loaded again when an other network is opened in the gui.

Parameters:
parent - The analyser to use for call backs.
Throws:
VerinecException - If something goes wrong while loading. The module will not be used after throwing an exception.

unload

void unload()
Unload this module, it can clean up its own stuff etc. The module does not need to clean up the GUI, the framework will remove all context menues and toolbars added.


toString

String toString()
The toString method should just return the modules name for the module selection dropdown.

Overrides:
toString in class Object
Returns:
The module name for the dropdown.

Copyright © 2005 Verinec, DIUF