...
Code Block |
---|
public abstract boolean isSettable(Watermark node) { return corner == null || corner.isBound() == false; } public abstract WritableValue<String> getWritableValue(Watermark node) { return cornerProperty(); } |
Anchor | ||||
---|---|---|---|---|
|
isSettable
should be implemented in a way that does not cause the expansion of the property. The isSettable
check is performed before the CSS value is looked up. If the property is not settable, then no further CSS processing is done for that property (on any given pulse). The getWritableValue
method is invoked only if there is a CSS value to apply. Thus, if the property is not settable or there is no CSS value, the property is not expanded[#1The CSS engine does not call setValue
directly on the WritableValue
. Rather, the code calls a set method on the CssMetaData
which, in turn, calls applyStyle
on the StyleableProperty
. This level of indirection allows a CssMetaData
to intercept the value before the calculated style value is applied (in other words, before setValue
is called on the corresponding property). This is used primarily for Number
based properties where the parameterized type is Number
but the actual type might be Integer
and so the value's intValue()
method needs to be invoked.
...