[jsword-devel] SkinLF (was: New Developer)

Joe Walker jsword-devel@crosswire.org
Sat, 27 Dec 2003 10:42:01 +0000


Aleksander Rozman - Andy wrote:
>>> Here is the code to activate SkinLF.
>>>
>>> com.l2fprod.gui.plaf.skin.SkinLookAndFeel.setSkin(com.l2fprod.gui.plaf.skin.SkinLookAndFeel.loadThemePack("./aquathemepack.zip")); 
>>> com.l2fprod.gui.plaf.skin.SkinLookAndFeel.enable();
>>
>> Ugh.
>> That doesn't work very well with the PLAF system as designed by Sun. 
>> The idea is that you can use a new PLAF without needing to hardcode 
>> your app.
>> Are you sure there is no better way to use it?
> 
> Sorry no. We could just put one option in skin preferences to either 
> load a class specified by uesr (it would be best if there would be fixed 
> option with LFs installed in rt.jar+one custom option so that user can 
> write it by hand) and second option to use skinlf with external LF file. 
> For skinLF you can add L&F from many platform, you just need to suply 
> them in zip file...

I took a look through the javadoc for enable():
"Set the look and feel to SkinLookAndFeel. This method must be called to 
set the look and feel in applets or JavaWebStart enabled applications"

And since this class inherits from javax.swing.LookAndFeel - I would 
have thought that for applications we could use something more standard.

We could easily add an option to config.xml that configured the skin 
within skinlf, and when com.l2fprod.gui.plaf.skin.SkinLookAndFeel was 
set as the skin (to be enabled by standard means) you got to see the 
appropriate theme.

Joe.