|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.helpers.ALDEnvironmentConfig
de.unihalle.informatik.MiToBo.core.helpers.MTBEnvironmentConfig
public class MTBEnvironmentConfig
This class extends the super class with routines to access ImageJ properties.
Every MiToBo operator and also every class can define properties. To ensure a certain structure of the properties and avoid chaos in property names the properties should commit to the following convention: mitobo.operatorname.property The corresponding environment variable will then be MITOBO_OPERATORNAME_PROPERTY following common Unix/Linux conventions.
Constructor Summary | |
---|---|
MTBEnvironmentConfig()
|
Method Summary | |
---|---|
static java.lang.String |
getConfigValue(java.lang.String _operator,
java.lang.String _envVariable)
This function reads out the value of a given environment property. |
static java.lang.String |
getEnvVarValue(java.lang.String _operator,
java.lang.String _envVariable)
This function reads out the value of a given environment variable. |
static java.lang.String |
getImageJPropValue(java.lang.String plugin,
java.lang.String envVariable)
This function reads out the value of a given ImageJ preference. |
static java.lang.String |
getJVMPropValue(java.lang.String _operator,
java.lang.String _envVariable)
This function reads out the value of a given JVM property. |
static void |
setImageJPref(java.lang.String plugin,
java.lang.String envVar,
java.lang.String val)
This functions sets a given property to the specified value. |
Methods inherited from class de.unihalle.informatik.Alida.helpers.ALDEnvironmentConfig |
---|
getConfigValue, getJVMPropValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MTBEnvironmentConfig()
Method Detail |
---|
public static java.lang.String getConfigValue(java.lang.String _operator, java.lang.String _envVariable)
Here the default prefix "mitobo" is assumed. It is combined with operator and environment variable name in this order.
_operator
- Name of the operator._envVariable
- Name of the property.
public static java.lang.String getEnvVarValue(java.lang.String _operator, java.lang.String _envVariable)
Default prefix is "mitobo".
_operator
- Name of operator, ignored if null._envVariable
- Name of the variable.
public static java.lang.String getImageJPropValue(java.lang.String plugin, java.lang.String envVariable)
plugin
- Name of plugin, ignored if null.envVariable
- Name of the preference.
public static java.lang.String getJVMPropValue(java.lang.String _operator, java.lang.String _envVariable)
Default prefix is "mitobo".
_operator
- Name of operator, ignored if null._envVariable
- Name of the property.
public static void setImageJPref(java.lang.String plugin, java.lang.String envVar, java.lang.String val)
The properties are saved to ~/.imagej/Prefs.txt when the ImageJ gui is properly closed (not killed!) by the user. Note that already defined property are simply overwritten with new values if the method is called on existing properties.
plugin
- Name of Mitobo plugin, ignored if null.envVar
- Name of property.val
- Value of property.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |