This tutorial is designed for Java developers who have a BeanBox environment and who need to rapidly create and test prototype GUIs.
Windows developers should download the appropriate MenuBusters® for Windows package (Windows 3.xx or 95) from wwif.com
Forth - and other operating system - developers should contact menumaster1@wwif.com
This Tutorial details the steps for Windows 95 installation and operation of the MenuBusters® Java Bean. Procedures for other Operating Systems will differ slightly.
1) David Nathan Creations Ltd. will not be liable for any losses
resulting in any way from use of MenuBusters®.
2) Non commercial use of MenuBusters® is free.
3) Commercial users have a free 30 day evaluation period.
4) Redistribution of the MenuBusters® package is permitted
provided that no files are modified and all files are included.
This Java Bean has been tested with JDK 1.14 and BDK 1.0 of June 1997. If you encounter any problems, please contact us.
Place the eight files downloaded from wwif.com into your Java source directory. The following description assumes this to be the \Project\Java directory. Copy the MbJava.zip file to this directory and unzip it with a utility which preserves long filenames.
You should have the following directory\file structure:
a) Extract files from wwifme~1.jar (long
filename WwifMenuBusters.jar) with the following
command line:
\Project\Java\com\Wwif\MenuFile
will also be created. It contains example user editable MenuFiles
and MenuFile.lst contains a list of these files. The "Creating your MenuFile"
section below gives step by step instructions for editing these MenuFiles.
1) Copy the WwifMenuBusters.jar and WwifExample.jar files into the startup directory of BeanBox (normally bdk\jars).
2) Start the BeanBox. Two new Icons (MenuBusters® and ExampleApplication) should appear in the Toolbox.
3) Click on the MenuBusters® Icon. After a few seconds the MenuBusters® GUI will appear at the top left of the screen. Move the cursor over the BeanBox (it will change to a cross) and click within the BeanBox to place the yellow MenuBusters® panel there.
You can now explore the interface. This initial interface is that of a Smart Phone. Get a feel for how MenuBusters® works and reacts to mouse moves and clicks - see what you can discover by exploring. In the next section we will show how you can create your own Interface.
Click once on the "Command sent by MenuBusters" panel so the grab handles around it are visible. Use the Properties listbox to choose the Example.usb MenuFile and explore it briefly. It is an example of a two level menu structure. Nine first options lead to nine second options, giving a total of 9 x 9 = 81 options. Let us suppose that you are setting up an interface for a remotely activated door lock as follows:
Top Level Menu
Button 1, Legend = "Status" should lead to Second
Level Menu
Second Level Menu
Button 1, Legend = "Alarm" should send "SAL" command
to application.
Button 2, Legend = "Log" should send "SLO" command
to application.
Button 3, Legend = "Bolt" should send "SBO" command
to application.
Shortcut - use prepared Lock0.usb MenuFile
Click on the "Command sent by MenuBusters" panel so the grab handles
around it are visible. Use the Properties listbox
to choose the Lock0.usb MenuFile.
Hands on example of creating your own MenuFile
(Lock.usb) (alternative to Shortcut
above).
Open the Example.usb file with your favourite
programmer editor. Save the file as Lock.usb.
Search for the first occurrence of Button 1,
replace it
1 "Button 1"
with Status
1 "Status"
The next occurrence is the line below, containing the CursorText
info. Replace
Ci 1 "This
is the Info for Button 1."
with
Ci 1 "Status
information for the alarm, the access log and the bolt."
The next occurrence of Button 1 is a comment
text (because it is preceded with a " ;").
Replace
; Button
1 trail
with
; Status1
trail
The next line will appear in the TrailText panel
because it is preceded by a "t" followed by
two digits the second of which is always 0.
t 10 "Button
1"
Replace Button 1 with the new legend of
Button 1, Status
t 10 "Status"
The next occurrence of Button 1 is in
the level 2 button text Button 1/1 (because
it is preceded by b followed by two digits, the second digit of which is
1 - 9, denoting the button location - in this case 1).
b 11 "Button
1/1" "aButton 1/1 script"
Button 1/1 is replaced with Alarm,
with the application script ("a....") following on the same line.
Suppose you have coded your UI event loop to look for SAL
as the Status Alarm request command, then also replace "aButton
(1) 1 script" with "aSAL" on the same
line as follows
b 11 "Button
1/1" "aButton 1/1 script"
is replaced by
b 11 "Alarm"
"aSAL"
The line below, containing the CursorText can
be replaced by a new CursorText. Since
we are not limited to the size of the one line CursorText
panel, let's make it longer as follows:
Ci 11 "View the
alarm status, including the time of day, passwords entered, and garden
gate status."
Note that we can type all the CursorText in
a single line as above, or cut the lines anywhere:
Ci 11 "View the
alarm status, including the time of day, passwords entered,"
Ci 11 "and garden
gate status."
Or force line feeds with \n as below:
Ci 11 "View the
alarm status, including:\n"
Ci 11 "
Time of day\n"
Ci 11 "
Passwords entered\n"
Ci 11 "
Garden gate status"
We have now programmed the Status/Alarm menu choice sequence and are ready to program the Status/Log and Status/Bolt menu choice sequences as follows:
The next line is:
b 12 "Button
2" "aButton (1) 2 script"
replace it with:
b 12 "Log"
"aSLO"
The next line is:
Ci 12 "This is the
Info for Button (1) 2."
replace it with:
Ci 12 "View the
log of all lock activity and remote access."
The next line is:
b 12 "Button
3" "aButton (1) 3 script"
replace it with:
b 12 "Bolt"
"aSBO"
The next line is:
Ci 12 "This is the
Info for Button (1) 3."
replace it with:
Ci 12 "View the
current Bolt status, and directly control it."
That is enough for our first MenuBusting raid. Save the file as Lock.usb. You are now ready to test your MenuFile.
2) Recreating the WwifMenuBusters.jar file
with the new MenuFile and loading the new
jar file into the BeanBox for testing. Run
MbRun.bat to
automate these steps.
b) Create a new WwifMenuBusters.jar file
(one long command line) as follows:
c:\bin\java114\bin\jar cfm WwifMenuBusters.jar
WwifMenuBusters.mf com\Wwif\*.class com\Wwif\*.gif com\Wwif\MenuFile\*.*
If necessary, create a new jar
file for your application.
c) Copy WwifMenuBusters.jar and either
WwifExample.jar or the jar file(s) of
your application to the default BeanBox directory, for example:
copy *.jar \bin\java114\bdk\jars
3) Start the BeanBox. Click on the MenuBusters® Icon. After a few seconds the MenuBusters® GUI will appear at the top left of the screen. Move the cursor over the BeanBox (it will change to a cross) and click within the BeanBox to drop the yellow MenuBusters® panel there.
4) The properties List box shows that the current MenuFile is Phone.usb, select Lock.usb (or Lock0.usb if you want to use the prepared example) at the bottom. In a couple of seconds the new Interface that you have created should appear on the screen.
If WwifExample.jar was also copied to the default BeanBox directory, the (green) ExampleApplication Icon will also be in the Toolbox window. Click on it, and click below the MenuBusters® panel in the BeanBox.
Move the newly created panel to be one panel height below the MenuBusters® panel.
We now have a User Interface (MenuBusters®) and an Application (ExampleApplication) in the BeanBox, ready for Linking so that the User Interface can send Commands to the Application.
Link the two panels as follows:
Click on the "Command sent by MenuBusters" panel so the grab handles
around it are visible. Navigate the BeanBox pull down menu as follows:
Edit
Events
menu
processMenuEvent
Link this to the Command
received by Application panel by clicking on this panel and selecting
the processMenuEvent item.
Note that the MenuBusters® panel in the BeanBox initially displays Command sent by MenuBusters (none) and the Command received by Application (none). Move the mouse over the Status button in the MenuBusters® window - the CursorText obligingly changes to:
Status information for the alarm, the access log and the bolt.
Check that the Interface is now in control of the Application by clicking on the Status button. Observe that the Command sent by MenuBusters® propagates to the Command received by Application panel.
You should have the idea by now. This section of the tutorial has shown how simple editing of the MenuFile has changed Button Legends, the corresponding CursorText, and the Command Script sent to the Application.
CursorText (tool tips): Locate the 9 buttons near the bottom of the MenuBusters® window, notice how the CursorText panel at the bottom of the screen tracks the button under the mouse to provide context sensitive CursorText.
CursorText+ Tabs: When using the phone.usb MenuFile, note that when the mouse is over the center Call History button a + Tab appears to the right of the button. This indicates that CursorText+ is available. Click on this tab to view the extra information, and then Back to return to the main menu. CursorText+ Tabs automatically appear on the side of a button when there is more than one line of CursorText available.
Remember - this tutorial only covers MenuBusters® for Java. Because of the Java Security Model, keystrokes cannot be sent from a Java application to non Java applications like WinWord and Excel. However - full keystroke generation functionality for these and other Windows applications is provided by our companion MenuBusters® for Windows 3.x and MenuBusters® for Windows 95 packages which can be downloaded from wwif.com