Interface DynamicPropertyEvaluator
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface DynamicPropertyEvaluator
Some form control properties can't be evaluated at the time the CSS is compiled.
For example the
InplaceEditorCSSConstants.PROPERTY_WIDTH
can depend on the font
size used by the form control (10em). This means that the value of the property
can be evaluated only after the form control initializes itself.
This evaluator offers methods that can expand such dynamic properties.- Since:
- 16.1
-
Method Summary
Modifier and TypeMethodDescriptionint
evaluateHeightProperty
(Map<String, Object> arguments, int fontSize) EvaluatesInplaceEditorCSSConstants.PROPERTY_HEIGHT
to a value.int
evaluateWidthProperty
(Map<String, Object> arguments, int fontSize) EvaluatesInplaceEditorCSSConstants.PROPERTY_WIDTH
to a value.
-
Method Details
-
evaluateWidthProperty
EvaluatesInplaceEditorCSSConstants.PROPERTY_WIDTH
to a value. The value of this property might depend on the font size so the form control must explicitly call this method with the font it uses.elem { content: oxy_textfield(edit, '#text', width, 12em) }
- Parameters:
arguments
- Form control arguments. Used to get the value ofInplaceEditorCSSConstants.PROPERTY_WIDTH
.fontSize
- The font size to be used for values that depend on the font, like 20em.- Returns:
- The expanded value or -1 if the property is not set or its value is invalid.
-
evaluateHeightProperty
EvaluatesInplaceEditorCSSConstants.PROPERTY_HEIGHT
to a value. The value of this property might depend on the font size so the form control must explicitly call this method with the font it uses.elem { content: oxy_video(href, attr(toPlay), width, 12em, height, 12em) }
- Parameters:
arguments
- Form control arguments. Used to get the value ofInplaceEditorCSSConstants.PROPERTY_HEIGHT
.fontSize
- The font size to be used for values that depend on the font, like 20em.- Returns:
- The expanded value or -1 if the property is not set or its value is invalid.
-