Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Code Block
public abstract boolean isSettable(Watermark node) {
    return corner == null || corner.isBound() == false;
  }
  public abstract WritableValue<String> getWritableValue(Watermark node) {
    return cornerProperty();
  }

Anchor
property_expansion
property_expansion
Note that 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[#1 Wiki Markup<ac:structured-macro ac:name="anchor" ac:schema-version="1" ac:macro-id="5b694c9e-fe67-4643-aa5b-f3714cbdeee4"><ac:parameter ac:name="">property_expansion</ac:parameter></ac:structured-macro>Note that {{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\[[#1]\].

The 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.

...