Class CurrencyField
java.lang.Object
com.inet.taskplanner.server.api.field.Field
com.inet.taskplanner.server.api.field.CurrencyField
A field that takes a floating-point number as input and displays the currency symbol. The field supports placeholders
from the Task Planner, which must be taken into account.
- Since:
- taskplanner 24.4
-
Constructor Summary
ConstructorsConstructorDescriptionCurrencyField(String key, String label) Constructs the currency field for the given key and label. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidValue(String value) Checks whether the supplied value is a valid floating-point number or a placeholder expression in square brackets.patchResultPlaceholderInValue(String value, List<JobResultContainer> results) Overrides this method to replace placeholders with values from the results.patchSeriesPlaceholderInValue(String value, Map<String, String> seriesProperties) Overrides this method to replace placeholders with values from the series.Methods inherited from class Field
getConditions, getKey, getLabel, getPlaceholder, getType, getValue, isUpdateValuesOnChange, isValueSavable, replaceSeriesPlaceholders, setConditions, setKey, setLabel, setPlaceholder, setType, setType, setUpdateValuesOnChange, setValue, setValueSavable
-
Constructor Details
-
CurrencyField
-
-
Method Details
-
isValidValue
Checks whether the supplied value is a valid floating-point number or a placeholder expression in square brackets. Anullvalue and values that cannot be parsed as either form are invalid.- Parameters:
value- the value to check.- Returns:
trueif the value is valid.- Since:
- taskplanner 24.4
-
patchResultPlaceholderInValue
Overrides this method to replace placeholders with values from the results.- Overrides:
patchResultPlaceholderInValuein classField- Parameters:
value- the value to be patchedresults- the results that contain the meta properties that are replaced- Returns:
- the new value with replaced placeholders
-
patchSeriesPlaceholderInValue
Overrides this method to replace placeholders with values from the series.- Overrides:
patchSeriesPlaceholderInValuein classField- Parameters:
value- the value to be patchedseriesProperties- properties from the current series set- Returns:
- the new value with replaced placeholders
-