pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <Roger.Whitc...@actian.com>
Subject RE: Creating reusable component - How to register Skin?
Date Mon, 24 Feb 2014 17:55:37 GMT
Any subclass of Component can call the “setSkin( skin object )” themselves (and should)
during the constructor.

HTH,
~Roger

From: brampton@gmail.com [mailto:brampton@gmail.com] On Behalf Of Andrew Brampton
Sent: Saturday, February 22, 2014 8:04 AM
To: user@pivot.apache.org
Subject: Creating reusable component - How to register Skin?

I am making a HexEditor component, that can efficiently scan through a large file. I want
the component to be re-usable, but I've hit a problem with the Skin.

For my component to work, I have to call:
Theme.getTheme().set(HexEditor.class, HexEditorSkin.class);

I don't really want my users to have to do that.

So what's the best practice here?
Should I call that from within my HexEditor constructor? At the risk of overriding something
the user may have set,
Or should I tell my users to register the Skin themselves?

thanks
Andrew
Mime
View raw message