Package de.mid.innovator.ui
Class PropertyCfg<T>
- java.lang.Object
-
- de.mid.innovator.ui.PropertyCfg<T>
-
public class PropertyCfg<T> extends java.lang.Object implements Property
The class is thePropertyinterface default implementation that can be used with Innovator applications. The application uses this class to specify the properties which it will react to upon runtime; this is done using aPropertyProvider. You can specify a wide array of property configurations that are, e.g. given to the PropertyProvider upon creation.- Author:
- borschet
- See Also:
PropertyProvider,Property,PropertyProviderDefault
-
-
Constructor Summary
Constructors Constructor Description PropertyCfg(java.lang.String key, java.lang.String help)Creates a property configuration without a default value.PropertyCfg(java.lang.String key, T defVal, java.lang.String help)Creates a property configuration of type T with a name, corresponding help string and configured default value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Property o)java.lang.StringgetDefaultAsString()Getter for default value as string.java.lang.ObjectgetDefaultValue()Getter for default value.java.lang.StringgetDescription()Getter for additional help.java.lang.StringgetKey()Getter for key.
-
-
-
Constructor Detail
-
PropertyCfg
public PropertyCfg(java.lang.String key, T defVal, java.lang.String help)Creates a property configuration of type T with a name, corresponding help string and configured default value.- Parameters:
key- the property namedefVal- the default valuehelp- additional help information shown about using the application
-
PropertyCfg
public PropertyCfg(java.lang.String key, java.lang.String help)Creates a property configuration without a default value.- Parameters:
key- the property namehelp- additional help information shown about using the application
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Getter for key.
-
getDefaultAsString
public java.lang.String getDefaultAsString()
Getter for default value as string.- Specified by:
getDefaultAsStringin interfaceProperty- Returns:
- The default value as string.
-
getDescription
public java.lang.String getDescription()
Getter for additional help.- Specified by:
getDescriptionin interfaceProperty- Returns:
- A (hopefully) helpful description that was configured, which a user can view.
-
getDefaultValue
public java.lang.Object getDefaultValue()
Getter for default value.- Specified by:
getDefaultValuein interfaceProperty- Returns:
- The default value that was previously configured as a (castable) object.
-
-