The trouble with Skins
tomas.mikula at gmail.com
Mon Mar 23 21:54:20 UTC 2015
Yes, I think that would be much better than the current situation.
On Mon, Mar 23, 2015 at 5:08 PM, Tom Eugelink <tbee at tbee.org> wrote:
> Suppose control would support have generics type, to make the requirement on
> the Skin formal.
> Control<T extends Skin>
> Then getSkin would expose information for every skin the control has,
> without polluting the control's API. Would that work for you?
> On 23-3-2015 22:03, Tomas Mikula wrote:
>> Sure, it is a workaround that works, but I don't think type cast
>> should be the recommended way to do this (or to do anything).
>> On Mon, Mar 23, 2015 at 4:15 PM, Tom Eugelink <tbee at tbee.org> wrote:
>>> On 23-3-2015 20:30, Tomas Mikula wrote:
>>>> Control does not know what API is available on the Skin
>>> I have many controls that require a skin that implements a certain
>>> (refresh() is often present). Granted, this is not something that is
>>> compiler checkable via the setSkin method, but it can fail quickly at
>>> runtime. Works for me.
More information about the openjfx-dev