com.SoftWoehr.JTOpenContrib.MEU
Class MEU

java.lang.Object
  |
  +--com.SoftWoehr.JTOpenContrib.MEU.MEU

public class MEU
extends java.lang.Object

Create an MEU editing session.


Field Summary
static java.lang.String MEU_VERSION
          Identify version of release
 
Constructor Summary
MEU()
          Creates new MEU
MEU(java.lang.String propertiesFileName)
          Creates a new MEU with the desired properties
MEU(java.lang.String propertiesFileName, java.lang.String serverName, java.lang.String ifsPath)
          Creates new MEU on a properties file, server name, ifs path.
 
Method Summary
 java.awt.Point cascade()
          Cascade all frames
 boolean closeRequested(MEUFrame f)
          An MEU Frame has signalled its MEUController that it wants to exit.
 void defaultSession()
          Open a first empty edit window
 void defaultSession(java.lang.String serverName, java.lang.String ifsPath)
          Open a first edit window on a server and file member
 void eventQCDemo(java.awt.event.ActionEvent evt)
          Bring up an operations navigator
 void freeServer(ServiceRecord serviceRecord)
          Let go of a server for an MEUEditBuffer
 int getIntProperty(java.lang.String property)
          Get a specific int property.
 java.lang.String getProperty(java.lang.String property)
          Get a property stored by this application controller
 QCPartnerFrame getQCDemo()
          Instance QCDemo if necessary and show window
 ServiceRecord getServer(java.lang.String systemName, ServiceClient client)
          Fetch a server for an MEUEditBuffer ...
 boolean isAllowedToExit()
          If set false, closes which would do System.exit() don't.
 void loadProperties(java.lang.String filename)
          Load the properties from a props file.
static void main(java.lang.String[] argv)
          Runs the SoftWoehr MEU editor
 void newFrame(java.awt.Point location)
          Create a new frame, add it to the collection MEU manages, and show it
 void newFrame(java.awt.Point location, java.lang.String serverName, java.lang.String ifsPath)
          Create a new frame, add it to the collection MEU manages, open a file member and show it
 boolean requestShutdown(MEUFrame f)
          Iterate through frames requesting shutdown.
 void setAllowedToExit(boolean tf)
          If set false, closes which would do System.exit() don't.
 java.lang.String setProperty(java.lang.String property, java.lang.String value)
          Set a property stored by this application controller.
 void storeProperties(java.lang.String filename)
          Store the properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEU_VERSION

public static final java.lang.String MEU_VERSION
Identify version of release
Constructor Detail

MEU

public MEU()
Creates new MEU

MEU

public MEU(java.lang.String propertiesFileName,
           java.lang.String serverName,
           java.lang.String ifsPath)
Creates new MEU on a properties file, server name, ifs path. Any of these values may legitimately be null.
Parameters:
propertiesFileName - Relative or full pathname of MEU properties file to open.
serverName - Name of server to access.
ifsPath - Fully qualified IFS pathname of file member to edit.

MEU

public MEU(java.lang.String propertiesFileName)
Creates a new MEU with the desired properties
Parameters:
propertiesFileName - MEU properties file name to open and parse and use.
Method Detail

getServer

public ServiceRecord getServer(java.lang.String systemName,
                               ServiceClient client)
                        throws Mgr.UnknownServiceException,
                               Mgr.UnknownProtocolException
Fetch a server for an MEUEditBuffer ... the ServiceRecord object contains a ref to an AS400 object.
Parameters:
systemName - System one needs an AS400 object for.
client - The instance which needs the service record (AS400 obj).
Returns:
A ServiceRecord which contains the AS400 object.
Throws:
UnknownServiceException - If the service requested is unknown.
UnknownProtocolException - If the protocol requested is unknown.

freeServer

public void freeServer(ServiceRecord serviceRecord)
                throws Mgr.InvalidServiceRecordException
Let go of a server for an MEUEditBuffer
Parameters:
serviceRecord - The original return from getServer()
Throws:
InvalidServiceRecordException - If the Mgr doesn't know anything about the sr fed to it.

defaultSession

public void defaultSession()
Open a first empty edit window

defaultSession

public void defaultSession(java.lang.String serverName,
                           java.lang.String ifsPath)
Open a first edit window on a server and file member
Parameters:
serverName - The server on which the member resides.
ifsPath - The fully-qualified source physical file member IFS path.

newFrame

public void newFrame(java.awt.Point location)
Create a new frame, add it to the collection MEU manages, and show it
Parameters:
location - Position on desktop for window to appear.

newFrame

public void newFrame(java.awt.Point location,
                     java.lang.String serverName,
                     java.lang.String ifsPath)
Create a new frame, add it to the collection MEU manages, open a file member and show it
Parameters:
location - Position on desktop for window to appear. May be null, then default position used.
serverName - Name of server to open on. May be null, in which case default or none is used.
ifsPath - The fully-qualified source physical file member IFS path.

loadProperties

public void loadProperties(java.lang.String filename)
Load the properties from a props file.
Parameters:
filename - Java-style properties file to load from.

storeProperties

public void storeProperties(java.lang.String filename)
Store the properties
Parameters:
filename - Write current user-set properties to a file.

getProperty

public java.lang.String getProperty(java.lang.String property)
Get a property stored by this application controller
Parameters:
property - Name of property
Returns:
String value or null.

setProperty

public java.lang.String setProperty(java.lang.String property,
                                    java.lang.String value)
Set a property stored by this application controller. Return the previous value for this property.
Parameters:
property - Name of property to set
value - Value of property to set
Returns:
Previous value of property.

getIntProperty

public int getIntProperty(java.lang.String property)
                   throws MEUProperties.NoSuchPropertyException,
                          MEUProperties.InvalidIntPropertyException
Get a specific int property.
Parameters:
property - The name of the property
Returns:
The integer value of the property.
Throws:
NoSuchPropertyException - There ain't no such
InvalidIntPropertyException - The property value string isn't convertible to a base 10 integer

cascade

public java.awt.Point cascade()
Cascade all frames
Returns:
Next point to which a window would be cascaded after all have been cascaded.

getQCDemo

public QCPartnerFrame getQCDemo()
Instance QCDemo if necessary and show window
Returns:
The QCDemo instance shared by all windows.

eventQCDemo

public void eventQCDemo(java.awt.event.ActionEvent evt)
Bring up an operations navigator
Parameters:
evt - The actionEvent triggering the bringup.

setAllowedToExit

public void setAllowedToExit(boolean tf)
If set false, closes which would do System.exit() don't.
Parameters:
tf - true if closes may System.exit() if appropriate; false if not.

isAllowedToExit

public boolean isAllowedToExit()
If set false, closes which would do System.exit() don't.
Returns:
true if MEU is allowed to do System.exit() when it would be appropriate in a standalone setting.
See Also:
setAllowedToExit(boolean)

closeRequested

public boolean closeRequested(MEUFrame f)
An MEU Frame has signalled its MEUController that it wants to exit. The MEUController has cleaned up and now requests to close. The frame must be removed from our collection.
Parameters:
f - Frame making request
Returns:
true if close may proceed.

requestShutdown

public boolean requestShutdown(MEUFrame f)
Iterate through frames requesting shutdown. If all approve (true), i.e., if the user doesn't CANCEL on a "Save?" requester, go ahead and have each frame cleanup, dispose each frame, delete the heck out of them as well as one can, all this to make sure connection resources etc. are returned. Then exitIfAllowed();
Parameters:
f - Frame making request.
Returns:
True if shutdown proceeding
See Also:
isAllowedToExit(), setAllowedToExit(boolean)

main

public static void main(java.lang.String[] argv)
Runs the SoftWoehr MEU editor
Parameters:
argv - The command line for the editor.