Standard components
In the JUseCase release there are recorder/replayer objects for many of the standard components in Java Swing, such as JButton, JList, JTable etc. To set them up you have to supply a unique usecase command name, and if the given component type has many type of events you normally also have to specify which event to connect the command name to. When the event is detected, the command name and possibly some parameters will be recorded to the usecase script. Below is a description of the events you can record for the different components, and what parameters will be recorded if the event is detected.
ScriptedButton
The ScriptedButton will record/replay clicks on AbstractButtons, e.g. JButton and JMenuItem. The only event we're interested in here is the action event, so we don't have to specify an event in the setup. The following code will have "quit application" recorded to the script whenever the button is clicked.
ScriptedComboBox
This class is used for JComboBox selection events (item event). If the combo box is editable and the user types something in the text field, this will also be recorded as a selection event. The parameter for these events is the selected item, so the following code will record "select the following item: <some item>" when the combo box selection changes.
ScriptedFileChooser
The JFileChooser is a bit special since is a rather complex "component". It has tree interaction events that can be recorded/simulated - file selection, dialog accept and dialog cancel - and all of them have to have unique usecase command names. In the case of the file selection command, the selected file will be the parameter recorded to the usecase. The other events don't have any parameters.
ScriptedList
JList is another component for which (currently) only one type of event is recordable - the item selection. The parameter recorded with this event is the selected item or the list of selected items (comma separated).
ScriptedSlider
There are two ways to set up recorders/simulators for JSlider change events. The basic one records the standard slider value - an integer in some specified range. The other one takes a list of strings and will instead record the corresponding string value.
ScriptedTabbedPane
This class records tab flip events, and the parameter for such events is the title of the tab to flip to, or if it's empty, the index of the tab.
ScriptedTable
The JTable is the most complex standard component since you can do so much with it. It also has a quite complex event mechanism. Because of this, there are a couple of different ways to set up recorders/replayers for it.