|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ModuleInterface
This is the interface that each module needs to implement in order to be loadable into ArgoUML according to the new module loader API.
| Field Summary | |
|---|---|
static int |
AUTHOR
The author of the module. |
static int |
DESCRIPTION
The description of the module. |
static int |
DOWNLOADSITE
The URL of the website stating information on where to download the module. |
static int |
VERSION
The version of the module. |
| Method Summary | |
|---|---|
boolean |
disable()
Method to disable the module. |
boolean |
enable()
Method to enable the module. |
java.lang.String |
getInfo(int type)
The info about the module. |
java.lang.String |
getName()
The name of the module. |
| Field Detail |
|---|
static final int DESCRIPTION
static final int AUTHOR
static final int VERSION
static final int DOWNLOADSITE
| Method Detail |
|---|
boolean enable()
If it cannot enable the module because some other module is
not enabled it can return false.
In that case the module loader will defer this attempt until
all other modules are loaded (or until some more of ArgoUML is loaded
if at startup). Eventually it is only this and some other modules
that is not loaded and they will then be listed as having problems.
boolean disable()
If we cannot disable the module because some other module relies on it, we return false. This will then make it impossible to turn off. (An error is signalled at the attempt).
java.lang.String getName()
This should be a short string. For the purpose of having the GUI that turns on and off the module look nice there is no whitespace in this string (no spaces, tabs or newlines).
This name is also used as the key internally when modules checks for other modules, if they are available.
java.lang.String getInfo(int type)
This returns texts with information about the module.
The possible informations are retrieved by giving any of the arguments:
If a module does not provide a specific piece of information,null can be returned. Hence the normal implementation
should be:
public String getInfo(int type) {
switch (type) {
case DESCRIPTION:
return "This module does ...";
case AUTHOR:
return "Annie Coder";
default:
return null;
}
type - The type of information.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Cookbook |