SoftWoehr MyEditUtil 1.0
Programmer's Manual
Copyright © 2000 by Jack J. Woehr
P. O. Box 51
Golden, Colorado 80402-0051 USA
http://www.softwoehr.com
NO WARRANTY NO GUARANTEE FREE SOFTWARE.
Table of Contents
The SoftWoehr MEU classes in the package com.SoftWoehr.JTOpenContrib.MEU
implement the remote source physical file member editor described the SoftWoehr
MyEditUtil User Manual. All source is present alongside the classes
in the softwoehr.jar file; unpack the jar file to see the source.
Also present in the jar are the NetBeans
forms which were produced by the design tool. They are included for the
convenience of NetBeans/Sun Forte users, but are not necessary to compile,
modify or run the application.
Source code documentation in Javadoc
form is also provided, though in some cases it is perfunctory.
MEU is about 35,000 lines of Java code. About 1/6 of the code or less was
autogenerated under the Sun
Forte (NetBeans) Java IDE.
MEU was intended to be an enhanced emulation of a subset of traditional
enterprise system terminal-mode editing. Access to the AS/400 is the most
straightforward part of the MEU implementation. The complexity is in the
exigencies of coding a row-oriented (record-oriented) editor using the
stream-oriented editing widgets provided in javax.swing.
The paradox runs like this:
-
JTextArea, etc., are there to save you work.
-
To implement a record-based editor according to the design of javax.swing,
one has to descend to very low levels (poorly documented levels) of the
javax.swing model, which is a lot of work.
So in the interests of coding MEU as quickly and as neatly as possible
under the circumstances, MEU's display technology is coded directly on
top of javax.swing. This makes for extremely weird code in the file MEUTextArea.java
which takes an approach resembling screen-scraping of its own JTextArea!
MEU uses com.SoftWoehr.JTOpenContrib.connectionmgr.Mgr to manage connections.
This works in a fashion similar to JTOpen ConnectionPool (and antedates
it). In the future, JTOpen's ConnectionPool objects will be supported by
MEU.
As indicated above, MEU is not composed
of particularly re-usable modules. It's a very nice hack and has to be
taken whole. That is to say, the only useful thing you can do with MEU's
code is compile it and invoke it, either
-
via a main() method, as provided in com.SoftWoehr.JTOpenContrib.MEU.MEU.main(String
argv[])
-
by creating an instance of MEU using the constructor com.SoftWoehr.JTOpenContrib.MEU.MEU.MEU(String
propertiesFileName, String serverName, String ifsPath)
-
Any of the arguments to this ctor may be null.
-
If serverName is null, and ifsPath is not, then the properties
file will have set the server name, or an error dialog will be displayed,
followed by an MEU window opening normally but without an edit file member
loaded.
-
When the last MEU window closes, or when the user chooses the menu selection
File->Exit, MEU will call System.exit()
-
unless the MEU instance has had setAllowedToExit(false)
called. In this case, windows will dispose() but System.exit() will not
be called.
-
A new MEU edit window can be opened by calling on the MEU instance its
method newFrame(java.awt.Point
location, String serverName, String ifsPath)
-
Any of the arguments to newFrame() may be null.
-
If location is null, the window will open in a default
position.
-
If serverName is null, and ifsPath is not, an error
dialog will be displayed, followed by an MEU window opening normally but
without an edit file member loaded.
-
On the other hand, if there is a server name property set already in the
MEU instance, that server will be used.
Using MEU from within an application
To summarize: In order to use MEU from inside an application:
-
Create an MEU object instance using com.SoftWoehr.JTOpenContrib.MEU.MEU.MEU(String
propertiesFileName, String serverName, String ifsPath)
-
Any or all of these arguments may be null.
-
If you do not wish the user to be allowed to close the Java VM instance
of your application by closing MEU, call setAllowedToExit(false)
on the MEU instance.
-
If you wish to open additional MEU windows based on the same MEU instance,
call newFrame(java.awt.Point
location, String serverName, String ifsPath) on the MEU instance.
-
Any or all of these arguments may be null.
Example
The MEU Popup Example illustrates this
usage of launching MEU from a popup menu.
Please send any bug reports to MEU_Bugs@softwoehr.com
Fairmount, Colorado
September 15, 2000