[Visual-devel] Framebuffer based applet viewer
Status: Alpha
Brought to you by:
lettoz
From: Thomas H. <Tho...@we...> - 2002-07-22 13:25:17
|
Hi Mark, sorry for sending you first a half ready mail. But I did it with web.de's web interface. My login timed out and when logging in again, I seemed to complete the text. Later, I noticed that I sent a version I saved in the middle and lost the rest. On Sunday 21 July 2002 16:56, you wrote: > > Cool! Let us know if you have something that works. > (screenshots would be nice :) 1. My difficulty with that: How do I take a screenshot from the framebuffer screen? 2. What I do is maybe completely uncool and against the concept of JAVA ? :-( Let me explain what I try do and what purpose I want it for: I've a project where I use applets to monitor and operate industrial machinery over a network. The applet shows a so called HMI (human machine interface) screen resembling a control panel. It consists of a background drawing and some elements which show values or which can modify values. The applet is allways the same for every screen or page. A specific page layout is then defined in the applets parameter lines. To use different types of "GUI" elements, these elements are defined in separate classes and serve as a kind of plugin for the applet. Now I can display the HMI screen in a browser. Snapshots of this are available from my project's home page on: http://visual.sourceforge.net Now, my next goal is to show them on a local computer in or near the machine. Such a computer might be some embedded system, which has not enough resources to show an applet in a browser on top of X11. Further, when such a device serves as a machines control panel only, I don't want a windowed view. The operator shall always see the essential things. So I want to show it on the framebuffer display in full screen mode. Were it only this, I could write a C or C++ application that interprets the parameter lines as the applet would and show the page. But I also want that users can create new plugin classes for new HMI/GUI elements according to their needs. For example, I've built an application where an HMI screen shows results from a diameter measurement. Some round product comes out of a machine and diameter is measured under four different angles. I created a special element that takes the four values and computes an interpolated contour function and display the approximated more or less round outline. Such a new element can easily be created be deriving it form hmiElement base class. Then, it works with the hmiViewer applet in the browser. But I want to reuse this code unchanged in the local viewer application. For this, I need a JAVA VM. I tried to do this with Kaffe. But then I noticed that gcc.3.x.x can compile JAVA to machine code. Thus, I do not need a JIT compiler and I can compile in the necessary classes from the library, resulting in total control over code size. I did not implement the AWT for this. No toolkit, no peers. Instead, I implemented the basic drawing functions as native methods of my java.awt.Graphics class. As I do not need neither conventional GUI elements (like checkboxes or scrollbars) nor windows, I can do without most components. Only java.awt.component, java.awt.container and java.awt.panel are there. Further I "crippled" the library classes in java.io,java.lang,java.util reducing them to the absolute minimum needed for my purpose. I can do without much of exceptions, tests and stack tracing supposing that elements are tested and debugged using other (SUN's, Kaffe's) tools and appletviewer. I can further do without properties,locales,security,reflection API and most of the Unicode/charset converting stuff. Sorry if this was a bit lengthy. I tried to point out, that this work is not too useful for the general public. It will be available from the above stated address as soon as I manage to fix some bugs with mouse cursors, mouseless mode, key events and page change via showDocument. Currently, it would present more a source of frustration to those willing to try it out. > > Note though that the Kaffe AWT implementation is under the GPL, not > under the GPL+exception statement as used by Classpath. > I do not know the exception I guess it may allow to use Classpath with non GPL'ed software also similar to LGPL. My project is under GPL, so I assume I may use any GPL'ed code in it. I'm not a lawyer nor did I spent much thought about licenses, but I suppose GPL is also good enough for users of my project which may want to create applications for their machinery using my tools and runtime executables but want to keep their work proprietary. This should be the same as writinga text with a GPL'ed editor or writing a shell script for bash: Neither the text nor the script need to be put under GPL or published. If, on the other hand, somebody improves or extends my code, I should like to see him share his work with me and the community. Please tell me, if I missed something. Salutations Thomas ______________________________________________________________________________ WEB.DE MyPage - Ultimatives Kommunikationstool! Ihre Message sofort online! Domain aenderbar! http://www.das.ist.aber.ne.lustige.sache.ms/ |