Why might you need to know what type of skin is installed on a component? Maybe 
there is another alternative that might address your use case?

On Jun 15, 2011, at 12:32 PM, Edvin Syse wrote:

> Den 15.06.2011 18:22, skrev Greg Brown:
>>> I see Component.getSkin() is protected - why is that? Would be nice to be 
>>> able to check what kind of skin was installed on a component.
>> 
>> It is protected to prevent a caller from invoking methods directly on the 
>> skin. All interaction with a skin is done via styles or the component API 
>> (which fires events that the skin responds to). Anything else would create a 
>> hard association with a particular theme, which is undesirable.
>> 
>> If you want to find out what type of skin is installed on a component, you 
>> could always query the current theme.
> 
> That makes sense :) I'll use Theme#getSkinClass(component) to decide then :)
> 
> -- Edvin

Reply via email to