Theme Pack
SkinLF 1.1Welcome License Installation :: Theme Support Tutorial 1 Tutorial 2 Theme Packs SkinRegion How to :: They use SkinLF Your Apps :: FAQ Changes Todo :: API
What are Theme Packs ?

Skin Look And Feel allows developers to quickly skin their apps but it's quite difficult to find the right GTK theme and the right KDE theme ! That's the goal of Theme Packs.

Theme Packs provide in a single zip file the right GTK theme and its matching KDE theme.

Theme Packs are made available thru the Java Look And Feel Repository at myLookAndFeel.L2FProd.com.

Creating a Theme Pack
Theme Pack Definition

Skin Look And Feel comes bundled with a default theme pack lib/themepack.zip. Its definition file looks like:

<?xml version="1.0"?>

<skinlf-themepack require="0.3">
	<property name="JDesktopPane.backgroundEnabled" value="false" />
	<property name="ScrollBar.alternateLayout" value="true" />

	<icon name="Tree.openIcon" value="icons/TreeOpen.gif" />
	<icon name="Tree.closedIcon" value="icons/TreeClosed.gif" />
	
	<icon name="FileView.computerIcon" value="icons/Computer.gif" />
	<icon name="FileView.directoryIcon" value="icons/TreeClosed.gif" />
	<icon name="FileView.fileIcon" value="icons/Default.gif" />
	<icon name="FileView.hardDriveIcon" value="icons/HardDrive.gif" />
	<icon name="FileView.floppyDriveIcon" value="icons/FloppyDrive.gif" />

	<icon name="InternalFrame.icon" value="icons/InternalFrame.gif" />

	<skin>
		<skin url="gtk/gtkrc"></skin>
		<skin url="kde/kde.themerc"></skin>
	</skin>

</skinlf-themepack>

XML is used for the definition file. The definition file can be validated against the DTD:

<!ELEMENT skinlf-themepack (property*, icon*, skin)>
<!ATTLIST skinlf-themepack
	require CDATA #REQUIRED>

<!ELEMENT property>
<!ATTLIST property
	name CDATA #REQUIRED
	value CDATA #REQUIRED>

<!ELEMENT icon>
<!ATTLIST icon
	name CDATA #REQUIRED
	value CDATA #REQUIRED>

<!ELEMENT skin (skin*)>
<!ATTLIST skin
	url CDATA #IMPLIED>

In the previous example, property and icon XML tags are used to set custom properties and icons at runtime. <property name="JDesktopPane.backgroundEnabled" value="false" /> is equivalent to javax.swing.UIManager.put("JDesktopPane.backgroundEnabled", Boolean.FALSE);.
The icon tag can be used to provide custom icons for JTree nodes, plus and minus signs, JFileChooser directories, JInternalFrame default icon, etc.

File Structure what is the recommended directory layout for other themes, and *.jar/*.zip files?
Using a Theme Pack
Skinit Code Example