Ewe Applet Demo


November 8th 2001, Michael L Brereton
http://www.ewesoft.com/

This demo runs a Ewe program under your web browser’s Java virtual machine as a normal Java Applet. Ewe programs run as an Applet unaltered exactly as they run on a native Ewe VM on a mobile device or desktop computer.

 

Based on the Java version supported by your web browser either the 1.1 or 1.2 version of the demo will automatically be loaded in a new browser window. If it does not load within a minute then you may have to manually select the demo version.

·        The Java 1.1 compliant version – which will run on Internet Explorer 4.0 (or better) or Netscape 6.1 (or better).

·        The Java 1.2 compliant version – which will run on Netscape 6.1 (or better).

FileChooser Demo

This option runs the class ewe.filechooser.FileChooserDemo. This opens a FileChooser box with the options that you select. The Applet version of this demo will allow you to view a virtual file system. This is a file system that exists only in memory, but is fully read/write enabled. You can cut and paste within it but any changes you make will not be saved on the server or the local file system.

 

The FileChooser box is very functional and now allows you to cut, copy and paste files from one directory to another. You can even cut and paste between the file section and the directory tree section (if you choose to display the directory tree).  There are tool tips for the various buttons as well as for the individual files themselves. If the pointer hovers above a particular file a box will appear with the details for that file.

 

You can now also choose to quick view files. By right clicking or hold down the left mouse on an individual file you will get a context sensitive menu for that file. If the file is a BMP/PNG bitmap, or a TXT text file or a ZIP file then you will be provided with the option to view that file. A zip file is actually viewed through another FileChooser box that uses special ZipEntry files. You will notice that the zip file viewer is exactly the same as the normal FileChooser – but if you select View Details you will see that it provides more information than a standard file does – specifically it reports the compressed size of entries within it.

TreeControl Demo

This option demonstrates the capability of the ewe.ui.TreeControl object. A TreeControl will be displayed with several nodes within it and it demonstrates the following features:

  1. The ability to have different icons for each node.

  2. The ability to embed other controls in the tree (to do this expand “Everyone/Simpsons/Simpson, Bart”) and then each of the three sections under “Simpson, Bart” will have different controls that are fully functional. Go into “Name Info” and change the first and last names and you will see the effect the changes have. There is no limitation on what control can be embedded in a TreeControl.

  3. The ability to cut and paste within and between trees. If you press “Open New Window” you will get another identical window containing a Tree. If you right click on a node in one tree you can cut/copy nodes or groups from one tree into either the same tree, or to the tree in the other window.

  4. The ability to drag and drop within and between trees. If you drag a node or group from one tree, you can drop it into another node in the same tree or in a tree in a different window. If you hold down the CTRL key you will effectively be dragging a copy of the node and the mouse pointer will reflect this. (Note that under Java 1.1 the mouse pointer cannot be customized). If you drag a node using the right mouse button you will be prompted with a pop-up menu to determine what action you wanted when you drop the node.

List Editor Demo

This option demonstrates the use of the ewe.ui.ListEditor object. This is a control that allows you to edit a simple list of ewe.data.LiveData objects. These are objects that have an Editor control associated with them to allow their data to be edited visually. The ListEditor is used to add/delete/move and edit these objects. You can also save and load lists. The ListEditor control is designed to be extended to provide more functionality as may be needed by the particular object being edited.

Jewel Demo

This option demonstrates a version of the Jewel program builder written in Ewe. It allows the creation of .ewe files from files within the file system. It does not yet provide the ability to build the different target types as does the full version. If you press the “Open” button you can load in the file First.enf and you will get a preset file that you can use to create a sample .ewe file.

Solitaire Demo

This demonstrates the use of the ewe.graphics.InteractivePanel which is derived from ewe.graphics.Mosaic. This class is used to display multiple, possibly moving, images that you can move around with the mouse or pen. The aim of this version of Solitaire is to remove marbles from the board by jumping one marble over exactly one other marble and placing it in an empty groove. The marble that was under the moving marble is then removed from the board. Only horizontal and vertical jumps are possible. The aim is to end up with only a single marble on the board – with the ultimate aim for that single marble to be left in the centre groove (a very difficult task).

 

The program allows you to customize the board to start with a smaller board. To do so, press the button with the tool-tip “Compose Board” and then click on a groove to add or remove a marble. Then switch to “Play Mode” and then move the marbles to try to clear the board.

Tetris Demo

This demonstrates a very simple version of the classic Tetris game. Again it shows the capability of the Mosaic control.

Spinner Demo

This demonstrates the multi-tasking capabilities of Ewe. The Spinner demo has two components: a Spinner display and a Bouncer display. The Spinner display will spin a shape with the given spin angle and spin delay parameters. The spin parameters can be changed while the shape is spinning and the effect is immediately visible.

 

The Bouncer display will bounce any number of balls within the display area. This demos the capabilities of the Mosaic control to display multiple moving images without display artefacts.