beaTunes News

Sunday, March 11, 2007

Creating beaTunes UI Themes

beaTunes LogoMost of you know that with beaTunes 1.1 we introduced UI themes. This bit of functionality lets you change the background tile of the main beaTunes window - giving you a little bit of power over the look and feel of beaTunes as a whole.

Now, what most people don't know, is that you can even register your own tile images and have beaTunes load them. This is done through a plugin.

So for the geeks amongst you, this is how you create a background image plugin:

  • Create a working directory
  • Create a background tile image, save it in PNG format and place it into the working directory
  • Create a subdirectory called META-INF
  • In META-INF, create a file called plugin.xml
  • This is what the content of plugin.xml should look like:
    <?xml version="1.0" encoding="UTF-8" ?>
    <plugins>
    <plugin class="com.tagtraum.beatunes.plaf.TiledBackgroundTheme">
    <property name="imagePath" value="YOUR_IMAGE.png"/>
    <property name="description" value="YOUR DESCRIPTION"/>
    </plugin>
    <!-- add more plugins here -->
    </plugins>
  • Make sure you replace YOUR_IMAGE.png with the actual image name and YOUR DESCRIPTION with a fitting description
  • In a terminal or shell window, cd to the working directory and execute the following command:
    jar cvf plugin.jar .
    This zips the files up into the file plugin.jar
  • Place the newly created file plugin.jar into the plugin directory:
    Windows: c:\Documents and Settings\<username>\.beaTunes\plugins
    OS X: ~/Library/Application Support/beaTunes/Plug-Ins/
  • Restart beaTunes - the new theme should now show up in the general preferences

Please note that these instructions require the jar command to be properly installed, i.e. you have a Java Development Kit on your system with the PATH environment variable set, so that jar can be found. This is pretty much always the case on OS X - on Windows you might have to add jar manually to the PATH or simply use some Zip software like Winzip instead of jar to zip up the plugin.jar.

Inspired to create your own tile? We'd love to hear from you!

Labels: , , ,

0 Comments:

Post a Comment

<< Home