Demo Applets of MJ
Abstract
As an example of a typical object-oriented application,
we implemented a drawing tool,
by which the user can draw figures such as circles
and rectangles.
This program is extensible by adding extension modules. Extension
modules can add new kinds of figures or new kinds of operations to the
figures.
Currently, the following 11 modules have been implemented.
- base : Framework of this tool
- select extends base : Selection of a figure
- delete extends select : Deletion of a selected figure
- move extends select : Moving of a selected figure
- dump extends base : Dumping of information of the displayed figures
- area extends base : Display of the total area of the displayed figures
- line extends base : Lines
- rect extends base : Rectangles
- elli extends base : Ellipses
- tri extends base : Triangles
- oct extends base : Octagons
More than 2^9 varieties of applications can be realized because all
modules except base and select can be arbitrarily selected.
Screenshot
This is a screenshot of the drawing tool incorporating all modules currently
implemented.
Applets
The following are some of the possible combinations:
(If you are using the Netscape browser, the first applet loaded may be cached. To load another applet, restart the browser.)
- { base }
- { base, line }
- { base, line, rect, elli, tri, oct }
- { base, line, rect, elli, tri, oct, select }
- { base, line, rect, elli, tri, oct, select, delete }
- { base, line, rect, elli, tri, oct, select, move }
- { base, line, rect, elli, tri, oct, dump }
- { base, line, rect, elli, tri, oct, area }
- { base, line, rect, elli, tri, oct, select, delete, move, dump, area }
How to use the Drawing Tool:
Select one of the figure buttons on the lower tool-bar;
then to draw the figure, drag the white canvas.
Source code
DrawFrameMJT.txt
Abstract
This is a simple applet demonstration program: "I-appli" (Java for NTT DoCoMo cellular phones), where a coffee-cup moves with the arrow keys.
This program consists of the following 5 Modules:
- base : The framework
- cup extends base : Drawing of a coffee cup
- multi extends cup : Drawing of a cup with many cups fading along the path to the left
- vapor extends cup : Drawing of vapor
- time extends cup : Drawing of a digital clock
Applets
Three modules (multi, vapor and time) can be arbitrarily selected.
The following are some of the possible combinations:
(If you are using the Netscape browser, the first applet loaded may be cached.
To load another applet, restart the browser).
- { base, cup }
- { base, cup, multi }
- { base, cup, vapor }
- { base, cup, vapor, multi }
- { base, cup, vapor, multi, time }
These applets utilize the "iEmulator", by T. Fukuno
(http://uni.himitsukichi.com/iap/)
in order to execute I-appli as applets.
I-appli
Only for Japanese NTT DoCoMo cellular phones.
demo/i/index.html
Source code
[MJ Top page]