Using the Jeli Widgets

This document was last modified on February 9, 2005 to reflect changes made to version 238.

Many of the simulators developed under various NSF grants use the Jeli (Java Electronic Laboratory Interface) for presenting a uniform user interface. This document describes using some of the standard widgets provided by Jeli.

Simple Buttons

Simple Jeli Buttons behave like ordinary buttons but have a different look and feel. They are typically more compact to allow a denser collection of buttons.

Many of the buttons used are set to display in reverse mode when pushed and execute when released.

Like ordinary Java buttons, they can be disabled so that clicking them has no effect. When disabled the text label in the button is partially greyed out.

Jeli buttons can also set to perform no operation. These are referred to as Jeli labels and are used to display information only. They look exactly like ordinary Jeli buttons but to not react when clicked.

Value Buttons

Value buttons look like ordinary Jeli buttons, but can be used to change the value of a parameter. Usually the label of the button will be in the form name: value. When you click on the button, a cursor appears (as an underbar) and can be used to change the value. When you push return, the value entered is set. Clicking the button instead of pushing return cancels the change. The pointer must be in the button while you are editing the value and when you push return. Normally the background of the button will be highlighted when the value is being edited and the pointer is inside the button.

Sliders

Another way to change the value of a parameter is with a slider. Traditional sliders have a fixed range and are therefore limited. Jeli sliders consist of three parts: a label giving the name and current value of the parameter, one to three additional buttons, and a slider. As the slider is changed, the value displayed in the label changes accordingly. There will normally be three buttons. A round button will round the value to the next order, first making the least significant figure 0, then the next, etc. The double button will double the range of the slider without changing the value. The half button will halve the range and change the value only if it need to change to fit in the new range.

There are three type of sliders, for integers, for arbitrary floating point values, and for probabilities. The latter of these does not have a double or half button since the range is always between 0 and 1.

Jeli Text Area

A Jeli Text Area behaves like an ordinary Java TextArea. It has a place for displaying text which is scrollable when necessary. Scroll bars will appear as text is added. It is usually part of a Jeli Text Display described below.

Some applications support the changing of the size of the text area by using the arrow keys when the cursor is inside the text area. Left Arrow decreases the width and Right Arrow increases it. Up Arrow increases the height and Down Arrow decreases it. Jeli TextAreas that are inside a frame can change size when the frame size is changed.

The text area itself supports lines of different foreground and background colors, and a number of lines at the top and bottom which do not scroll and are always displayed.

Jeli Text Display

A Jeli Text Display consists of a Jeli Text Area and five buttons at the top. The two button labeled > and < are used to increase or decrease the size of the font displayed. The second button is labeled Clr and will clear the text area. A button on the right side is labeled Log and can send the contents to the log file when the log is open. This button is disabled when the log is not open. The center button at the top is usually used for a title of the text area. This can be an ordinary Jeli button and cause some action to occur when it is clicked.

Jeli Text Frame

A Jeli Text Frame is a frame (independent window) containing a Jeli Text Display and a number of buttons at the bottom of the frame. One of the buttons is usually a Hide button which hides the frame.

Jeli Popup List

A Jeli Popup List is a column of Jeli Buttons which can be popped up at a given location to allow the user to choose among a small number of items. It is a frame with a descriptive title. The last two items on the list of choices are Make Persistent and Cancel. If Make Persistent is chosen, the frame stays up after a choice is made. Otherwise it disappears. Choosing Cancel closes the frame without registering a choice.