Some additional 1456 applet landscapes related to simulating the DVB-MHP system.

William Overington

Copyright 2002 William Overington

Saturday 5 January 2002

This document is designed for use by readers who enjoyed the document 1456 object code upon the DVB-MHP platform. and who are interested in experimenting with the use of 1456 object code in a simulated DVB-MHP mouse event driven environment running offline within an internet browser. It may also be of interest to other readers who might like to try just using the example programs that accompany this document. A Java enabled browser is required. However, a Java compiler is not needed in order to try using these examples.

This document includes six blank 1456 applet landscapes, each of which is derived from the ast00901.java program that was previously published.

I have recently put forward in the forum at http://forum.mhp.org a suggestion for a DVB-MHP based system called The Plateau System that uses a number of optional items from the DVB-MHP system that are not required in a minimum system. Now, whether or not there is enthusiasm for The Plateau System, so that both minimum systems and The Plateau System can exist as two specific levels of implementation of the DVB-MHP specification within The European Union remains to be seen and I feel obliged to state that it is entirely possible that the idea will not be taken up.

I am also in the situation that I have not yet written a Java program that could actually directly run on a DVB-MHP set top box.

However, I feel that some people interested in researching mouse event driven software and its possible application in a DVB-MHP system might nonetheless like to have available the opportunity to have a go at programming with a 1456 applet landscape that simulates a DVB-MHP system at the level of The Plateau System. I emphasise that the accuracy of the simulation is not known, yet these 1456 applet landscapes are now available for readers who do not have a Java compiler available to gain some experience with writing some software that reacts to mouse events.

Six new 1456 applet landscapes are presented.

The first, ast01501, is a modification of the ast00901 1456 applet landscape. The ast01501 simulation makes the start up presumption that there is a mouse attached to the system. In addition, it has two extra coloured buttons. These buttons are coded with obeycode taking the value of 55 and 56 respectively. The only mouse event available is the mouse pressed event, 41. The extra coloured buttons are coloured magenta and orange in accordance with my suggestion for The Plateau System. These particular colours for these two buttons cannot be considered as standard in the world at large at the present time.

The ast01501 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

An example of the use of the ast01501 1456 applet landscape is provided. Simply click the mouse on the black area to draw a square. At start up, a square is drawn in cyan. Pushing any of the six coloured buttons causes subsequent squares to be drawn in the appropriate colour until a different coloured button is pushed.

The ast01501 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

The second, ast01502, is a modification of the ast01501 1456 applet landscape. The mouse pressed event, 41, is not available, yet the mouse moved event, 46, and the mouse dragged event, 47, are available. However, the ast01502 1456 applet landscape does, in fact, use a mouse pressed event within it. This is solely to allow the facility of switching off the mouse for the purpose of changing the simulation environment: a mouse pressed event does not get passed through to the 1456 object code. Please note, however, that if one does seek to alter the simulation environment then this can sometimes not be quite as readily done as with the ast01501 program: this is thought perhaps to be due to the need to ensure that a mouse pressed event is not overtaken by a mouse dragged event if the mouse is not perfectly still when the button is pressed.

The ast01502 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

An example of the use of the ast01502 1456 applet landscape is provided. A mouse move produces a small circle and a mouse drag produces a large circle. This example also reacts to the colour buttons.

An interesting experiment is to try pressing the mouse button firstly when the mouse is still and secondly when it is moving.

Another interesting experiment is to move the mouse off the side of the black screen then press the mouse button then move the mouse back onto the black screen and then release the mouse button.

In the above experiment the side of the black screen is specified because the black screen only has three edges that are proper simulations, namely the top and the two sides. The bottom edge of the black screen is not a real edge as really the true edge is the lower edge of the simulated hand held infra-red control device. That is part of the way that this simulation works.

However, please know that I do not know how the edge of the display in a real DVB-MHP system will react in relation to a mouse. It may or may not be the same as here. I am very much on a learning curve with this and these simulations are part of my efforts to try to move along the learning curve.

The ast01502 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

The third, ast01503, is a modification of the ast01501 1456 applet landscape. The mouse pressed event, 41, the mouse moved event, 46, and the mouse dragged event, 47, are all available. It is unclear to me as to exactly how these events will interact with each other on all occasions, so that is an interesting area for some tests. Any results will be in relation to the use of the 1456 object code system and may not necessarily be the same as with the interaction of directly programmed mouse events; however, there is scope for some interesting experiments.

The ast01503 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

An example of the use of the ast01503 1456 applet landscape is provided. A mouse press produces a square as in the first example, a mouse move produces a small circle and a mouse drag produces a large circle. This example also reacts to the colour buttons.

An interesting experiment is to try pressing the mouse button firstly when the mouse is still and secondly when it is moving. When I tried this experiment, in the first case a square was drawn and in the second case no square was drawn.

The ast01503 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

The fourth, ast01504, is a modification of the ast01501 1456 applet landscape. Here, all seven mouse events are available. This may well cause all manner of interactions between mouse events. However, this 1456 applet landscape is provided so that readers who do not have acces to a Java compiler can have the opportunity to experiment if they so choose. The events are the mouse pressed event, 41, the mouse released event, 42, the mouse clicked event, 43, the mouse entered event, 44, the mouse exited event, 45, the mouse moved event, 46, and the mouse dragged event, 47.

The ast01504 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

An example of the use of the ast01504 1456 applet landscape is provided. This example is intended to work as follows, though there may be problems found, similar to those that I found while developing this document.

The mouse pressed event, the mouse moved event and the mouse dragged event work as before. The mouse released event should draw a plus sign style cencharacter, the mouse clicked event should draw a multiply sign style cencharacter, the mouse entered event should draw a filled square and the mouse exited event should draw a filled circle.

An experiment worth trying is first to move the mouse to a place on the screen. Press down the button. A square should be drawn. I found that by releasing the button without moving the mouse caused a multiply sign style cencharacter to be drawn but that moving the mouse while the button was down and then releasing the button caused a plus sign style cencharacter to be drawn.

A second experiment is to move the mouse off the black screen and then back on. Leaving the screen should draw a filled circle, coming back onto the screen should draw a filled square, though, as mentioned below, the square may not be observed.

A third experiment is to move the mouse off the black screen, then press down the mouse button, then move the mouse back on to the black screen, then release the mouse button.

So, perhaps for some applications the mouse released event and the mouse clicked event should be programmed to have the same effect, so that a perfectly still mouse or a slightly moved mouse during a mouse click will be treated the same. Maybe the mouse pressed event should be the event to which software should react. These are the sort of matters into which these 1456 applet landscapes will hopefully give some insight.

Unfortunately, I have not been able to make a system with all seven mouse events respond fully, so I later make ast01505 as a variation on ast01504 but with the mouse moved and mouse dragged events and the mouse motion listener removed. However, here is an example of the use of ast01504 1456 applet landscape. I point out that though that with the PC that I am using for developing these programs that I managed to get six of them to work together, it was just the mouse entered event that could not be detected. When I tried this program on an older, slower, PC, three mouse events could not be detected, namely the mouse released event, the mouse clicked event and the mouse entered event could not be detected. Maybe a really fast PC will detect all seven mouse events with this program. Please remember that these problems are being observed using the 1456 object code environment and the results may or may not be the same with a direct Java program.

The ast01504 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

Unfortunately, I have not been able to make a system with all seven mouse events respond fully, so I will make ast01505 as a variation on ast01504 but with the mouse moved and mouse dragged events and the mouse motion listener removed.

The ast01505 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

Here is an example of the use of the ast01505 1456 applet landscape with the same software as regards events 41 through to 45 as for the ast01504 example of use program.

It is interesting to try the three experiments that were designed for use with the example of use of the ast01504 1456 applet landscape.

The ast01505 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

This is much better and the mouse entered event can be detected. I feel that much can be learned from this program. However, the mouse exited and the mouse entered does not work below the simulated screen, so I have made a variation, ast01506, such that the 1456 applet landscape translates an entry at the lower edge of the 1456 applet landscape to being on the black screen display area and translates an exit from the lower edge of the 1456 applet landscape to being from the black screen display area. This is stretching the simulation a little, yet is done for fun just to observe how it looks. The translation is by a vertical distance of 112 pixels so that the effect is as near as possible if it were an actual event occurring at the lower edge of the black screen area.

The ast01506 web based simulation of 1456 object code upon the DVB-MHP platform, plain program.

Here is the same program as for the example of use of the ast01505 1456 applet landscape so that readers may observe the effects of using this modified 1456 applet landscape with the same 1456 object code program.

The ast01506 web based simulation of 1456 object code upon the DVB-MHP platform, example of use.

The ast01506 program then has the effect of responding to passing over the buttons on the simulated hand held infra-red control device! Still, I feel that that is well worth observing, so the program is included.


Programmers who write in Java might like to note that I have included in the Java source code of each of these 1456 applet landscape programs a globally declared int variable as follows.

    int ____Copyright_2002_William_Overington____=2002;

This int variable is not used within the program at all. However, including this int variable as a global variable produces the effect that if the .class file is opened in a text editor, then my copyright notice appears in text upon the screen. Each reader might like to consider using the definition of a global int variable that places his or her own name into the .class file of Java programs that he or she writes.


Here are links for the various 1456 applet landscape class files and for the Engine1456.class file. Right clicking may well be the best way to download these files to local storage.

ast00901.class

ast01501.class

ast01502.class

ast01503.class

ast01504.class

ast01505.class

ast01506.class

Engine1456.class

Hopefully these 1456 applet landscapes and the examples of their use provide an interesting insight into the behaviour of software that responds to mouse events. As mentioned previously, these examples are only web based simulations, and then are through the 1456 object code system, yet they do offer a chance for people without Java compiling facilities to have a try at writing programs that respond to mouse events.

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

http://www.users.globalnet.co.uk/~ngo/ast01500.htm