An Animated Demonstration Authoring System for Java applets. Motoki Miura and Jiro Tanaka. Institute of Information Sciences and Electronics. University of ...
An Animated Demonstration Authoring System for Java applets Motoki Miura and Jiro Tanaka Institute of Information Sciences and Electronics University of Tsukuba {miuramo, jiro}@softlab.is.tsukuba.ac.jp
1. Introduction Recently, many companies often provide some trial versions of their systems to the web users. The main purpose for this is to present the usability of their systems. There are two advantages in presenting the system as an applet. One is reducing user's trouble, because an applet can be downloaded automatically and the user does not have to install the system. The other is reducing the version-up cost. Developers can provide the latest bug-fixed system any time. In order to make more effective the presentation of their applet-based systems on the web, developers should have prepared some instructions with their applets. Is the effort of describing the instruction fully rewarded? To the developers' regret, the web-users do not always read the instructions that come with the system. There are some users who operate the system without reading the instructions. In such case, these users may not understand the system features fully, or may even misunderstand the system. We propose an animated demonstration[2] instead of these instruction. The animated demonstration for an applet means showing a demonstration of the applet' s behavior. The demonstration is performed with a pseudo mouse cursor as if someone is operating. It is helpful for people who want to know how to operate applets.
2. Demonstration method We choose an event-driven method to show the demonstration. The event-driven method is performed by sending some event-objects generated from user actions. This method is simple but flexible, because the demonstration can be modified with minimum cost. The implementation of the event-driven method requires some event-object handling functions: initialization of the system, recording, storing and replaying the event-objects. We have designed Jedemo (Java Event-driven DEMOnstration) manager [1] which can add the functions to a target applet. Jedemo manager is an applet which works as one of
the special applet viewers. The target applet can be embedded on the manager (Fig. 1). Target Applet Jedemo manager (applet)
Web Browser
Java Virtual Machine
Figure 1. Mechanism of Jedemo manager We do not have to change the target applet, because Jedemo manager retrieves components in the target applet. After that, Jedemo manager adds extra event-listeners to the components. The extra event-listeners catch event-objects and send them to Jedemo manager. The mechanism of Jedemo manager is used both recording and playing.
3. Command and Command-Rule An event-object usually represents a low-level action such as MouseMove. When it comes to edit a demonstration, the level of event-object can be considered too low. We introduce the concept of “command” which forms one action as a sequence of event-objects. Each command is identified by a label which reflects its meaning. To convert such event-objects to a command, we adopt “command-rule” to recognize what action has occurred in the target applet. We have designed the command-rule which maps event-objects to a command. Basically, one command-rule generates one type of command. The command-rule consists of three properties: mapping pattern, label production rule and command method. Mapping pattern specifies the corresponding event-objects of the command. Label production rule adds a label string to the command after it is generated. Command method specifies the name of the method which can be invoked while playing.
Figure 2. Separator and Command rules
Figure 3. Playing demonstration
4. The Process of Producing Demonstrations Preparing command-rules Jedemo help-author applet invokes the target applet (in this paper, we use GraphApplet: a graph editor applet). The event-objects which are generated by the demo-author's actions are collected by Jedemo. At the same time, Jedemo shows the event-objects as icons. After collecting the sample-events, the demo-author defines a separator. The separator is a set of event-objects but is not a part of a command. Usually, MouseEntered, MouseExited and MouseMoved event-objects will be specified as the separator. Its role is to separate an event-object sequence into some candidate commands. The demo-author modifies the candidate commands so that it can represent “a collection of more than one MouseDragged event.” After that, Jedemo collects the unique candidates and generates new command-rules. Each collected candidate becomes a mapping pattern of the generated command-rule. The demo-author edits both label production rule and command method for each command-rule. After that, the finished command-rules and the separator (Fig. 2) are stored into a file. Generating commands Jedemo invokes the target applet and starts recording event-objects. These event-objects are separated and collated with the mapping patterns of command-rules. If matched, the sequence of event-objects become a command. The label of the command is automatically added by the label production rule. The label can include some dynamic texts. The dynamic text is generated by the method of the target system' s object. To specify the object, we provide these indicators: @press, @release, @add, @added, @remove, @removed and @action. Each indicator corresponds to an event source object. For example, a description “create node @add.getLabel() as a child
of @press.getLabel()” is replaced with “create node 5 as a child of 2”. Therefore the demo-author does not need to note each action. Publishing applet with demonstration The demoauthor make public the GraphApplet with DemoAnimator by rewriting the applet tag as follows:
Figure 3 shows the snapshot of playing the demonstration. If the web-user presses the “Start DEMONSTRATION” button, the controller window will appear. The animated demonstration is performed with moving the pseudo mouse cursor and with showing some pop-up messages while playing.
5. Conclusions We have implemented demonstration authoring tools for Java applets. The command-rules can be reused when the target system changes. This technique would greatly benefit the developers and the users of applets.
References [1] M. Miura and J. Tanaka. A Framework for Event-driven Demonstration based on the Java Toolkit. In Asia Pacific Computer Human Interaction (APCHI-98), pages 331–336, July 1998. [2] P. N. Sukaviriya and J. D. Foley. Coupling A UI Framework with Automatic Generation of Context-Sensitive Animated Help. In Proceedings of the ACM Symposium on User Interface Software and Technology, pages 152–166, 1990.