Interface BindingParameter<T>
-
- All Known Implementing Classes:
DefaultBindingParameter
,EmptyParameter
public interface BindingParameter<T>
Describes a single parameter that will be used in an extensible BindingType
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
BindingParameter.BrowseHelper
Contains the functions needed for a binding parameter's editor to display a popup-tree so that the user can browse for the possible values for this parameter
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
coerce(java.lang.String rawValue)
Provides a chance for the parameter to use custom coersion logic, allowing for default values.BindingParameter.BrowseHelper
getBrowseHelper()
If non-null, the editor will display a popup tree to browse for values.T
getDefaultValue()
java.util.List<StringPair>
getOptionMap()
If non-null, the editor will become a combo box, providing a list of possible options for this parameter.java.lang.String
getParameterName()
The name of this parameter.java.lang.Class<T>
getParameterType()
The data type of the parameter.java.lang.String
getTitleKey()
A resource bundle key to use as the param's title for display purposes.java.lang.String
getTooltipKey()
A resource bundle key to use for the GUI control's tooltipboolean
isBindingAllowed()
If true, the user will be allowed to bind this parameter's runtime value to tags and/or properties
-
-
-
Method Detail
-
getParameterName
java.lang.String getParameterName()
The name of this parameter. This is the string that will be used to identify this parameter's value when executing the binding. Must be unique amongst the list of binding parameters for a given binding type.
-
getParameterType
java.lang.Class<T> getParameterType()
The data type of the parameter. All parameters are treated as Strings during the design phase, but will be coerced to this type right before execution. Coersion is handled by thecoerce(String)
function.
-
coerce
T coerce(java.lang.String rawValue) throws java.lang.ClassCastException
Provides a chance for the parameter to use custom coersion logic, allowing for default values.- Throws:
java.lang.ClassCastException
- If this is thrown, the binding will not be executed, instead the property will receive a poor data quality.
-
getTitleKey
java.lang.String getTitleKey()
A resource bundle key to use as the param's title for display purposes.
-
getTooltipKey
java.lang.String getTooltipKey()
A resource bundle key to use for the GUI control's tooltip
-
getDefaultValue
T getDefaultValue()
-
getOptionMap
java.util.List<StringPair> getOptionMap()
If non-null, the editor will become a combo box, providing a list of possible options for this parameter.
The "names" of the string pairs the literal values of the options, the "Values" are what gets displayed in the combo box.
-
getBrowseHelper
BindingParameter.BrowseHelper getBrowseHelper()
If non-null, the editor will display a popup tree to browse for values. This takes precedence over the option map feature.
-
isBindingAllowed
boolean isBindingAllowed()
If true, the user will be allowed to bind this parameter's runtime value to tags and/or properties
-
-