com.jFormTK
Class QuickEdit

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

public class QuickEdit
extends java.lang.Object
implements JConstants

        This 'jFormTK' Class is designed to contain an "Item" for
        each 'JFormField' that has an 'availability' parameter set to
        "Required" [R] or "Marked" [M].

        Each Item is added to this class as the 'JFormField' is added to a
        'jFormForm' OR when a 'jFormTK' Application End User toggles the
        "Mark" JFormFrame Control Button.

        Kernel Usage:
        1)      This Class is hosted by the 'AppDB' Class. It is instanced in the 'AppDB'
                Constructor. The methods of this class are always referenced using the
                'AppDB.quickEdit' prefix, i.e. the class instance is a 'public' object of the
                'AppDB' Class...
        

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

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

Field Summary
static java.util.Vector items
           
 
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
QuickEdit()
           
 
Method Summary
 void addItem(java.lang.String category, java.lang.String fileName, java.lang.String groupName)
          Add the given parameters to the 'quickEdit' Instance in 'Category' order...
 void addItem(java.lang.String inCategory, java.lang.String inFileName, java.lang.String inGroupName, java.lang.String inFieldName, java.lang.String inSetNumber, char inAvailability, java.lang.String inPrompt)
           Add the given parameters to the 'quickEdit' Instance in 'Category' order...
 void addItems(java.util.Vector v, JFormForm form)
           Add the given 'Quick Edits' Vector[v] to the 'quickEdit' Instance in 'Category' order...
 int findItem(java.lang.String category, java.lang.String fileName, java.lang.String groupName)
           Find the given parameters in the 'quickEdit' Vectors.
 int findItem(java.lang.String sCategory, java.lang.String sFileName, java.lang.String groupName, java.lang.String sFieldName, java.lang.String sSetNumber, char cAvailability, java.lang.String prompt)
           Find the given parameters in the 'quickEdit' Vectors.
 java.lang.String[] getItem(int index)
           Return the requested Item as the following Sting Array: Kernel Usage: 1) Called by the 'BasejGormTK.QuickEditDialog.Constructor' to fetch the current 'Required Fields' and / OR 'Marked Fields' items for the Edit Items Selection List...
 java.lang.String getSavedString(java.lang.String category, java.lang.String fileName)
           Construct a "Saved Items" String that contains a "Record Set" for each entry in the current 'QuickEdit' items Vector that matches the given 'jFormTK.JFormForm' Category and FileName Strings...
 int removeItem(java.lang.String category, java.lang.String fileName, java.lang.String groupName)
           Remove the specified 'JFormField' from the 'quickEdit' Items Vector.
 int removeItem(java.lang.String sCategory, java.lang.String sFileName, java.lang.String sFieldName, java.lang.String sGroupName, java.lang.String sSetNumber, char cAvailability, java.lang.String sPrompt)
           Remove the specified 'JFormField' from the 'quickEdit' Items Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

public static java.util.Vector items
Constructor Detail

QuickEdit

public QuickEdit()
Method Detail

addItem

public void addItem(java.lang.String category,
                    java.lang.String fileName,
                    java.lang.String groupName)
Add the given parameters to the 'quickEdit' Instance in 'Category' order...

Parameters:
category - - Application unique Category String...
fileName - - Form File Name...
groupName - - 'jFormTK.JFormField' Group Name...

addItem

public void addItem(java.lang.String inCategory,
                    java.lang.String inFileName,
                    java.lang.String inGroupName,
                    java.lang.String inFieldName,
                    java.lang.String inSetNumber,
                    char inAvailability,
                    java.lang.String inPrompt)
        Add the given parameters to the 'quickEdit' Instance in 
        'Category' order...
 
        Full Parameters Signature...
        

Parameters:
inCategory - - Application unique Category String...
inFileName - - Form File Name String...
inGroupName - - 'jFormTK.JFormField' Group Name String...
inFieldName - - 'jFormTK.JFormField' Field Name String...
inSetNumber - - 'jFormTK.JFormField' Set Number String...
inAvailability - - 'jFormTK.JFormField' Availability char...
inPrompt - - 'jFormTK.JFormField' Prompt String...

addItems

public void addItems(java.util.Vector v,
                     JFormForm form)
        Add the given 'Quick Edits' Vector[v] to the 'quickEdit' Instance
        in 'Category' order...
 
        Kernel Usage:
        1)      Called by the 'JFormForm' Initialization Method when the 'JFormForm' has
                an existing HDD File. The 'Quick Edit' parameters from the existing file
                are loaded into the 'jFormTK.JFormInfo' Vector and then loaded into the
                Application 'QuickEdit' Instance via this method...
        NOTE 1:
        If NO "Quick Edits" exist for this 'JFormForm' Sub-Class
        Then
                the first element of the given vector [v] SHALL contain the "None"
                String and no "addItme' Processing is required...
        NOTE 2:
        The "Quick Edit" parameters are as follows:
                category, fileName,     groupName, fieldName, setNumber, availability, prompt
        

Parameters:
v - a Java Vector with a set of Saved QuickEdit String. There is a Vector element for each of the 8 Fields of each QuickEdit element...
form - Host 'JFormForm' Sub-Class. [Used for DEBUG message only]...

findItem

public int findItem(java.lang.String category,
                    java.lang.String fileName,
                    java.lang.String groupName)
        Find the given parameters in the 'quickEdit' Vectors. Return
        the Vector Index if Found OR a -1 if NOT Found...

        Kernel Usage:
        1)      'JFormField.requiredLabel' Method...
        

Parameters:
category - Application Category String...
fileName - Application Form File Name String...
groupName - 'jFormTK.JFormField' Application Group Name String...
Returns:
int that points to the matched element of the *this*items Vector OR a -1 int if no match was found...

findItem

public int findItem(java.lang.String sCategory,
                    java.lang.String sFileName,
                    java.lang.String groupName,
                    java.lang.String sFieldName,
                    java.lang.String sSetNumber,
                    char cAvailability,
                    java.lang.String prompt)
        Find the given parameters in the 'quickEdit' Vectors. Return
        the Vector Index if Found OR a -1 if NOT Found...

        Kernel Usage:
        1)      'JFormField.requiredLabel' Method to bbbb...
        2)      'QuickEdit.removeItem' Method...
        

Parameters:
sCategory - Application Category String...
sFileName - Application Form File Name String...
groupName - 'jFormTK.JFormField' Application Group Name String...
sFieldName - 'jFormTK.JFormField' Application Field Name String...
sSetNumber - 'jFormTK.JFormField' Application Set Number String...
cAvailability - 'jFormTK.JFormField' Application Availability char...
prompt - 'jFormTK.JFormField' Application prompt String...
Returns:
int that points to the matched element of the *this*items Vector OR a -1 int if no match was found...

removeItem

public int removeItem(java.lang.String category,
                      java.lang.String fileName,
                      java.lang.String groupName)
        Remove the specified 'JFormField' from the 'quickEdit' Items
        Vector. Return the element index if Found OR a -1 if NOT Found
        

Parameters:
category - Application Category String...
fileName - Application Form File Name String...
groupName - 'jFormTK.JFormField' Application Group Name String...
Returns:
the element index if Found OR a -1 if NOT Found...

removeItem

public int removeItem(java.lang.String sCategory,
                      java.lang.String sFileName,
                      java.lang.String sFieldName,
                      java.lang.String sGroupName,
                      java.lang.String sSetNumber,
                      char cAvailability,
                      java.lang.String sPrompt)
        Remove the specified 'JFormField' from the 'quickEdit' Items
        Vector. Return the element index if Found OR a -1 if NOT Found

        Kernel Usage:
        1)      '
        

Parameters:
sCategory - Application Category String...
sFileName - Application Form File Name String...
sGroupName - 'jFormTK.JFormField' Application Group Name String...
sFieldName - 'jFormTK.JFormField' Application Field Name String...
sSetNumber - 'jFormTK.JFormField' Application Set Number String...
cAvailability - 'jFormTK.JFormField' Application Availability char...
sPrompt - 'jFormTK.JFormField' Application prompt String...
Returns:
the element index if Found OR a -1 if NOT Found...

getSavedString

public java.lang.String getSavedString(java.lang.String category,
                                       java.lang.String fileName)
        Construct a "Saved Items" String that contains a "Record Set" for 
        each entry in the current 'QuickEdit' items Vector that matches the
        given 'jFormTK.JFormForm' Category and FileName 
        Strings...

        If there are NOT any 'QuickEdit' entries for the given Form, 
        Then the "Saved Items" String is returned with "NONE" annotation.
 
        NOTE:   A "Record Set" is a String of the "Matched" Items that
                        contains each Field seperated by the 'jFormTK' Data Base
                        Items Delimiter [jFormTKDB.getItemsDelimiter]...
 
        Kernel Usage:
        1)      Called by the 'JHDD_IO.WriteToFile' method to construct the
                "SavedQuickEdit" String that is written to the Storage Device
                when the "SAVE" 'Show Panel' Button is pressed...
        

Parameters:
category - Application Category String...
fileName - Application Form File Name String...
Returns:
Quick Edit Saved String...

getItem

public java.lang.String[] getItem(int index)
        Return the requested Item as the following Sting Array:
 
        Kernel Usage:
        1)      Called by the 'BasejGormTK.QuickEditDialog.Constructor' to fetch the
                current 'Required Fields' and / OR 'Marked Fields' items
                for the Edit Items Selection List...
        

Parameters:
index - the unique item index [NOT the index into the QuickEdit.items Vector]. NOTE: for the Kernel Usage, the BasejFormTK.QuickEditDialog forms a Loop from 0 to the number of Items -1.
Returns:
String Array of matching items...