|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.adaptation.gui.AdaptationModule
public class AdaptationModule
A module to integrate the translator into the GUI.
| Nested Class Summary | |
|---|---|
(package private) class |
AdaptationModule.DistributeAction
Distribute configuration of nodes onto machines. |
(package private) class |
AdaptationModule.ExportAction
Export configuration of nodes to files. |
(package private) class |
AdaptationModule.TransAction
Base class for export and distribute actions. |
(package private) class |
AdaptationModule.TranslatorConfig
Configuration panel for the translation module. |
| Field Summary | |
|---|---|
private Document |
config
configuration of this module. |
private static String |
configName
The name for the configuration data used in VerinecStudio.saveConfig(String, Document). |
private IDistributorFactory |
distFact
The distributor factory instance. |
private static String |
DISTRIBUTE_ICON
The icon for distributing configuration. |
private static String |
EXPORT_ICON
The icon for exporting configuration xml. |
(package private) Logger |
logger
|
private VerinecStudio |
studio
|
private Translator |
translator
The translator instance. |
| Constructor Summary | |
|---|---|
AdaptationModule()
Initialise the module. |
|
| Method Summary | |
|---|---|
void |
distributeConfig(Element e)
Compile the configuration XML and write it out into a file. |
void |
exportConfig(Element e)
Compile the configuration XML and write it out into a file. |
ConfigPanel |
getConfigPanel()
Get a configuration dialog. |
private File |
getExportPath()
|
private Document |
getModuleConfig()
Create the stored configuration for this module. |
void |
load(VerinecStudio a)
Hook the module into the gui. |
void |
saveConfiguration(Document conf)
Save new configuration |
String |
toString()
Return the name of this module: Distributor. |
private Document |
translate(Element e)
|
void |
unload()
Do clean up when module gets unloaded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
Logger logger
private static final String DISTRIBUTE_ICON
private static final String EXPORT_ICON
private VerinecStudio studio
private Document config
private static final String configName
VerinecStudio.saveConfig(String, Document).
private Translator translator
private IDistributorFactory distFact
| Constructor Detail |
|---|
public AdaptationModule()
throws VerinecException
TranslationRepFactory.createRepository()
The distributor factory is created with Distribute.createFactory()
VerinecException - If the distributor factory or translator can not be instantiated.| Method Detail |
|---|
public String toString()
toString in interface IVerinecModuletoString in class Object
public void load(VerinecStudio a)
throws VerinecException
load in interface IVerinecModulea - The main application.
VerinecException - If initializing goes wrong.public void unload()
unload in interface IVerinecModuleprivate Document getModuleConfig()
private File getExportPath()
private Document translate(Element e)
throws VerinecException
VerinecException
public void exportConfig(Element e)
throws VerinecException
e - A nodes XML definition.
VerinecException - If something goes wrong.
public void distributeConfig(Element e)
throws VerinecException
e - A nodes XML definition.
VerinecException - If something goes wrong.public ConfigPanel getConfigPanel()
getConfigPanel in interface IConfigurablepublic void saveConfiguration(Document conf)
saveConfiguration in interface IConfigurableconf - The new configuration.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||