The Astrophysics Spectator

Home

Topics

Interactive Pages

Commentary

Other Pages

Information

Interactive Pages

The Applet Control Guide

The live figures and the simulators on this web site are Java applets. These applets behave in a consistent manner. Their controls are activated with either a mouse or a keyboard. The behavior of a component on an applet is defined by the Java look and feel guidelines, which we described on this page. This page is limited to Java components in current use on this site.

General Navigation

To navigate the controls of an applet with a keyboard, the applet must first be given the keyboard focus. This is done by clicking with the mouse anywhere on the applet. The focus will then appear on one of the buttons or controls of the applet.

The basic keys for navigating through the applet controls are the Tab, the Shift-Tab, (pressing the Tab key while pressing the Shift key), the the Control-Tab, and the Shift-Control-Tab keys. The Tab key moves the focus forward to the next component in a component group. The Shift-Tab key moves the focus backwards to the previous component in the group. The Control-Tab move the focus forward to the next component group; this key is used to exit a component group, such as the cells of a table, that is navigated with the tab key. The Shift-Control-Tab key move the focus to the previous component group.

Buttons

A button with the focus has a box drawn on its face. A button with the focus is activated by pressing the space bar.

Often one button on the applet is the default button for the applet. The default button is indicated by its heavy border. The reader selects it by giving the applet the focus and then by pressing the Return or Enter key. This does not require the focus to be with the default button, but the focus must be on a component that does not interpret the Return key; for example, the default button will not be selected if the focus is in a table. On many applets, the default button changes with changes in the applet's state. For instance, if a simulator has Start and Stop buttons, the default will be with the Start button when the simulator is stopped, and it will be with the Stop button when the simulator is running.

Each button on an applet has a tool tip and a mnemonic. The tool tip, which describes the purpose of the button, is given when the cursor is held over the component for several seconds. The mnemonic is the underlined letter in a button's label; it is also given in the tool tip. Whenever the applet has the focus, a button can be selected by pressing the the mnemonic key (case is ignored) along with the Alternate (Alt) key; the button need not have the focus to be selected in this way.

Sliders

A slider can be moved from the keyboard when it has the focus. When a slider has the focus, its slide changes texture and color. The slide is moved using the arrow keys. For sliders that are oriented horizontally, the left arrow and right arrow keys move the slide left and right by a unit; for sliders that are oriented vertically, the up arrow and down arrow keys move the slide up and down. The slide is moved to the faar right or the bottom with the End key, and it is moved to the far left or the top with the Home key. The Page Up and the Control-Page Up keys move a slide by about 20% of the length of the slider to the left or upwards, and the Page Down and Control-Page Down keys move a slide this distance to the right or downwards.

Tables

Tables on an applet can be navigated and edited with either the mouse or the keyboard.

A single click with the right-hand button of a mouse selects a table cell. A double-click opens the cell for editing. Clicking on another cell in the table closes an edited cell.

A large number of keys control the selection and editing of cells in a table. This paragraph is limited to the keys that are relevant for applets on this web site. For basic navigation, one can use either the Tab and Shift-Tab keys or the right arrow and left arrow keys to move the focus right or left by a column in a table, and one can use either the Return (Enter) and Shift-Return (Shift-Enter) keys or the down arrow and up arrow keys to move the focus down or up one row. The Home key moves the focus to the beginning of a row, and the End key moves the focus to the end of a row. The Control-Home and Control-End keys move one to the top and the bottom of the current column. A cell with the focus can be edited with the F2 key, and an edited cell can be restored to its original value with the Escape key. An edited cell is closed and its value is passed to the applet when the focus is shifted to a different cell. Applets with a Start button will close an edited cell and accept the new value when this button is selected.

Ad image for The Astrophysics Spectator.