The intention of this brief manual is to get you going with XleTView. It describes the handling of version 0.3.6. The features and how they work will be changed in the future. When you have downloaded the zip file and unzipped it in your directory of choice you will have the following structure: (directories in square brackets)


How to start XleTView:

First make sure you have Sun's java Runtime 1.4(or more) installed. It might work with others but that's not tested.

If you have your Java installation properly configured you can start the emulator by double clicking the file xletview.jar. This will start it but you will not see any debug/error messages from your Xlet or from XleTView. If you want these messages you have to start from a console by:

/directory-where-you-unzipped-XleTView>java -jar xletview.jar

If everything worked fine you should now have the emulator window in front of you on the screen.

You can also start XleTView with some command line parameters to load an Xlet on startup. The syntax is:

-xletPath [path] -xletClass [Xlet]

Which could be for example:

/directory-where-you-unzipped-XleTView>java -jar xletview.jar -xletPath H:\MHP\foo\classes -xletClass foo.FooXlet

How to run an Xlet:

In the directory "config" there is an XML file called applications.xml. This is where XleTView finds info about you Xlets. It has the following format:

<APPLICATIONS> <!-- top element in this xml file -->
    <APPLICATION> <!-- top element for one Xlet, resides in the default group -->
        <NAME>Foo Xlet</NAME> <!-- name of the xlet -->
        <PATH>H:\MHP\foo\classes\</PATH><!-- path to the Xlet -->
        <XLET>foo.FooXlet</XLET> <!-- the Xlet class -->
    <APPLICATION> <!-- top element for one Xlet -->
        <NAME>Foo Xlet</NAME> <!-- name of the xlet -->
        <PATH>H:\MHP\foo\classes\</PATH><!-- path to the Xlet -->
        <XLET>foo.FooXlet</XLET> <!-- the Xlet class -->
    <GROUP NAME="demos"> <!-- this makes a group called demos -->
            <NAME>Demo Xlet</NAME>

You don't have to make groups if you don't want to, if you don't specify a group for an Xlet it ends up in the "default" group. Grouping is just a way to organize the Xlet's.

When you modify applications.xml you have to restart the emulator for your modifications to make effect.

Another way of editing your Xlet list is through a GUI interface. You find it in the "applications -> Manage applications..." menu. This way you don't have to restart the emulator after you have added, deleted or modified info. This feature is not finished and will be changed in the future but it's there if you want to use it.

When you have added info about an Xlet you run it by choosing it in the "applications" menu.

If an Xlet is running and you choose another from the menu, the current is exited and the new one is loaded.

The Remote Control

The remote control is customizable. You can choose the look and what buttons there should be, and what key codes they should generate. The settings for the remote is in the file config/remote_control.xml has the following syntax:

<remotecontrol width="130" height="100" imgroot="config/remote_images/" backgroundimage="remote_bg.png" backgroundcolor="">
    <buttons x="25" y="20" width="100" height="100"> 
        <button img="button_red.png" x="0" y="0" width="20" height="14" keycode="HRcEvent.VK_COLORED_KEY_0"/>
        <button img="button_green.png" x="20" y="0" width="20" height="14" keycode="HRcEvent.VK_COLORED_KEY_1"/>    
        <button img="button_yellow.png" x="40" y="0" width="20" height="14" keycode="HRcEvent.VK_COLORED_KEY_2"/>    
        <button img="button_blue.png" x="60" y="0" width="20" height="14" keycode="HRcEvent.VK_COLORED_KEY_3"/>    


x and y values are relative to the parent. The 'imgroot' specifies where XleTView can expect to find the images specified in the 'img' attributes, can be a path relative from where you installed XleTView, or an absolute path to a directory on your computer. 'keycode' is the code of the event that will be triggered when pressing the button. Can be a String like "HRcEvent.VK_COLORED_KEY_0" that will be the integer set in the field VK_COLORED_KEY_0 in HRcEvent, or any integer like "999".

Shortcut keys

You can use your keyboard for all buttons on the remote. Convenient if you are a speedy developer or if you want to connect an Infrared/Bluetooth remote to you PC for a demo etc. The keys generate the same key code as your keyboard, no magic, so the number keys are the ones not on the num pad, arrows are the arrows that are not on the num pad. The the colour buttons are mapped F1=red, F2=green, F3=yellow, F4=blue. +/- are not mapped yet.

F5 reloads an Xlet.

The settings file

The settings file is also in the folder "config" and is called settings.txt. Some of the settings there are not actually doing anything, just some relics I forgot to remove, but the ones that are of interest are:


With this you can add additional java software to the emulator. For example, if you are developing Xlets for a modified box that contains clicktracking software, you can add this clicktracking software also in the emulator so your Xlets work also here without modification. Mind that the paths you add cannot contain backslash(\).


In previous versions of XleTView the font size differed a lot between the emulator and how it was displayed on a television. Also, different boxes display fonts differently, so if you want to adjust how your fonts are displayed you can change this value. For example, if you notice that your fonts look bigger in the emulator you can change this value to a negative one and vice versa. It works like this, when a font is created it passes a mechanism that adds this offset value to the size, so if the wanted size is 18 points and the offset is -2 the size of the new font becomes 16 points.


Change this value to false if you don't need to use the remote, maybe you need more space on the screen or only use the keyboard anyway.


Changes the display of the safe area.


These settings are only for where on the screen the emulator pops up when you start it. For the x and y to have effect you also need to set tv.center=false

SourceForge.net Logo