com.jFormTK
Class JFocus

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

public abstract class JFocus
extends java.lang.Object
implements JConstants

        This 'jFormTK' Class is an Abstract Class designed to contain the methods required
        to service the 'jFormTK' Focus System...

        This class SHALL host one occurrence of the 'FocusState' Inner Class which in turn
        host the following Focus Parameters for the currently loaded [in the Show Panel]
        'JFormForm' Sub-Class:

                JFormForm       form
                String          formID
                Vector          XXXjFormFields
                JFormField      currentJFormField
                int                     currentJFormFieldIndex
                JFormField      firstJFormField
                int                     firstJFormFieldIndex
                JFormField      lastJFormField
                int                     lastJFormFieldIndex
                int                     formFieldsSize

        The 'FocusState' controls are used by the 'JFormField' Focus Events to determine
        the first, previous, next and last 'JFormField' elements in the current 'jFormTK'
        Show Panel 'JFormForm' SubClass Form... 
        

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

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

Nested Class Summary
static class JFocus.FocusState
           FocusState is designed to control the 'jFormTK' Focus Traversal operations as a function of the current 'JFormForm' SubCass JFormField's [formFields] Vector...
 
Field Summary
static int globalCounter
           
 
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
JFocus()
           
 
Method Summary
static void addFocus(java.lang.String phase, java.lang.String annotation)
           This method signature is used to enter Application and Form records into the 'jFormTK' Kernel Focus Trace Vector...
static void clearBranchVerify()
           Clear the 'branchVerify' Controls...
static java.lang.String displayFocusChangeEventControls(java.lang.String title)
           
static JFormControl doJFormControl(JFormForm formIn, JFormField fldIn, java.lang.String flowControlIn, java.lang.String from)
           This method is designed to compute the 'JFormControl' Class as a function of the given 'flowControl' Parameter...
static JFormControl doPostProcess(JFormForm form, JFormField pFld, java.lang.String flowControlIn, java.lang.String from)
           This method is designed to service the 'post Process' request for this 'JFormField' [pFld] which is about to loose the Show Panel focus as follows: 1) Update revert Items List of [pFld]...
static JFormControl doPreProcess(JFormForm currentForm, JFormField currentFld, java.lang.String from)
           This method is designed to service the 'pre Process' request for this 'JFormField' [currentFld] as follows: 1) If there is a value in the associated 'jWorkSheet' [ws] instance, Then set the value to the given 'ws' Value and clear the saved 'ws' value so this is a one time process only...
static void doToBeFocused(JFormForm form, JFormField currentJFormField, JFormField toBeFocusedJFormField, int code, boolean debug, java.lang.String from)
           This method is used when the standard Form field flow is changed and the 'jFormTK' Focus Traversal Policy is interrupted.
static void focusJFormField(JFormForm form, JFormField fld)
           Perform the focus event for the given 'JFormField' of the given 'JFormForm' Sub-Class...
static boolean getAtypicalForcedFlow()
           Return the current 'Atypical.forcedFlow' Control...
static java.lang.String getAtypicalWhy()
           Return the current 'Atypical.Why' Control...
static java.lang.String getBranchVerify()
           Return the 'branchVerify' Control...
static int getContiguous()
           
static boolean getFlowControlFocusControl()
           Return the Flow Control Focus Event Control [flowControlFocusControl]...
static int getFocusChangeEventCode()
           Return the Focus Event Core [focusChangeEventCode]...
static JFocus.FocusState getFocusState()
           Return the current Focus State Reference...
static java.util.Vector getFocusTraceRecords()
           Return the 'focusTrace' Vector...
static java.lang.String getFromBranchID()
           
static boolean getJButtonENTER()
           Return the current 'jButtonENTER' flag...
static java.lang.String[] getKeyboardFocusManagerParameters()
           
static java.lang.String[] getKeyboardFocusManagerParameters(java.lang.String from)
           
static boolean getMessageActive()
           Return the Message Active 'messageActive' Flag...
static int getTabActive(java.lang.String from)
           Return the current 'tabActive' control.
static java.lang.String getToBranchID()
           
static void goToLastForm(java.lang.String from)
           Re-load the last un-loaded 'JFormForm' Sub-Class as directed by the 'AppDB.JUnLoadForm' instance...
static void setBranchVerify(java.lang.String s)
           Set the 'branchVerify' Control...
static void setBranchVerify(java.lang.String s, java.lang.String fromID, java.lang.String toID)
           Set the 'branchVerify' Controls...
static int setContiguous(JFormField currentFld, JFormField nextFld)
           Kernel Usage: 1) 'JFormField.doMouseClicked' to determine if the 'jFormTK' Application End User has selected a field other than the currenly focused 'JFormField'...
static void setFlowControlFocusControl(boolean flag, java.lang.String from)
           Set the 'flowControlFocusControl' Flag...
static void setFocusChangeEventCode(int code, java.lang.String from)
           Set the 'focusChangeEventCode' that is used to control the Pre / Post / flowControl Processing.
static void setFocusChangeEventControls(JFormField fld)
           Set the *this* [JFocus] Post Process, Pre Process and Flow Control booleans as a function of the current 'focusChangeEventCode' and the given 'JFormField' instance...
static void setFocusState(JFormForm form, JFormField currentJFormField, int currentJFormFieldIndex, java.lang.String from)
           This method is designed to set the current 'JFocus.FocusState' parameters so that the required Focus Traversable Fields are assigned...
static void setJButtonENTER(boolean flag)
           Set the 'jButtonRMTER' Flag to signal that a _BField 'JFormField' instance has requested the 'doButton' processing by pressing the Enter Key...
static void setJFormFieldLAF(JFormForm form, JFormField fld, java.lang.String from)
           Set the LAF of each JFormField of the given 'JFormForm' Sub-Class...
static void setMessageActive(boolean flag)
           Set the 'messageActive' Control Flag...
static void setMouseActive(boolean flag)
           
static void setSelectionLAF(JFormForm form, JFormField fld, java.lang.String from)
           Set the selection Look and Feel parameters as a function of the given 'JFormField' 'type' parameter...
static void setTabActive(int activeTAB, java.lang.String from)
           This method is designed to control the 'tabActive' parameter that is designed to signal the 'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' processing that the 'JFormForm' Focus was lost because a TAB from the 'jFormTK' Framework TAB Panel has been selected...
static void setUnselectedLAF(JFormForm form, JFormField fld)
           Set each 'JFormField' to the Unselected Look and Feel...
static void showFocusState(boolean oneLine, java.lang.String from)
           
static void XXXdoBranch(JFormForm form, JFormField fld)
           
static JFormField XXXgetBranchVerifyFrom()
           
static boolean XXXgetByPassFocusGained()
           Return the Focus Gained BY Pass flag [byPassFocusGained]...
static boolean XXXgetByPassFocusLost()
           Return the Focus Lost BY Pass flag [byPassFocusLost]...
static JFormField XXXgetCurrentJFormField()
           Return a "Reference" to the current 'JFormField' of the current 'JFormForm' SubClass...
static JFormField XXXgetCurrentJFormField(JFormForm form)
           Return a "Reference" to the current 'JFormField' of the current 'JFormForm' SubClass...
static java.lang.String XXXgetPhrase(java.lang.String s, java.lang.String open, java.lang.String close, int occurrence)
           
static void XXXsetByPassFocusGained(boolean flag)
           
static void XXXsetByPassFocusLost(boolean flag)
           Set the 'byPassFocusLost' Control Flag...
static void XXXshowFocusChangeEventControls(java.lang.String title, char type)
           Display the current 'JFocus' Focus Event Change Controls in a Dialog Window and / or to the Java Consul as a function of the 'type' parameter...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

globalCounter

public static int globalCounter
Constructor Detail

JFocus

public JFocus()
Method Detail

addFocus

public static void addFocus(java.lang.String phase,
                            java.lang.String annotation)
        This method signature is used to enter Application and Form records into the
        'jFormTK' Kernel Focus Trace Vector...

        Kernel Usage:
        1)      [LA]    'BasejFormTK.focusGained' to annotate the Application Load Processing...
        2)      [LA]    'BasejFormTK.focusLost' to indicate the commencement of the Form
                                load processing...
        3)      [LF]    'BasejFormTK.JFormPanel.focusGained' to record an Applicaion Load
                                processing...
        4)      [LF]    'BasejFormTK.JFormPanel.focusLost' to record an Application Exit
                                Processing... 
        5)      [LF]    'JFormFrame.JShowPanel.focusGAINED' to record the loading of a
                                'JFormForm' SubClass Form into the 'jFormTK' Show Panel...

        Kernel Usage:
        1)      'BasejFormTK.focusLost' "LA", "Commence Application Initialization..."
        2)      'BasejFormTK.focusGained' "LA", "Entered The Application..."
        3)      'BasejFormTK.JFormsPanel.focusGained'
                        "LF",   "Loading the "+formID+" Form..."
        4)      'BasejFormTK.JFormsPanel.focusLost'
                        "LF",   "Exit the "+formID+" Form..."
        5)      'JFormFrame.setCurrentForm'
                        "LF", "Load the " + formID+ " Form..."
        

Parameters:
phase - Phase Control Code [see [xx] above...
annotation - String annotation to be placed in the Focus Trace Record...

clearBranchVerify

public static void clearBranchVerify()
        Clear the 'branchVerify' Controls...

        Kernel Usage:
        1)
        


displayFocusChangeEventControls

public static java.lang.String displayFocusChangeEventControls(java.lang.String title)

XXXdoBranch

public static void XXXdoBranch(JFormForm form,
                               JFormField fld)

doJFormControl

public static JFormControl doJFormControl(JFormForm formIn,
                                          JFormField fldIn,
                                          java.lang.String flowControlIn,
                                          java.lang.String from)
        This method is designed to compute the 'JFormControl' Class as a function of the
        given 'flowControl' Parameter...

        This method is also used to control the processing of the 'jFormTK' Buttons as
        folllows:
        1)      Envoke the 'doButton' Method iff the type is _BField and the End User
                has pressed the ENTER Key...
        2)      Envoke the 'addGroup' Method iff the type is _AField and the End User
                has pressed the ENTER Key...Group Control
        3)      Envoke the 'removeGroup' Method iff the type is _DField and the End User
                has pressed the ENTER Key...Group Control

        The 'jFormTK' Application Developer may control the next 'JFormField' to
        receive the focus by setting the return 'flowControl' flag as follows:
        'flowControl'   |       Description...
        ________________|______________________________________________________________
        .This                   |       Focus on the current 'JFormField'...
        .Next                   |       Focus on the NEXT "Active" 'JFormField' in the Focus Cycle...
                                        |       NOTE 1: This is the DEFAULT value...
                                        |       NOTE 2: The "Focus Cycle" is the order the JFormField's are
                                        |                       inserted into the 'JFormForm' SubClass form...
                                        |       NOTE 3: "Active" 'JFormField' means any 'JFormField' that can
                                        |                       receive input data from the Application End User...
                                        |       NOTE 4: If this is the Last 'JFormField'
                                        |                       Then the Focus is set at the First "Active" 
                                        |                               'JFormField' of the current Forms 'showPanel'...
        .Previous               |       Focus on the Previous 'JFormField' in the Focus Cycle.
                                        |       NOTE 1: If this is the First 'JFormField'
                                        |                       Then the Focus is set at the Last "Active" 
                                        |                               'JFormField' of the current Forms 'showPanel'...
        .First                  |       Focus on the First "Active" 'JFormField' of the 'showPanel'...
        .Last                   |       Focus on the Last  "Active" 'JFormField' of the 'showPanel'...
        .FirstInGroup   |       Focus on the First Element of the current Group...
        .LastInGroup    |       Focus on the Last Element of the current Group...
        .n                              |       Move Focus 'n' fields from the current Focused Field...
                                        |       NOTE:
                                        |       If the target 'JFormField' is not an "Active Field',
                                        |               i.e. it is not focusable
                                        |       Then
                                        |               The focus is given to the next focusable 'JFormField'
                                        |               instance...
        fieldID                 |       A 'jFormTK.JFormField' ID of the current 'JFormForm' SubClass
                                        |       NOTE 1: 'fieldID uses 'Dot' notation to indicate 
                                        |                       GroupName.FieldName.SetNumber as required to uniquely
                                        |                       identify the 'JFormField' to receive the Focus...
        formID.fieldID  |       A jFormTK.JFormForm Sub-Class ID and a 'jFormField' ID hosted
                                        |   by the given jFormTK.JFormForm Sub-Class.
                                        |       NOTE 1: 'formID' uses dot notaton to indicate the
                                        |                       Category.SubCtegory.FormName as required to identify
                                        |                       the 'jFormTK.JFormForm' SubClass Form...
                                        |       NOTE 2: 'fieldID uses 'Dot' notation to indicate 
                                        |                       GroupName.FieldName.SetNumber as required to uniquely
                                        |                       identify the 'JFormField' to receive the Focus...
                                        |       NOTE 3: The 'formID' may be the same as the current Form...
                                        |       NOTE 4: If only the 'formID' is provided,
                                        |                       Then the Focus shall be set on the last field focused
                                        |                       when the indicated Form was last saved OR the first
                                        |                       "Active" JFormField' if the Form has never been 
                                        |                       loaded...
        formID.First    |       Load the specified Form and focus on the First "Active"
                                        |               JFormField...
        formID.Last             |       Load the specified Form and focus on the Last  "Active"
                                        |               JFormField...
        .Tabn                   |       Activate Tab 'n', Go To numbered TAB, leave Form Focus As Is...
        .TabName        |       Activate Tab 'name', Go To specified TAB, 
                                        |               leave Form Focus As Is...gggg
 .Quit                          |       Terminate the 'jFormTK' Application...
 .Exit                          |       Exit the 'jFormTK' Application...
 .ExitMessage           |       Exit the 'jFormTK' Application with the appended message in
                                        |       the Exit Dialog...
 .Abort                 |       Produce a 'jFormTK' Soft Abort, i.e. termination with the
                                        |       debug files...
 .AbortMessage          |       Produce a 'jFormTK' Soft Abort that includes the given Text
                                        |       Message, i.e. termination with the debug files and add the
                                        |       Message to the Soft Abort Dialog Window...
 
        Kernel Usage:
        2)      'this.doPreProcess' Method to construct the return 'JFormControl' instanse
                for the current 'JFormField' instance and the Flow Control constructed by
                the PreProcessor...
        3)      'this.NonNullDialog.doContinue' Method to continue the 'jFormTK' Processing...
        4)      'JFormField.KeyListener.keyPressed' when an ENTER or TAB key is detected for
                a 'JFormField' with a Button type [i.e. _BField, _AField, _DField]...
        5)      'JFormField.MouseListener.mouseClicked' Method...
        6)      'TableEditDialog.doGoToForm' Method...
        x)      'JFormField.focusGained' Event method after any 'PRE' Processing has been 
                serviced and the Pre Processor 'flowControl' is NOT ".This".
        x)      'JFormField.FocusListener.focusLost' Event Method after the 'POST' Processing
                has been serviced. Envoked iff the "Lost Focus Name" and the "Next Focus Name"
                are     equal. This test verifies that the Focus was NOT lost via a mouse
                click operation by the 'jFormTK' Application End User...
        

Parameters:
formIn - a "Reference" to the current 'JFormForm' Sub-Class instance...
fldIn - a "Reference" to the current 'JFormField' instance...
flowControlIn - The Flow Control as described above...
from - DEBUG annotation of calling Class.Method...

doPreProcess

public static JFormControl doPreProcess(JFormForm currentForm,
                                        JFormField currentFld,
                                        java.lang.String from)
        This method is designed to service the 'pre Process' request for this 'JFormField'
        [currentFld] as follows:
        1)      If there is a value in the associated 'jWorkSheet' [ws] instance, 
                Then set the value to the given 'ws' Value and clear the saved 'ws' value so
                this is a one time process only...
        NOTE:
                Option 1) above is currently commented out. The 'ws' processing is done in the
                'JHDD_IO.showPage' Method so that the 'ws' saved value is seen by the
                Application End User when the Form [page] is displayed...
        2)      Service the 'JFormField.reference' control parameter iff the current Value is
                not set, i.e. != to null [""]...
        3)      Process 'Choice' Set From 'JAddressBook' Request...
        4)      Do any Pre Processor Assignment Request...
        5)      Do any Pre Processor IF Request...
        6)      Invoke the Pre Processor 'JFormForm' Sub-Class Method...
 
        Kernel Usage:
        1)      Evoked by the 'AppForms.loadJFormForm' Method iff the loaded 'JFormForm'
                Sub-Class is built for the first time from the Sub-Class 'init' method.
                NOTE: This method is not called when a 'JFormForm' Sub-Class is re-loaded
                                because it is assumed that the pre Processing was performed prior
                                to the unloading of the 'JFormForm' Sub-Class...
        2)      'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' to pre Process the
                "After" 'JFormField' instance that is about to receive the Show Panel Focus...
                Invoked iff the 'currentFld.preProcessFlag' is active...
        3)      'BasejFormTK.JFocusTraversalPolicy.getComponentBefore' to pre Process the
                "Before" 'JFormField' instance that is about to receive the Show Panel Focus...
                Invoked iff the 'currentFld.preProcessFlag' is active...
        4)      'JFormField.MouseListener.doMouseClicked' when the End User Selects a new
                'JFormForm' Sub-Class 'JFormField' field...
        

Parameters:
currentForm - "Reference" to the current 'JFormForm' sub-class...
currentFld - "Reference" to the current 'JFormField' that is about to receive focus...
from - DEBUG annotation for the calling 'jFormTK' Class.Method...

doToBeFocused

public static void doToBeFocused(JFormForm form,
                                 JFormField currentJFormField,
                                 JFormField toBeFocusedJFormField,
                                 int code,
                                 boolean debug,
                                 java.lang.String from)
        This method is used when the standard Form field flow is changed and the
        'jFormTK' Focus Traversal Policy is interrupted. This condition occurs when
                1)      the 'jFormTK' end user uses the mouse to select a form field...
                2)      when the ENTER or TAB key is used to move to the next form field
                        while a _BField has the focus. Note that the _BField type employes
                        a key listener to service the 'doButton' processing if the ENTER
                        Key is pressed while the _BField is in focus. Thus the interruption of
                        the standard Focus Traversal Policy...
                3)      following a _QField operation to force the first field following the
                        _QField to be preProcessed. Note that the _QField contains the
                        YES and NO Radio Buttons that use a ???? when there is no _QField Controls
                        inserted into the Show Panel. This case ensures that a Pre Processor
                        shall be entered if the 'JFormField.preProcess' flag is set...
                3)      following a 'JCouple' processing to force the first field following the
                        _IField "hook" to be preProcessed.

        NOTE [2/7/2009] :
        The _BField case is required here?
        I think there is a better way to reenter the Focus Traversal Process but
        I am unable [at this time] to figure out how. This process works fine but,
        perhaps is not the ideal method to be employed?

        The following steps are performed:
        1)      Do the Post Process operation in the currently focused 'JFormField'...
        2)      If the Post Processor has changed the Flow Control,
                Then
                        Query the End User to determine which 'JFormField' shall be focused.
        3)      Pre Process the "To-Be-Focused" 'JFormField'...
        4)      If the Pre Processor has changed the Flow Control
                Then
                        Query the End User to determine which 'JFormField' shall be focused...
        5)      Focus the indicated 'JFormField'...

        Kernel Usage:
        1)      'JFormField.doMouseClicked' when a 'JFormField' other than the currently
                focused 'JFormField' is selected with the mouse...
        2)      'JFormField._BFieldKeyListener.keyPressed' when the ENTER Key OR a TAB key
                is pressed while a _BField has the focus...
        3)      'JFormField.init _PField Anonymous Inner Class' after the _PField parameters
                have been entered, verified and added to the 'JAddressBook' TreeMap...

Parameters:
form - Ths host 'JFormForm' SubClass...
currentJFormField - The 'JFormField' that currently has the focus...
toBeFocusedJFormField - The new 'JFormField' to be focused iff not adjusted by a run-time pre / post processor...
code - The Focus Change code as follows: code | ________|_______________________________________ =0 | Forward: TAB Key OR ENTER Key =1 | Backward: SHIFT TAB Key =2 | Mouse Selection =3 | Quit Button from Show Panel =4 | TAB Selection from jFormTK Framework
debug - DEBUG flag [boolean]...

focusJFormField

public static void focusJFormField(JFormForm form,
                                   JFormField fld)
        Perform the focus event for the given 'JFormField' of the given 'JFormForm'
        Sub-Class...

        Kernel Usage:
JFormField.KeyListener.keyPressed
        1)      'JFocus.doFocus' when the 'didFlowControl' is true and the working
                'JFormField [fld] is NOT 'null AND the 'flowControl' processing DID NOT
                request a new 'JFormForm' Sub-Class focus...
        2)      'JFocus.doFocus' when the 'flowControl' has requested a new
                'JFormForm' Sub-Class Form to be loaded...
X        *      3)      'JFormField.KeyListener.keyPressed' when an ENTER or TAB Key is pressed while
                a 'JFormField' _BField type has the focus. This functionality is used to
                cause the associated 'JFormField'doButton' event processing...
X        *      4)      'JFormField.MouseListener.mouseClicked' method when the mouse has selected a
                Non-Contigous 'JFormField'...
        5)      'JTextAreaDialog.ActionListener.actionPerformed' to Branch to the 'Next'
                'Active' 'JFormField' when the 'bNext' Button is selected...
        6)      'JTextAreaDialog.ActionListener.actionPerformed' to Branch to the 'Previous'
                'Active' 'JFormField' when the 'bPrevious' Button is selected...
        7)      'JFormField.JTKRadioButton.JTKRadioButtonKeyListener.keyPressed' when a Radio
                Button is 
        

Parameters:
form - The 'JFormForm' Sub-Class instance to get the Focus...
fld - The 'JFormField' instance to receive the focus...

getAtypicalForcedFlow

public static boolean getAtypicalForcedFlow()
        Return the current 'Atypical.forcedFlow' Control...

        Kernel Usage:
        1)      'JFormControl.doFocus' method...
        

Returns:
current 'Atypical.forcedFlow' Control flag [booolean]...

getAtypicalWhy

public static java.lang.String getAtypicalWhy()
        Return the current 'Atypical.Why' Control...

        Kernel Usage:
        1)      'JFormControl.doFocus' method...
        

Returns:
current 'Atypical.Why' Control String...

getBranchVerify

public static java.lang.String getBranchVerify()
        Return the 'branchVerify' Control...

        Kernel Usage:
        1)
        

Returns:
'branchVerify' String...

XXXgetBranchVerifyFrom

public static JFormField XXXgetBranchVerifyFrom()

XXXgetByPassFocusGained

public static boolean XXXgetByPassFocusGained()
        Return the Focus Gained BY Pass flag [byPassFocusGained]...
        
Kernel Usage: 1) 'JFormField.focusGained' Method...

Returns:
By Pass Focus Gained Flag [boolean]...

XXXgetByPassFocusLost

public static boolean XXXgetByPassFocusLost()
        Return the Focus Lost BY Pass flag [byPassFocusLost]...
        
Kernel Usage: 1) 'JFormField.JFocusListener.focusLost' Method...

Returns:
By Pass Focus Lost Flag [boolean]...

getContiguous

public static int getContiguous()

XXXgetCurrentJFormField

public static JFormField XXXgetCurrentJFormField()
        Return a "Reference" to the current 'JFormField' of the current 'JFormForm' 
        SubClass...
 
        Kernel Usage:
        1)      NOT Currently Used by the 'jFormTK' Kernel...
        

Returns:
Reference to the current 'JFormField' of the current 'JFormForm' SubClass...

XXXgetCurrentJFormField

public static JFormField XXXgetCurrentJFormField(JFormForm form)
        Return a "Reference" to the current 'JFormField' of the current 'JFormForm' 
        SubClass...

Parameters:
form - 'JFormForm' SubClass to contain the current 'JFormField' Reference... Kernel Usage: 1) NOT Currently Used by the 'jFormTK' Kernel...
Returns:
Reference to the current 'JFormField' of the current 'JFormForm' SubClass...

getFlowControlFocusControl

public static boolean getFlowControlFocusControl()
        Return the Flow Control Focus Event Control [flowControlFocusControl]...

        Kernel Usage:
        1)      'this.doPreProcess' Method when checking for flow Control change to another
                'JFormField' that also has a Pre processor Active Request...
                If the 'flowControlFocusControl' is false,
                Then the inner PreProcessor operation is voided...
        2)      'JFormControl.doFocus' Method to determine if the host 'JFormControl'
                occurence can change the focus point via the 'flowControl' parameter...
        

Returns:
Flow Control Focus Event Control flag [boolean]...

getFocusChangeEventCode

public static int getFocusChangeEventCode()
        Return the Focus Event Core [focusChangeEventCode]...

        Kernel Usage:
        1)      'this.setFocusEventControls' Method to indicate which Focus Event Controls
                to be envoked when setting the System Level Control...
        2)      'JFormField.focusGained' to set the Focus Change Event Code in the Prompt
                annotation iff the JFormTKDB.focusChangeEventCodeFlag is ON...
        

Returns:
Focus Event Core [int]...

getFocusState

public static JFocus.FocusState getFocusState()
        Return the current Focus State Reference...

        Kernel Usage:
        1)      'BasejFormTK.JFocusTraversapPolicy.getDefaultComponent' Method to get the
                Next 'JFormField' instance reference...
        2)      'BasejFormTK.JFocusTraversapPolicy.getComponentBefore' Method
                to set the  'currentJFormField' parameter...
        3)      'BasejFormTK.JFocusTraversapPolicy.getFirstComponent' Method to get the
                currnet 'JFormForm' Sub-Class first 'JFormField' instance reference...
        4)      'BasejFormTK.JFocusTraversapPolicy.getLastComponent' Method to get the
                currnet 'JFormForm' Sub-Class last 'JFormField' instance reference...
        5)      'BasejFormTK.Menu.actionPerformed.showFocusStateTrace' Method to get the
                'FocusTrace' String     for display to service a DEBUG Menu request...
        6)      'JFormControl.doFocus' Method to set the current 'JFormField' parameter...
        7)      'JFormForm.setIndexBeforeHere' Method...
        8)      'JFormForm.setIndexFromStart' Method...
        9)      'JFormForm.setIndexFromEnd' Method...
 10)    'JFormForm.setIndexFromHere' Method...
        

Returns:
Hosted 'FocusState' instance...

getFocusTraceRecords

public static java.util.Vector getFocusTraceRecords()
        Return the 'focusTrace' Vector...
        
Kernel Usage: 1) 'JFocusTraceTable.Constructor' to get and show the contents of the Focus Trace Vector...

Returns:
Vector of Focus Trace Parameters.

getFromBranchID

public static java.lang.String getFromBranchID()

getKeyboardFocusManagerParameters

public static java.lang.String[] getKeyboardFocusManagerParameters()

getJButtonENTER

public static boolean getJButtonENTER()
        Return the current 'jButtonENTER' flag...

        Kernel Usage:
        1)      'JTest.showPostProcessor' when processing a _BField, _AField OR _DField
                'JFormField' type...
        

Returns:
The current 'jButtonENTER' boolean...

getKeyboardFocusManagerParameters

public static java.lang.String[] getKeyboardFocusManagerParameters(java.lang.String from)

getMessageActive

public static boolean getMessageActive()
        Return the Message Active 'messageActive' Flag...
        
Kernel Usage: 1) 'JFormField.JFocusListener.focusLost' Method... 2) 'JFormField.focusGained' method...

Returns:
Message Active Flag [boolean]...

XXXgetPhrase

public static java.lang.String XXXgetPhrase(java.lang.String s,
                                            java.lang.String open,
                                            java.lang.String close,
                                            int occurrence)

getTabActive

public static int getTabActive(java.lang.String from)
        Return the current 'tabActive' control.
 
        NOTE:
        The 'tabActive' control is used to signal the 'JFormField.FocusListener.focusLost'
        Event that the current 'JFormField' Lost the Focus due to the 'jFormTK'
        Application End User's usage of a 'jFormTK' Framework TAB Panel...
 
        It is an Index [int] so that it can be used to annotate the TAB selection in the
        Focus Trace Feature...
 
        Kernel Usage:
        1)      'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' to determine if
                the current TAB is the "Forms" TAB.
        2)      'BasejFormTK.JFocusTraversapPolicy.getComponentBefore'
        

Returns:
The current Tab Active 'int'...

goToLastForm

public static void goToLastForm(java.lang.String from)
        Re-load the last un-loaded 'JFormForm' Sub-Class as directed by the
        'AppDB.JUnLoadForm' instance...

        Kernel Usage:
        1)      'AddressBook.doReturnToForm' Method after a 'Return To Form' Button selection...
        2)      'BasejFormTK.QuickEditDialog.doReturnToForm' Method...
        3)      'JReportSelectionDialog.actionPerformed' Method when the 'bReturnToForm' Button
                is selected by the 'jFormTK' Application End User...
        4)      'TableEditDialog.actionPerformed' Method after a 'Return To Form' Button selection...
        


getToBranchID

public static java.lang.String getToBranchID()

doPostProcess

public static JFormControl doPostProcess(JFormForm form,
                                         JFormField pFld,
                                         java.lang.String flowControlIn,
                                         java.lang.String from)
        This method is designed to service the 'post Process' request for this 
        'JFormField' [pFld] which is about to loose the Show Panel focus as follows:

        1)      Update revert Items List of [pFld]...
        2)      Process 'JFormField' Non-Null Value feature...
        3)      Logic to service the 'nonNullPrefix for a non-Null 'pFd.reference' control...
        4)      If pFld is _CField Type, ensure pop-up is closed...
        5)      Do add to AB feature...
        6)      Do update AB feature...
        7)      Do assignment Post Processing Operation...
        8)      Do Post Processing IF OP...
                [adjust'flowControl' for "Conditional Branch" capability]
        9)      If requested invoke Post Process 'JFormForm' Sub Class Method...
                [adjust'flowControl' if required]
  10)   Do Built-In-Test op...
 
        Kernel Usage:
        1)      'JFormField.doMouseClicked' method to execute the 'postProcessor' on the
                'JFormField' that had the focus when the Mouse Selected *this* JFormField'
                iff the Form Change Event Processing rules are met...
        2)      'JFormField.JTKRadioButtonKey.doPostProcess' if the ENTER Key is
                present OR the Post Process NOW flag is active...
        3)      'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' to post process the
                'JFormField' that is about to loose the focus to the "after' field...
        4)      'BasejFormTK.JFocusTraversalPolicy.getComponentBefore' to post process the
                'JFormField' that had the focus when a "Before' field is requeted by
                the 'jFormTK' application end user...
        5)      'BasejFormTK.doTabSelectPostProcess' to post process the currently focused
                'JFormField' when the 'jFormTK' application end user selects a TAB other than
                the "Forms" TAB from the 'jFormTK' Framework...
        

Parameters:
form - Current 'JFormForm' subclass...
pFld - Previous 'JFormField' instance to be "Post Processed"...
flowControlIn - Given 'flowControl' String...
from - DEBUG String...
Returns:
Boolen flag currently not in use...

setBranchVerify

public static void setBranchVerify(java.lang.String s)
        Set the 'branchVerify' Control...

        Kernel Usage:
        1)
        

Parameters:
s - 'branchVerify' String...

setBranchVerify

public static void setBranchVerify(java.lang.String s,
                                   java.lang.String fromID,
                                   java.lang.String toID)
        Set the 'branchVerify' Controls...

        Kernel Usage:
        1)      'Util.verifyBranch' Method after constructing the message 'synopsis'...
        

Parameters:
s - 'branchVerify' String...
fromID - From 'JFormField' ID String...
toID - To 'JFormField' ID String...

XXXsetByPassFocusGained

public static void XXXsetByPassFocusGained(boolean flag)

XXXsetByPassFocusLost

public static void XXXsetByPassFocusLost(boolean flag)
        Set the 'byPassFocusLost' Control Flag...
 
        Kernel Usage:
        1)      'JFormFrame.setCurrentForm' to set the By Pass Focus Lost Flag so that the
                initial Focus of the 'JFormForm' SubClass is not preprocessed before the End
                User enters a data value...
        

Parameters:
flag - A boolean flag to set the 'byPassFocusLost' Flag...

setContiguous

public static int setContiguous(JFormField currentFld,
                                JFormField nextFld)

        Kernel Usage:
        1)      'JFormField.doMouseClicked' to determine if the 'jFormTK' Application
                End User has selected a field other than the currenly focused 'JFormField'...
        2)      'this.doToBeFocused' method to assist in calculating the 'flowControl' for
                the currently focuse 'JFormField' and the toBeFocuse 'JFormField'...
        

Parameters:
currentFld -
nextFld -

setFlowControlFocusControl

public static void setFlowControlFocusControl(boolean flag,
                                              java.lang.String from)
        Set the 'flowControlFocusControl' Flag...

        Kernel Usage:
        1)      'JFormField.MouseListener.mouseClicked' method to clear the Flow Control
                Focus Control Flag so that no 'flowControl' processing is allowed when the
                'jFormTK' End Uses uses the mouse to select a 'JFormField'...
        2)      ''
        

Parameters:
flag - A 'boolean' primitive to set the 'flowControlFocusControl' to...

setFocusChangeEventCode

public static void setFocusChangeEventCode(int code,
                                           java.lang.String from)
        Set the 'focusChangeEventCode' that is used to control the Pre / Post / flowControl
        Processing.

        The acceptable Focus Event Codes are as follows:
                Code    |       Event Description
        ____________|______________________________________________
                0               |       Forward:        TAB Key OR ENTER Key
                1               |       Backward:       SHIFT TAB Key
                2               |       Mouse Selection
                3               |       Quit Button from Show Panel
                4               |       TAB Selection from jFormTK Framework
        ____________|______________________________________________

        Kernel Usage:
        1)      'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' Method, code = 0...
        2)      'BasejFormTK.JFocusTraversapPolicy.getComponentBefore' Method, Code = 1...
        3)      'JFormField.MouseListener.mouseClicked' Method, Code = 2...
        4)      'JFormFrame.doQuit' Method, Code = 3...
        5)      'BasejFormTK.TabbedPaneListener.stateChanged' Method, code = 4...
        

Parameters:
code - The new Focus Event Code [int]...

setFocusChangeEventControls

public static void setFocusChangeEventControls(JFormField fld)
        Set the *this* [JFocus] Post Process, Pre Process and Flow Control
        booleans as a function of the current 'focusChangeEventCode' and the given 
        'JFormField' instance...

        NOTE:
        These "Control" flags are used in the '*this*.PreProcess' and '*this*.postProcess'
        Methods when deciding if a Pre / Post Processing shall be envoked...

        Kernel Usage:
        1)      'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' to set the Focus Event
                Controls for the current 'JFormField' instance...
        2)      'BasejFormTK.JFocusTraversalPolicy.getComponentBefore' to set the Focus Event
                Controls for the current 'JFormField' instance...
        3)      'JFormField.MouseListener.mouseClicked'  to set the Focus Event
                Controls for the current 'JFormField' instance...
        

Parameters:
fld - The 'JFormField' instance to inspect for the associated pre / post processing and 'flowControl' processing Controls...

setFocusState

public static void setFocusState(JFormForm form,
                                 JFormField currentJFormField,
                                 int currentJFormFieldIndex,
                                 java.lang.String from)
        This method is designed to set the current 'JFocus.FocusState' parameters so that
        the required Focus Traversable Fields are assigned...
 
        Kernel Usage:
        1)      'JFormFrame.loadFormFieldsVector' Method to set the 'JFocus.FocusState'
                parameters after a new 'JFormForm' Sub-Class is loaded...
        2)      'BaseJFormTK.doFormsPanelTAB' Method when re-loading a 'JFormForm' Sub-Class...
        

Parameters:
form - Current 'JFormField' Sub-Class [JFormForm]...
currentJFormField - 'JFormField' Reference to the currently focused Field...
currentJFormFieldIndex - Index [int] into the 'formFields' Vector for the currently focused 'JFormField'...
from - DEBUG String with calling method annotation...

setJButtonENTER

public static void setJButtonENTER(boolean flag)
        Set the 'jButtonRMTER' Flag to signal that a _BField 'JFormField' instance
        has requested the 'doButton' processing by pressing the Enter Key...

        Kernel Usage:
        1)      'JFormField' Key Listener iff the 'type' is _BField' and the ENTER key
                is detected...
        

Parameters:
flag - boolean flag to set 'jButtonENTER' control to...

setMessageActive

public static void setMessageActive(boolean flag)
        Set the 'messageActive' Control Flag...
 
        Kernel Usage:
        1)      'JFormField.focusGained' after both the 'Focus Lost' AND
                the 'Focus Gained' events caused by the 'JMessage.MessageDialog'
                processing has been ignored...
        2)      'JFormFrame.message' method when a run-time message has been requested...
        

Parameters:
flag - A boolean flag to set the 'messageActive' Flag...

setMouseActive

public static void setMouseActive(boolean flag)

setSelectionLAF

public static void setSelectionLAF(JFormForm form,
                                   JFormField fld,
                                   java.lang.String from)
        Set the selection Look and Feel parameters as a function of the
        given 'JFormField' 'type' parameter...
 
        Kernel Usage:
        1)      'JFocus.setJFormFieldLAF' method when a 'JFormField' of the Show Panel
                receives the Focus...
        

Parameters:
form - Current 'JFormForm' SubClass reference...
fld - Current 'JFormField' reference...

setTabActive

public static void setTabActive(int activeTAB,
                                java.lang.String from)
        This method is designed to control the 'tabActive' parameter that is designed
        to signal the 'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' processing
        that the 'JFormForm' Focus was lost because a TAB from the 'jFormTK' Framework
        TAB Panel has been selected...

        The next focus processing is performed iff the current TAB is the "Forms" TAB
        and the previous TAB was also used to hold the 'JFormForm' Sub-Class focus
        on the current 'JFormField' when returning to the Form. Also, the post processing
        of the current 'JFormField' is NOT performed when the TAB Active Flag is true
        unless the 'jFormTK' Application has changed the JFormTKDB.postTabSelectControl...
 
        Kernel Usage:
        1)      'BasejFormTK.doAddressBookPanelTAB'
        2)      'BasejFormTK.doApplicationTAB'
        3)      'BasejFormTK.doControlsPanelTAB'
        4)      'BasejFormTK.doFormsPanelTAB'
        5)      'BasejFormTK.doQuickEditPanelTAB'
        6)      'BasejFormTK.doTableEditPanelTAB'
        7)      'BasejFormTK.TabbedPaneListener.stateChanged' method if the previous Tab
                Index is the "Forms" Tab [==1]. This is done to signal the 
                'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' method that a TAB has
                been selected by the Application End User while processing a 'JFormForm'
                Sub-Class field...
        8)      'BasejFormTK.goToTAB'
        

Parameters:
activeTAB - Active TAB 'int' value...
from - DEBUG from annotation String...

setJFormFieldLAF

public static void setJFormFieldLAF(JFormForm form,
                                    JFormField fld,
                                    java.lang.String from)
        Set the LAF of each JFormField of the given 'JFormForm' Sub-Class...

        Kernel Usage:
        1)      'JFormField.focusGained' method...
        2)      'Util.setJFormTKDB' after a 'JFormTKDB' change has been made in Run-Time...
        

Parameters:
form - Current 'JFormForm' Sub-Class...
fld - Current Focus Field...
from - DEBUG from annotation String...

setUnselectedLAF

public static void setUnselectedLAF(JFormForm form,
                                    JFormField fld)
        Set each 'JFormField' to the Unselected Look and Feel...
 
        Kernel Usage:
        1)      'this.setJFormFieldLAF' method...
        


XXXshowFocusChangeEventControls

public static void XXXshowFocusChangeEventControls(java.lang.String title,
                                                   char type)
        Display the current 'JFocus' Focus Event Change Controls in a Dialog Window
        and / or to the Java Consul as a function of the 'type' parameter...

        Kernel Usage:
        1)      As required for DEBUG...
        

Parameters:
title - Title annotations String. Generally contains 'from' Class/Method and any addition data required to usiquely identify the usage point...
type - Code to specify the type of display: 'd' - Dialog Window [uses JFormFrame.message Method... 'p' - Print to Java Consul [uses sysout]... 'b' - Do Both 'd' and 'c'...

showFocusState

public static void showFocusState(boolean oneLine,
                                  java.lang.String from)