Java Source Code (was EMC C code)
Posted by
Matt Shaver
on 1999-06-14 15:00:04 UTC
> From: shackle@... (Will Shackleford)Sure, just get:
>
> Also, would you mind making the source code publically available?
http://www.erols.com/mshaver/emcjava.zip
this archive contains:
Backup.bat - back up before making regrettable errors!
ctb.bat - compiles TextButton with JAVAC
ceg.bat - compiles EmcGui with JAVAC
ccc.bat - compiles Communication with JAVAC
veg.bat - runs Appletviewer
emcgui.htm - Web page that loads the EmcGui applet
EmcGui.java
EmcGui.class
Communication.java
Communication.class
TextButton.java
TextButton.class
Basically EmcGui is the main applet code, TextButton is the custom button
that I made and which is used for all the buttons, and Communication is the
object that connects the applet with the EMC. Obviously, I had no idea how
Communication should really be implemented, so for now it does three things:
1. When the GUI asks for information from the EMC, Communication returns the
contents of variables it maintains. When this class is modified to actually
work with the EMC all these variables will be the ones deep in the bowels of
the EMC itself. Also, I cheated with the ToolList and ProgramList, they are
in EmcGui as preinitialized text. This will need to come through
Communication from the EMC.
2. When the GUI sends a command to Communication it modifies it's own
variables accordingly and write out a pseudo NML type command string to the
console.
3. It creates a display of the Boolean variables it maintains that is visible
in the center of the EmcGui screen when the Debug tab is selected. You can
check and uncheck the boxes and watch the display change.
> I think I might modify it to make a few commands and status fields actuallyLook it over and see what you think. If we can keep most of the changes
> connect to the EMC and repost it hoping someone else would finish the job.
within the Communication class (I know EmcGui will also have to change some),
and if the methods for exchanging data with the EMC are consistent, if you
can get a few commands and a few status fields working the remainder should
be just a typing job (yea, sure :) There are also some features in Xemc that
aren't in this Java version. I'll need to extend EmcGui with keyboard support
and some additional menus (maybe you know of a way to do pull down CUA style
menus? How about a File/Open dialog box?).
I wrote this program almost two years ago and I looked at it today while
getting this material together. I thought, "I wrote that?", I hardly
understand what all that stuff means. It will take a day or two of review to
get back in gear with Java, but if you're interested in getting this going,
I'll be glad to help.
Matt