Class PropertyCfg<T>

java.lang.Object
de.mid.innovator.ui.PropertyCfg<T>
Type Parameters:
T - the type of the property value
All Implemented Interfaces:
Property, Comparable<Property>

public class PropertyCfg<T> extends Object implements Property
The class is the Property interface 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 a PropertyProvider. You can specify a wide array of property configurations that are, e.g. given to the PropertyProvider upon creation.
Author:
borschet
See Also:
  • Constructor Details

    • PropertyCfg

      public PropertyCfg(String key, T defVal, String help)
      Creates a property configuration of type T with a name, corresponding help string and configured default value.
      Parameters:
      key - the property name
      defVal - the default value
      help - additional help information shown about using the application
    • PropertyCfg

      public PropertyCfg(String key, String help)
      Creates a property configuration without a default value.
      Parameters:
      key - the property name
      help - additional help information shown about using the application
  • Method Details

    • getKey

      public String getKey()
      Getter for key.
      Specified by:
      getKey in interface Property
      Returns:
      The name of the key
    • getDefaultAsString

      public String getDefaultAsString()
      Getter for default value as string.
      Specified by:
      getDefaultAsString in interface Property
      Returns:
      The default value as string.
    • getDescription

      public String getDescription()
      Getter for additional help.
      Specified by:
      getDescription in interface Property
      Returns:
      A (hopefully) helpful description that was configured, which a user can view.
    • getDefaultValue

      public Object getDefaultValue()
      Getter for default value.
      Specified by:
      getDefaultValue in interface Property
      Returns:
      The default value that was previously configured as a (castable) object.
    • compareTo

      public int compareTo(Property o)
      Specified by:
      compareTo in interface Comparable<T>