com.jFormTK
Class JUnLoadForm

java.lang.Object
  extended by com.jFormTK.JUnLoadForm
All Implemented Interfaces:
JConstants

public class JUnLoadForm
extends java.lang.Object
implements JConstants

        This 'jFormTK' Class is designed to hold the parameters required to re-load the
        'jFormTK' form [JFormForm Sub-Class] that had the focus when the 'jFormTK'
        Application was exited...

        This class shall also provide a 'JFormForm' Sub-Class History by saving control
        parameters each time a 'JFormForm' Sub-Class is unloaded...

        There shall be one instance of this class per 'jFormTK' Application...
        The instance is instantiated and hosted by the 'AppDB' Class during the Application
        load stage...

        Each time a 'JFormForm' Sub-Class is unloaded the following parameters are appended
        to the current 'JUnLoadForm' instance:

                .       formIndex                               String
                .       .       AppForms Index OR -TabIndex...
                .       focusedFldID                    String
                .       .       'JFormField' ID that had the focus when the Unload Form was requested.
                .       toBeFocusedFlowControl  String
                        NOTE:
                        -       = ".this" if a Pre Processor keeps the expected Flow...
                        -       = ".Next" if a Post Process keeps the expected Flow...
                        -       Full 'jFormTK' ID iff post processor has returned a 'flowControl' ID...
                        -       .TAB+tabIndex iff another TAB was selected from a current TAB...
                        -       = null string [""] if a new Form is requested in the Flow Control...
                .       .       'flowControl' constructed by 'focusedFldID' Post processing before
                .               processing the Unload Form Event...
                .       unloadCode      String
                .       .       Code to specify the process that requested the Unload Form processing.
                                -       "q"                     -       Quit Form request...
                                -       "l"                     -       Quit via 'JFormFrame.bLastForm' Button...
                                -       "t"                     -       'jFormTK' TAB Selection...
                                -       "p"                     -       'jFormTK' TAB w/ Post Processing' Selection...
                                -       "bID"           -       Branch from 'JFormForm' Sub-Class 'jFormField'
                                                                        where ID is the Full 'jFormTK' ID...
                                -       "x"                     -       Exit Application...
                        -       timeStamp       -       String with Date and Time Encoded...
                        -       fromTrace       -       String with 'from' annotations... 

        The 'toString' Method SHALL produce an encoded String [savedJUnLoadForm] designed to
        re-load the     'JUnLoadForm' instance parameters at Application Load Time. It
        [savedJUnLoadForm] is written to the 'AddressBook' file when the 'jFormTK'
        Application services an Unload Form request, e.g. when the 'Quit' operation is
        requested for a 'JFormForm' Sub-Class [Form]...
        

Version:
1.00, 21 Jan 2006
Author:
Jim Crowell
Professional Computer Solutions [PCS]
URL: http://jFormTK.com/
E-Mail: JimCrowell@EMail.com

Copyright (c) 2009 by Professional Computer Solutions [PCS]
All Rights Reserved

Field Summary
(package private) static java.lang.String focusedFldID
           
(package private) static java.lang.String formIndex
           
(package private) static java.lang.String fromTrace
           
(package private) static JUnLoadForm thisJUnLoadForm
           
(package private) static java.lang.String timeStamp
           
(package private) static java.lang.String toBeFocusedFlowControl
           
(package private) static java.lang.String unloadCode
           
 
Fields inherited from interface com.jFormTK.JConstants
__, _AB, _AB_, _AField, _B, _BField, _CField, _CIField, _DField, _EU_, _H, _HEIGHT, _HEIGHT_INV, _HField, _I, _IField, _LField, _MField, _NField, _NotRequired, _PField, _PIField, _QField, _Required, _RField, _TAField, _TField, _WIDTH, _WIDTH_INV, _XField, AB, APP_TRACE_FOCUS, APP_TRACE_GET, APP_TRACE_SET, B_, BAR, BAR_, BB, BH, BI, BREAKPOINT_FOCUS, BREAKPOINT_GET, BREAKPOINT_SET, BVB, C_QUOTE, CLOSE, CLOSE_BRACKET, COLORS_DELIMITER, COMMA, COMMA_, D_ELEMENT, D_ELEMENT_N, D_ELEMENT_N1, D_ELEMENT_N2, D_ELEMENT_N3, D_FIELDS, D_FIELDS_N, D_FIELDS_N1, D_FIELDS_N2, D_FIELDS_N3, D_ITEMS, DASH, DOT, EOL, EOP, EOS, FIELD_TRACE_FOCUS, FIELD_TRACE_GET, FIELD_TRACE_SET, FONT_DELIMITER, H_, HB, HH, HI, I_, IB, IH, II, JLAF_DELIMITER, LF, LISTBRACKET, NO, OPEN, OPEN_BRACKET, pCheckboxGroup, QUOTE, SPACE_, TAB, YES
 
Constructor Summary
JUnLoadForm()
           
 
Method Summary
static void add(java.lang.String formIndexIn, java.lang.String focusedFldIDIn, java.lang.String toBeFocusedFC, java.lang.String unloadCodeIn, java.lang.String from)
           Add an "UnLoad 'JFormForm' Sub-Class" record to indicate the unloading of a 'jFormTK' Application Form...
static java.lang.String displayJUnLoadForm(java.lang.String from)
           
static java.lang.String getLastFocusedFldID(java.lang.String from)
           Return the Last Focused ID...
static int getLastFormIndex(java.lang.String from)
           Get the last Form Index for the currently Focused 'JFormForm' Sub-Class...
static java.lang.String getLastToBeFocusedFlowControl()
           Return the Last To Be Focused Flow Control...
static java.lang.String getLastUnLoadCode()
           Return the Last 'UnLoadCode' control...
static void load(java.lang.String savedJUnLoadForm)
           Load the 'focusedFldID' and 'toBeFocuseFlowControl' Controls from the "Saved JUnLoadForm" String...
static void setUnLoadCode(java.lang.String s)
           Set the UnLoad Type control String [s]...
static void setUnloadedFormIndex(java.lang.String s)
           Set the Unloaded Form Index String [s]...
static void showJUnLoadForm(java.lang.String from)
           Produce a Message Dialog that details the current contents of the 'JUnLoadForm' Class Parameters...
 java.lang.String toString()
           Return a Java String with the Class fields delimited with the 'jFormTKDB' Fields Delimiter.
static void XXXreplaceLastToBeFocusedFlowControl(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formIndex

static java.lang.String formIndex

focusedFldID

static java.lang.String focusedFldID

toBeFocusedFlowControl

static java.lang.String toBeFocusedFlowControl

unloadCode

static java.lang.String unloadCode

timeStamp

static java.lang.String timeStamp

fromTrace

static java.lang.String fromTrace

thisJUnLoadForm

static JUnLoadForm thisJUnLoadForm
Constructor Detail

JUnLoadForm

public JUnLoadForm()
Method Detail

add

public static void add(java.lang.String formIndexIn,
                       java.lang.String focusedFldIDIn,
                       java.lang.String toBeFocusedFC,
                       java.lang.String unloadCodeIn,
                       java.lang.String from)
        Add an "UnLoad 'JFormForm' Sub-Class" record to indicate the unloading of
        a 'jFormTK' Application Form...

        Kernel Usage:
        1)      'BasejFormTK.doTabSelectPostprocess' if the Post Processing has changed the
                focus 'JFormField'...
        2)      'BasejFormTK.doTabSelectPostprocess' if the Post Processing has changed the
                focus to a 'jFormTK' Framework TAB...
        3)      'JFormControl.doFocus' Method when the 'flowControl' has branched to a
                'jFormTK' Framework TAB...
        4)      'JFormControl.doFocus' Method when the 'flowControl' has branched to a new
                'JFormForm' Sub-Class Form. This annotation specifies the 'JFormForm'
                Sub-Class that is unloaded because of the New Form request...
        5)      'JFormFrame.verifySaveForm' Method when a New Form is requested. The current
                form is saved after End User verification and this annotation is designed to
                specify the 'JFormForm' Sub-Class that is unloaded...
        6)      'JHDD_IO.exitApplication' Method after the 'jFormTK' Application End-User
                has selected the "Exit" button from the 'jFormTK' Framework's "Controls"
                TAB Panel...
        7)      '

xxx)    'BasejFormTK.doAddressBookPanelTAB' method when the Form is UnLoaded via
                a reference to the "Address Book" Framework TAB...
xxx)    'BasejFormTK.TabbedPaneListener.stateChanged' Method when the 'jFormTK'
                Framework TAB has changed state...
xxx)    'BasejFormTK.TabbedPaneListener.stateChanged' Method when the Focus Change
                TAB Select Post Processor is envoked and the Flow Control is adjusted...
                
        

Parameters:
formIndexIn - Unloaded Form Index OR negative TAB Index...
focusedFldIDIn - Focused Flow Control String...
toBeFocusedFC - To Be Focused Flow Control String
unloadCodeIn - An annotation [String] to specify what type of UnLoading has occurred: - "t" Unload prior to a 'JFormTK' Framework TAB selection... - "q" Quit Button processing [load Next 'JFormForm' Sub-Class]... - "f" JFormTree Leaf selected. This entry indicates the Form to be unloaded when the selection was made... - "x" Exit the 'jFormTK' Application... - "b"+FormID Branch to a new Form via 'flowControl' parameter... The FormID is the 'JFormForm' Sub-Class ID that was unloaded to service the new Form Branch request... - "p" Pre Process Focused 'JFormField' Control... NOTE: This is a secondary entry designed to signal the 'jFormTK' Kernel that a Pre-Process MUST be performed on the "To Be Focused" 'JFormField'... Used for the 'JFormForm' Sub-Class "History" report... Used by the 'JFormFrame.goToForm' method to re-load the previously inloaded 'JFormForm' Sub-Class...
from - DEBUG annotation of the calling 'jFormTK' method...

getLastFocusedFldID

public static java.lang.String getLastFocusedFldID(java.lang.String from)
        Return the Last Focused ID...

        Kernel Usage:
        1)      'AppForms.loadJFormForm [2]' method to re-load a 'JFormForm' Sub-Class...
        2)      'JFocus.goToForm' method to get the 'JFormField' ID at the time the last
                'JFormForm' Sub-Class was unloaded...
        

Returns:
the 'focusedID' String...

getLastFormIndex

public static int getLastFormIndex(java.lang.String from)
        Get the last Form Index for the currently Focused 'JFormForm' Sub-Class...
        NOTE 1: 
        - this index [int] is >= 0 if it represents an unloaded 'JFormForm' Sub-Class...
        NOTE 2: 
        - this index [int] is  < 0 if it represents an unloaded 'JFormTK' Framework TAB...

        Kernel Usage:
        1)      'AddressBook.doReturnToForm' method...
        2)      'AppForms.loadJFormForm [2]' method...
        3)      'BasejFormTK.QuickEditDialog.doReturnToForm' method...
        4)      'TableEditDialog.actionPerformed' method...     
REMOVED)        'jFormTK.ApppForms.loadJFormForm [7]' Method to set the "Tool Tip" for the
                Previous 'JFormField' 'Forms' TAB previous Form Button...
REMOVED)        'JFormFrame.doPriorForm' Method...
        

Parameters:
from - DEBUG 'from annotation...
Returns:
Index [int] to point to control the next Form processing...

getLastToBeFocusedFlowControl

public static java.lang.String getLastToBeFocusedFlowControl()
        Return the Last To Be Focused Flow Control...

        Kernel Usage:
        1)      'AppForms.loadJFormForm' Signature [2] to force the Focus of the last focused
                'JFormField' of the last 'JFormForm' Sub-Class when the 'jFormTK' App
                was exited...
        

Returns:
the 'toBeFocusedFlowControl' String...

getLastUnLoadCode

public static java.lang.String getLastUnLoadCode()
        Return the Last 'UnLoadCode' control...

        Kernel Usage:
        1)      'JFocus.goToForm' to force the Focus of the last
                focused 'JFormField' of the last 'JFormForm' Sub-Class when the 'jFormTK'
                App     was exited...
        

Returns:
the 'JFormTK' ID String...

load

public static void load(java.lang.String savedJUnLoadForm)
        Load the 'focusedFldID' and 'toBeFocuseFlowControl' Controls from the
        "Saved JUnLoadForm" String...

        NOTE:
        The "Saved JUnLoadForm" was created by the '*this*.toString' method and uses
        the 'JFormTKDB.fieldsDelimiter'...

        Kernel Usage:
        1)      'JHDD_IO.readJAddressBook' Method when the 'jFormTK' Address Book instance
                is initialized from the Storage Device [e.g. HDD]...
        

Parameters:
savedJUnLoadForm - Saved 'JUnLoadForm' parameters from 'toString'...

XXXreplaceLastToBeFocusedFlowControl

public static void XXXreplaceLastToBeFocusedFlowControl(java.lang.String s)

setUnloadedFormIndex

public static void setUnloadedFormIndex(java.lang.String s)
        Set the Unloaded Form Index String  [s]...
        NOTE:
        The given value shall be a list of Unload Form Index values using the 
        'JFormTKDB' Items Delimiter...
        

Parameters:
s - String to set 'formIndex' to...

setUnLoadCode

public static void setUnLoadCode(java.lang.String s)
        Set the UnLoad Type control String [s]...
        

Parameters:
s - UnLoad Type Control [see JavaDoc]...

showJUnLoadForm

public static void showJUnLoadForm(java.lang.String from)
        Produce a Message Dialog that details the current contents of the
        'JUnLoadForm' Class Parameters...

        Kernel Usage
        1)      As required for 'jFormTK' Kernel Debug...
        


displayJUnLoadForm

public static java.lang.String displayJUnLoadForm(java.lang.String from)

toString

public java.lang.String toString()
        Return a Java String with the Class fields delimited with the 'jFormTKDB'
        Fields Delimiter. This String is used to set the 'savedJUnLoadForm' parameter in
        the 'JHDD_IO.WriteJAddressBook' method. It is then used to 'reLoad' the
        '*this*JUnLoadForm' instance by the 'JHDD_IO.readJAddressBook' method...

        Kernel Usage:
        1)      'JHDD_IO.writeJAddressBook' Method to save the '*this*JUnLoadForm' instance
                with the 'JAddressBook' File... 
        

Overrides:
toString in class java.lang.Object