[Rev 02] RFR: 8130738: Add tabSize property to Text and TextFlow
Kevin Rushforth
kcr at openjdk.java.net
Wed Dec 11 00:22:35 UTC 2019
On Wed, 27 Nov 2019 10:51:10 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1895:
>>
>>> 1894: }
>>> 1895: @Override public void set(int v) { super.set((v < 1) ? 1 : v); }
>>> 1896: @Override protected void invalidated() {
>>
>> For mutable properties, we usually clamp on usage, so that we don't have problems binding to the value. This preserves the invariant that `set(val); get() == val` for all values. If that is what we end up doing, then this overridden method should be removed.
>
> Hmm ... so you are saying the clamping is the responsibility of client code (internal as well as external)?
In this case, yes.
-------------
PR: https://git.openjdk.java.net/jfx/pull/32
More information about the openjfx-dev
mailing list