Cleaning up Control codebase - How to deal with StyleableProperty cast
david.grieve at oracle.com
Tue Apr 29 12:35:00 UTC 2014
I've found that this works:
final StyleableBooleanProperty prop =
But I don't know if that will work in every case.
On 4/28/14, 5:33 PM, Tom Schindl wrote:
> I've been cleaning up the warnings inside the controls code base and one
> of the warnings left (beside many generic problems in the *View-classes)
> is the casting from *Property to *StyleableProperty.
>> final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)focusTraversableProperty();
> now I think I found a way to get away with out an unchecked cast warning
> by writing
>> final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty();
> Anyone having a better idea?
More information about the openjfx-dev