I am not sure if there is an official example of creating and using a custom
skin, but here is one I created for an old thread.

See the attachment in this post (thomas.zip)
http://apache-pivot-users.399431.n3.nabble.com/KeyListeners-on-ImageView-tp2600622p2602733.html

The post should hopefully explain what the example does, but basically it
demonstrates changing the behaviour of a Pivot ImageVIew by extending it
creating a custom skin.

FocusableImageView.java   <-- custom version of the Pivot ImageView
component
FocusableImageViewSkin.java  <--  custom version of the Pivot ImageView skin
FocusableImageViewExample.java   <-- this is the demo application which
shows adding the custom component and skin into the Theme

If this is not clear for you, I will try to create a new example tomorrow.

Chris

2011/6/19 Piotr Kołaczkowski <[email protected]>

>  W dniu 2011-06-19 13:12, Chris Bartlett pisze:
>
> 2011/6/19 Chris Bartlett <[email protected]>
>
>> ... perhaps I just misunderstood the purpose of PRIMARY_REGION?
>>
>
>  Yes, I think I did misunderstand.
>
>  Looking at the source for the skin, the PRIMARY_REGION enum value is only
> ever referred to in the
> TerraSplitPaneSkin.setSize(int, int) method.
>
> http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSplitPaneSkin.java
>
>
>  I think it refers to how the SplitPane will adjust if the SplitPane's
> width or height are changed, and not the 'splitRatio'
>
>  Chris
>
>
> Thank you very much for the detailed answer.
> Can you point me to a tutorial or an example how to install a custom skin
> on a subclassed component?
>
> Regards,
> Piotr Kołaczkowski
>
>
> --
> Piotr Kołaczkowski
> Instytut Informatyki, Politechnika Warszawska
> Nowowiejska 15/19, 00-665 Warszawa
> e-mail: [email protected]
> www: http://home.elka.pw.edu.pl/~pkolaczk/
>
>

Reply via email to