Virtual Machinery logo BTree Extras
BTree Extras Home Read Only Sample Application J2ME MIDP Sample Application J2ME Palm Sample Application Other Products
Sample Application (Read Only)

A sample application class is supplied with the Java implementation of the BTreeME which illustrates the read only functionality available. The demo allows you to view data from a BTreeME read only BTree.

The sample application requires the installation of the J2ME Wireless toolkit version 1.0.3. (The application has also been successfully (but not exhaustively) tested with the Version 2.0 beta 1).

The demo applications use the sample BTrees provided - the demo program will handle the non-existence of the sample database by creating a copy of the sample in local memory.

When the application first starts you will see the launch screen shown above. Press the 'Launch' button at the bottom right hand side of the screen. The screen will then look like this -



The main menu now appears offering three possible options - View record, Show all and Show selected.You can exit the main menu at any time by pressing the 'Exit' button on the bottom left of the screen.



To activate this option we need to click on the select button (the dot which is centrally placed between the four arrows on the navigation button).



You can now enter the key for the piece of data that you want to show. You are prompted with a phone text entry box. Use the phones buttons to enter the text. In this case we have entered the text 'BOB'. ***Note - the screen may expand to allow entry. When you are finished entering text you can reduce the text box by pressing the select button***. Then press the 'Show' key at the bottom right of the screen.



The data associated with this key will then be displayed in a text box on the next screen. As you can see the data associated with this key is 'DYLAN'. After you have viewed the data press the 'Back' key on the bottom left of the screen and you will be returned to the main menu. The other keys you can enter are 'STEVIE','TINA','TOM', 'TROY','KURT' and 'ANGIE'. If you are connected to the HTTP source entering 'HTTP' will return the value 'USING HTTP' - this is a good test that you are actually connecting via the HTTP connection.



We can show all the keys to data in the BTree - use the down arrow on the phone screen (by clicking it once with the mouse) to move to the 'Show all' option and click the select button - you will now see all the keys displayed in a list. If the list is too big for the display area you can scroll down with the arrow keys. When you have reached the key for the record that you want to view you can press the 'Show' button and the associated value will be displayed as it was using the 'View Record' option.



You can also show selected entries starting with a particular letter by choosing the 'Show selected' option from the menu.You will then be asked to enter the starting letter of the records that you wish to view. In this case we have decided to show all the items starting with 'T'.



The next screen shows all the items starting with the selected string - in this case 'TINA', 'TOM' and 'TROY'.If the list is too big for the display area you can scroll down with the arrow keys. When you have reached the key for the record that you want to view you can press the 'Show' button and the associated value will be displayed as it was using the 'View Record' option.