com.jFormTK
Class JFocus.FocusState

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

public static class JFocus.FocusState
extends java.lang.Object
implements JConstants

        FocusState is designed to control the 'jFormTK' Focus Traversal operations as a
        function of the current 'JFormForm' SubCass JFormField's [formFields] Vector...

        NOTE:
        There is only one FocusState instance per Application. The parameters are set each
        time a new 'JFormForm' Sub-Class is loaded into the     JFormFrame.showPanel'...
        


Field Summary
(package private) static boolean debug
           
(package private) static java.lang.String fill
           
(package private) static java.lang.String lastFormID
           
(package private) static java.lang.String lastTrace
           
(package private) static int lFrom
           
(package private) static int lID
           
(package private) static int lIndex
           
(package private) static java.lang.String line
           
 
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.FocusState()
           
 
Method Summary
static java.lang.StringBuffer displayFocusState(boolean oneLine, java.lang.String from)
           
static JFormField getCurrentJFormField(java.lang.String from)
           Return the current 'JFormField' Reference...
static JFormField getFirstJFormField()
           Get the first Active 'JFormField' of the current 'JFormForm' Sub-Class...
static JFormField getLastJFormField()
           Get the last Active 'JFormField' of the current 'JFormForm' Sub-Class...
static JFormField getNextJFormField()
           Return a Reference to the Next Active 'JFormField' in the current 'JFormFrame' Show Panel...
 JFormField getPreviousJFormField(java.lang.String from)
           Return a Reference to the Previous Active 'JFormField' in the current 'JFormFrame' Show Panel...
 java.lang.String getTrace()
           Return the current FocusState State Trace...
static void mouseFocus(JFormField selectedFld, JFormState state, java.lang.String from)
           
static void setCurrentJFormField(JFormField fld, int fldIndex, java.lang.String from)
           Set the 'FocusState.currentJFormField' and the 'FocusState.currentJFormFieldIndex' parameters...
static void setCurrentJFormField(JFormField fld, java.lang.String from)
           Set the 'FocusState.currentJFormField' to the given 'JFormField' [fld] and calculate and set the index [FocusState.currentJFormFieldIndex] into the 'FocusState.formField' Collection...
 boolean setIsSaved(JFormField fld)
           Clear the JFormForm Sub-Class 'JFormState.isSaved' control iff the saved text field for the given 'JFormField' has been changed.
 void showFocusState(boolean oneLine, java.lang.String from)
           DEBUG method to display Focus State Information in the Command Window...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lID

static int lID

lIndex

static int lIndex

lFrom

static int lFrom

fill

static java.lang.String fill

line

static java.lang.String line

lastFormID

static java.lang.String lastFormID

lastTrace

static java.lang.String lastTrace

debug

static boolean debug
Constructor Detail

JFocus.FocusState

JFocus.FocusState()
Method Detail

setIsSaved

public boolean setIsSaved(JFormField fld)
        Clear the JFormForm Sub-Class 'JFormState.isSaved' control iff
        the saved text field for the given 'JFormField' has been changed.

        This ensures that the 'JFormForm' Sub-Class SHALL be resaved when the
        Form is unloaded.

        Kernel Usage:
        1)      'this.doJFormControl' method iff the JFormForm Sub-Class flag is
                currently set to true.
        

Parameters:
fld - The current 'JFormField' instance.
Returns:
The 'textChanged' boolean value...

displayFocusState

public static java.lang.StringBuffer displayFocusState(boolean oneLine,
                                                       java.lang.String from)

showFocusState

public void showFocusState(boolean oneLine,
                           java.lang.String from)
        DEBUG method to display Focus State Information in the Command Window...

        Kernel Usage:
        1)      As required to DEBUG the 'jFormTK' Kernel Focus Functions...
        

Parameters:
oneLine - Boolean flag to control the format of the Focus Parameters Display...
from - String to identify the callint Method...

getCurrentJFormField

public static JFormField getCurrentJFormField(java.lang.String from)
        Return the current 'JFormField' Reference...

        Kernel Usage:
        1)      'JFocus.doFocus' for '.This' Flow Control...
        

Returns:
Current 'JFormField' Reference...

getFirstJFormField

public static JFormField getFirstJFormField()
        Get the first Active 'JFormField' of the current 'JFormForm' Sub-Class...
 
        Kernel Usage:
        1)      The 'this.FocusState.displayFocusState' method...
        2)      The 'JFocus.doFocus' method for ".First' Flow Control...
        3)      'BasejFormTK.JFocusTraversalPolicy.getFirstComponent' method...
        

Returns:
A "Reference" to the first "Active" JFormField' of the current 'JFormForm' Sub-Class...

getLastJFormField

public static JFormField getLastJFormField()
        Get the last Active 'JFormField' of the current 'JFormForm' Sub-Class...
 
        Kernel Usage:
        1)      This 'this.FocusState.displayFocusState' method...
        2)      'BasejFormTK.JFocusTraversapPolicy.getLastComponent' method...
        2)      The 'JFocus.doJFormControl' method for ".Last" Flow Control...
        

Returns:
A "Reference" to the last "Active" JFormField' of the current 'JFormForm' Sub-Class...

getNextJFormField

public static JFormField getNextJFormField()
        Return a Reference to the Next Active 'JFormField' in the current 'JFormFrame'
        Show Panel...

        Kernel Usage:
        1)      'JFocus.doJFormControl' Method for the ".Next" Flow Control...
        2)      'JFocus.doPostProcess' Method when NO Post Processing is required and the
                'flowControl' is ".Next"...
        3)      'BasejFormTK.JFocusTraversapPolicy.getDefaultComponent' method...
        

Returns:
Reference to the "Next" 'JFormField' to get the Show Panel focus...

getPreviousJFormField

public JFormField getPreviousJFormField(java.lang.String from)
        Return a Reference to the Previous Active 'JFormField' in the current
        'JFormFrame' Show Panel...

        Kernel Usage:
        1)      'JFocus.doJFormControl' Method for the ".Previous" Flow Control...
        2)      'JFocus.doPostProcess' method when NO Post Processing is required and
                the 'floeControl' = "previous"...
        3)      NOT CURRENTLY USED
                'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' Method...
        

Parameters:
from - DEBUG String...
Returns:
Reference to the Previous 'JFormField'...

mouseFocus

public static void mouseFocus(JFormField selectedFld,
                              JFormState state,
                              java.lang.String from)

setCurrentJFormField

public static void setCurrentJFormField(JFormField fld,
                                        java.lang.String from)
        Set the 'FocusState.currentJFormField' to the given 'JFormField' [fld] and
        calculate and set the index [FocusState.currentJFormFieldIndex] into the
        'FocusState.formField' Collection...

        Kernel Usage:
        1)      'JFocus.doFocus' Method...
        2)      'JFocus.doJFormControl' Method...
        3)      'JFocus.focusJFormField' Method...
        4)      'JFocus.doPostProcess' Method for Exit Flow Control Processing...
        5)      'BasejFormTK.JFocusTraversapPolicy.getComponentBefore' Method...
        6)      'JFormField.MouseListener.mouseClicked' Method...
        

Parameters:
fld - The given current 'JFormField' instance...
from - DEBUG from method trace annotation...

setCurrentJFormField

public static void setCurrentJFormField(JFormField fld,
                                        int fldIndex,
                                        java.lang.String from)
        Set the 'FocusState.currentJFormField' and the 'FocusState.currentJFormFieldIndex'
        parameters...

        NOTE:
        These fields are initialized directly by the Constructor and every modification
        thereafter is made via this method. This is done to easily produce a trace of
        the Current JFormField througout a 'JFormForm' Sub-Class execution...
        A local flag [trace] is used to print the trace information to the console...

        Kernel Usage:
???      *      2)      'this.doJFormControl' when the Flow Control is "FirstInGroup"...
???      *      3)      'this.doJFormControl' when the Flow Control is "LastInGroup"...
        1)      'this.loadFormState' method to initialize the current JFormField and it's index...
        2)      'this.FocusState.getFirstJFormField' method if 1st Field exist...
        3)      'this.FocusState.getFirstJFormField' method after 1st Active Field is
                found in the Form Fields Collection...
        4)      'this.FocusState.getLastJFormField' method if last Field exist...
        5)      'this.FocusState.getLastJFormField' method after the last Active Field is
                found in the Form Fields Collection...
        5zzz)   'this.FocusState.getNextJFormField' method if NOT Forms TAB...
        6)      'this.FocusState.getNextJFormField' method if Forms TAB and next Exist...
        6)      'this.FocusState.getNextJFormField' method if Forms TAB and next is found...
        6)      'this.FocusState.getPreviousJFormField' method when reverse search field
                is active...
        6)      'this.FocusState.getPreviousJFormField' method to set previous to the
                last active field of the form fiields, i.e. LOOP thru top of fields...
        7)      'this.FocusState.mouseFocus' when the selected JFofmField is found in the
                Form Fields Collection...
        

Parameters:
fld - A Reference for the new "Current JFormForm" instance...
fldIndex - The 'formFields' Vector Index for the "Current JFormField' instance...
from - The From DEBUG String...

getTrace

public java.lang.String getTrace()
        Return the current FocusState State Trace...

        Kernel Usage:
        1)      'BasejFormTK.MenuAction.actionPerformed' Method to service the
                "Show Focus State Trace" Debug Menu Option...
        

Returns:
Trace String calculated by the 'setCurrentJFormField' Method...