pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@googlemail.com>
Subject Re: Custom skin usage
Date Wed, 09 Jun 2010 18:26:00 GMT
OK, that will achieve what I need to do at the moment.

Is it possible to set a particular skin for a specific component instance if
required?  Or is a component class only ever associated with 0 or 1 skin
classes via the theme?

On Thu, Jun 10, 2010 at 1:10 AM, Greg Brown <gkbrown@mac.com> wrote:

> Rather than replacing the Sheet skin with a ModifiedTerraSheetSkin, I would
> suggest that you create a custom Sheet subclass called ModifiedSheet and
> associate your modified skin class with that class instead. That way, you
> can instantiate Sheet to get the default sheet skin, and ModifiedSheet to
> get your custom skin.
>
> Greg
>
> On Jun 9, 2010, at 11:48 AM, Chris Bartlett wrote:
>
> >
> > If I create a custom skin for a standard Pivot component (such as a
> Sheet), how do I go about using it?
> >
> > The following works fine, but associates the skin with all instances of
> Sheet.
> > Theme.getTheme().set(Sheet.class, ModifiedTerraSheetSkin.class);
> >
> > Is it possible to set a particular skin for a specific component
> instance?
> >
> > org.apache.pivot.wtk.Component    defines    protected void setSkin(Skin
> skin)
> > whose javadoc comment says 'Sets the skin, replacing any previous skin.'
> >
> > However it throws an IllegalStateException if a "Skin is already
> installed."
> >
> >
> > Regards,
> >
> > Chris
> >
>
>

Mime
View raw message