com.jFormTK
Class JFormControl

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

public class JFormControl
extends java.lang.Object
implements JConstants

        This class is a container used to provide the following parameters to the calling
        process as a function of the given 'flowControl' String:

        1)      The last 'flowControl' Parameters String...
        2)      The 'isFlowControl' Flag that indicates if Flow Control Parameters
                were produced...
        3)      The 'isNewForm' boolean Flag to indicate if a new 'JFormForm' Sub-Class
                was established...
        4)      A reference to a new 'JFormForm' SubClass...
        5)      A reference to a 'JFormField' instance where the focus is to be set...
        6)      A TAB index that is set to a 0 or positive index if the given
                'flowControl' used the "Tabn" OR "TabName" commands...

        Kernel Usage:
        1)      An instance is created in the initialization phase of the 'JFocus.doJFormControl'
                method given the current 'flowControl' parameter. The 'doJFormControl' method then
                makes adjustments to this instance as a function of the run-time processing of
                the current 'JFormField' instance 'postProcessor' and the "to be focused"
                'JFormField' 'preProcessor'...
        

Version:
1.00, 28 Dec 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)  java.lang.String fieldReference
           
(package private)  java.lang.String flowControl
           
(package private)  JFormField focusJFormField
           
(package private)  JFormForm newForm
           
(package private)  int tabIndex
           
 
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
JFormControl(java.lang.String flowControlIn)
           
 
Method Summary
 java.lang.String displayJFormControl()
           Construct and return a display String that includes the values for each of the '*this*JFormControl' Class Variables...
 JFormField doFocus(JFormField fld, java.lang.String from)
           This method [doFocus] is used to control the 'jFormTK' Kernel processing as a fuction of the host 'JFormControl' parameters.
 JFormField doFocus(JFormField fld, java.lang.String mode, java.lang.String from)
           This method [doFocus] is used to control the 'jFormTK' Kernel processing as a fuction of the host 'JFormControl' parameters.
 java.lang.String getFieldReference()
           
 JFormField getFocusJFormField()
           Return the "Focus" 'JFormField' from this.JFormControl instance...
 JFormForm getNewForm()
           
 int getTabIndex()
           Return the current 'tabIndex' of *this* 'JFormControl' instance...
 boolean isFlowControl()
           Return a boolean flag as a function of the '*this' JFormControl state.
 boolean isNewForm()
           
 void setFieldReference(java.lang.String s)
           
 void setFocusJFormField(JFormField field, java.lang.String from)
           Set the Next Focus 'JFormField' object [focusJFormField]...
 void setNewForm(JFormForm form)
           
 void setTabIndex(int i, java.lang.String from)
           
 void showJFormControl(char modeIn, java.lang.String from)
           Show the host 'JFormControl' Parameters...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flowControl

java.lang.String flowControl

newForm

JFormForm newForm

focusJFormField

JFormField focusJFormField

fieldReference

java.lang.String fieldReference

tabIndex

int tabIndex
Constructor Detail

JFormControl

public JFormControl(java.lang.String flowControlIn)
Method Detail

doFocus

public JFormField doFocus(JFormField fld,
                          java.lang.String from)
        This method [doFocus] is used to control the 'jFormTK' Kernel processing as a
        fuction of the host 'JFormControl' parameters. It is ALWAYS called after a new
        'JFormControl' instance is created...

        If the Focus Change Event Flow Control,
                If a new 'JFormField' instance exist,
                Then
                        the new 'JFormField' is returned for normal 'jFormTK' field processing.
                Else
                        the TAB Selection OR New 'JFormForm' Sub-Class processing is 
                        performed by this method...
        }       //      End 'Focus Change Event Flow Control'...
        Kernel Usage:
        1)      'JFormField.KeyListener.keyPressed' when a _BField is focused
                and the 'jFormTK' End User presses the ENTER Key, i.e. when the 'JFormForm'
                Sub-Class 'doButton' method shall be called...
        2)      'JFormField.MouseListener.mouseClicked' after the 'JFormField' that had the
                focus when a different 'JFormField' was selected has been Post processed...
        

Parameters:
fld - Current 'JFormField'...
from - DEBUG String to annotate calling Class.Method...
Returns:
'JFormField' to be Focused...

doFocus

public JFormField doFocus(JFormField fld,
                          java.lang.String mode,
                          java.lang.String from)
        This method [doFocus] is used to control the 'jFormTK' Kernel processing as a
        fuction of the host 'JFormControl' parameters. It is ALWAYS called after a new
        'JFormControl' instance is created...

        If the Focus Change Event Flow Control,
                If a new 'JFormField' instance exist,
                Then
                        the new 'JFormField' is returned for normal 'jFormTK' field processing.
                Else
                        the TAB Selection OR New 'JFormForm' Sub-Class processing is 
                        performed by this method...
                //      End 'Focus Change Event Flow Control'...
        Kernel Usage:
        1)      'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' method following
                the current 'JFormField' Post Processing Operation...
        2)      'BasejFormTK.JFocusTraversalPolicy.getComponentAfter' method following
                the "ToBeFocused JFormField" Pre Processing Operation...
        3)      'BasejFormTK.JFocusTraversalPolicy.getComponentBefore' method following
                the current 'JFormField' Post Processing Operation...
        4)      'JFocus.goToForm' method when the 'JUnLoadForm.toBeFocusedFlowControl' is null...
        

Parameters:
fld - Current 'JFormField'...
mode - Post PreProcessing [="PRE"] OR Post PostProcessing [="POST"] control. Used for setting the 'flowControl' iff a 'jFormTK' Framework TAB was requested in the 'flowControl' produced by the respective 'pre' / 'post' Processing operation. NOTE: If 'mode' is null and a TAB is requested via the 'flowControl' Then a warning dialog is presented to the 'jFormTK' Application Developer.
from - DEBUG String to annotate calling Class.Method...
Returns:
'JFormField' to be Focused...

getFieldReference

public java.lang.String getFieldReference()
Returns:
Return the 'fieldReference' Control...

getFocusJFormField

public JFormField getFocusJFormField()
        Return the "Focus" 'JFormField' from this.JFormControl instance...

        Kernel Usage:
        1)      
        

Returns:
JFormField to receive the Focus as a function of the given 'flowControl...

getNewForm

public JFormForm getNewForm()
Returns:
JFormForm reference iff 'newFormFlag' is true...

getTabIndex

public int getTabIndex()
        Return the current 'tabIndex' of *this* 'JFormControl' instance...

        Kernel Usage...
        1)      This 'JFormControl.doFocus' method if there is not a New Form 'flowControl'
                request.bbbb
        2)      'BasejFormTK.TabbedPaneListener.stateChanged' to manage the 'jUnloadForm' instance
                entries required to get the 'returnToForm' Button processing in sync...
        3)      'JAtypicalDialg.Constructor' to set the Referenced Field ID annotation String iff
                there is an active request to branch to a specified 'jFormTK' TAB...
        4)      'JAtypicalDialg.Constructor' to add a comment to the Dialog about the
                usage of the 'returnToForm' button...
        5)      'JFocus.goToForm' to service the 'returnToForm' button...
        

Returns:
int to a 'jFormTK' Framework TAB iff 'flowControl is ".Tabn" OR ".TabName' Format...

isNewForm

public boolean isNewForm()
Returns:
boolean as a function of 'newForm' state...

isFlowControl

public boolean isFlowControl()
        Return a boolean flag as a function of the '*this' JFormControl state.
        If both the 'newForm' and 'Focus JFormField' instances are null and the
                tabIndex is NOT Set [i.e. == -1]
        Then
                the 'flowControl' produced an unusable instance and a false boolean is returned...

        Kernel Usage:
        1)      'this.doFocus' method to determine if the 'flowControl' parameter is
                allowed to control the next 'JFormField' processing...
        2)      'this.displayJFormControl' to display the current 'flowControl' Flag state...
        3)      'AppForms.loadJFormForm[4]' method after performing a Pre process on a
                'JFormForm' Sub-Class that is in the initial loaded state. The 'flowControl'
                Flag is checked before processing the Pre process return 'flowControl'
                parameter...
        

Returns:
boolean as a function of 'formControl' Parameters...

setFieldReference

public void setFieldReference(java.lang.String s)
Parameters:
s - String to set the Field Reference To...

setFocusJFormField

public void setFocusJFormField(JFormField field,
                               java.lang.String from)
        Set the Next Focus 'JFormField' object [focusJFormField]...

        Kernel Usage:
        1)      'JFocus.doJFormControl' when a focus 'JFormField' is established...
                Occurs 9 times in the 'doJFormControl' method...
        2)      'JFocus.doPreProcess' method after a 'JBranchIncongruity' dialog has been
                processed by the 'jFormTK' Application End User...
        3)      'JFocus.doPreProcess' method when checking for flow Control change to another
                'JFormField' that also has a Pre processor Active Request [Complicated]...
        4)      'JFocus.doPostProcess' method after a 'JBranchVerify' Dialog is serviced by
                the 'jFormTK' Application End User...
        5)      'JFocus.doPostProcess' method when no Post processing is active. The given
                'flowControl' is then serviced for the ".Next", ".Previous",
                or ".This" [Default] Controls...
        6)      'JFocus.doPostProcess' method to service the 'exitFlorControl' parameter of
                a 'jFormTK.highliteControl' Set when the last 'JFormField' of the
                Highlite Set has the focus...
        7)      'JFocus.preProcess' method when No Pre Processing shall be perfomed for this
                Focus Event Case. Sets the return 'JFormControl' instance to given Flow
                Control and     'JFormField'... 
        

Parameters:
field - JFormField where the next Focus shall be set...

setNewForm

public void setNewForm(JFormForm form)
Parameters:
form - New 'JFormForm' Sub-Class to be loaded

setTabIndex

public void setTabIndex(int i,
                        java.lang.String from)
Parameters:
i - Index [int] into the 'jFormTK' Framework Tab's
from - Debug 'from' String annotation...

displayJFormControl

public java.lang.String displayJFormControl()
        Construct and return a display String that includes the values for each of
        the '*this*JFormControl' Class Variables...

        Kernel Usage:
        1)      '*this*.showJFormControl' Method...
        2)      'BasejFormTK.JFocusTraversapPolicy.getComponentAfter' Method...
        

Returns:
Constructed display String...

showJFormControl

public void showJFormControl(char modeIn,
                             java.lang.String from)
        Show the host 'JFormControl' Parameters...

        Kernel Usage
        1)      DEBUG usage as required...
        

Parameters:
modeIn - 'mode of display to be produced. 'd' - Produce a Dialog Window... 'p' - Print to the Java Console 'b' - Both 'd' and 'p'...