com.jFormTK
Class Data

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

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

        This is an Abstract class with a collection of Utilities methods 
        designed to work on the 'savedJFormField' String or the 'JFormData' Vector.
 
        NOTE:
        The following illustrates the fields of each Saved 'JFormField' String:
        index  Field Name                       Java Type       Example
        _____  __________________________       _________       _______
        [ 0] -  Name,                                           String          "Field"
        [ 1] -  GroupName                                       String          "Table"
        [ 2] -  SetNumber                                       int                     4936
        [ 3] -  Row                                                     int                     4
        [ 4] -  Col                                                     int                     5
        [ 5] -  Type                                            char            'T'
        [ 6] -  Text                                            String          "Now is the Time",
        [ 7] -  ItemsText                                       Vector          "Item1~Item2~Item3~"
        [ 8] -  ObjectLabel                                     String          "Field:"
        [ 9] -  Prompt                                          String          "Enter Data..."
        [10] -  TextFieldSize                           int                     12
        [11] -  crypt                                           boolean         -1,0,1
        [12] -  Hint                                            boolean         T
        [13] -  HintText                                        String          "This is your 'Hint'"
        [14] -  HelpText                                        String          "This is your 'Help'"
        [15] -  NotePadFlag                                     boolean         F
        [16] -  Availability                            Character       'R'
        [17] -  RepeatMode                                      String          "~I"
        [18] -  bounds.x                                        int                     1
        [19] -  bounds.y                                        int                     2
        [20] -  bounds.width                            int                     50
        [21] -  bounds.heigh                            int                     100
        [22] -  preProcessFlag                          boolean         T
        [23] -  postProcessFlag                         boolean         T
        [24] -  preObject                                       Integer         85
        [25] -  postObject                                      Vector          "s1~i1~s2~"
        [26] -  preProcessRecurrence
        [27] -  postProcessRecurrence
        [28] -  Reference                                       String          "Cat.SubCat.File.Table.Field.2"
        [29] -  newRow                                          boolean
        [30] -  breakpoint
        [31] -  doButtonFlag
        [32] -  buttonBackground                        Color           white
        [33] -  buttonForeground                        Color           pink
        [34] -  buttonFont                                      Font            "Monospaced~0~10"
        [35] -  editable                                        boolean         F
        [36] -  NumberOfColumns                         int                     4
        [37] -  doButtonFlag                            boolean         T
        [38] -  doObject                                        Vector          "s1"~"s2"~..."sn"
        [39] -  savedLastText                           String          "Fudge"
        [40] -  AddressBookAnchor                       String          "A"
        [41] -  AddressBookNameID                       String          "B"
        [42] -  AddressBookTypeID                       String          "C"
        [43] -  AddressBookType                         String          "D"
        [44] -  updateAddressBookAnchor         String          "E"
        [45] -  updateAddressBookFieldType      String          "F"
        [46] -  updateAddressBookValue          String          "G"
        [47] -  updateAddressBookNote           String          "H"
        [48] -  choiceAddressBookTypes          String          "I"
        [49] -  preAssignment                           boolean         T
        [50] -  postAssignment                          boolean         T
        [51] -  preIfCondition                          String          "I1"
        [52] -  preIfAssignment                         String          "I2"
        [53] -  preElseAssignment                       String          "I3"
        [54] -  postIfCondition                         boolean         T
        [55] -  postIfAssignment                        String          "I4"
        [56] -  postElseAssignment                      String          "I5"
        [57] -  sRecurrence                                     String          "I6"
        [58] -  sOverwrite                                      String          "I7"
        [59] -  test
        [60] -  isNumeric                                       boolean         F
        [61] -  numericType     
        

Version:
1.00, 28, April 2004
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 dot
           
(package private) static boolean F
           
(package private) static java.lang.String[] fieldOrder
           
(package private) static java.lang.String LF
           
static int lines
           
(package private) static java.lang.String QUOTE
           
(package private) static boolean T
           
(package private) static java.lang.String TAB
           
(package private) static java.lang.Object[] testArray
           
(package private)  java.lang.String testsavedJFormField
           
 
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, LISTBRACKET, NO, OPEN, OPEN_BRACKET, pCheckboxGroup, SPACE_, YES
 
Constructor Summary
Data()
           
 
Method Summary
static char getAvailability(java.lang.String in)
          Return the 'Availability' char...
static int getBreakpoint(java.lang.String in)
          Return the 'Breakpoint' as an 'int'value...
static int getCol(java.lang.String in)
          Return the 'Col' int.
static boolean getCrypt(java.lang.String in)
          Return the 'crypt' Boolean...
static java.lang.String getField(java.lang.String sIn, int index)
           Return the String in the 'index' element of the given 'savedJFormField' String [sIn]...
static java.lang.Object[] getFieldArray(java.lang.String sIn, int index)
           Construct an 'Object' Array for the given "Field Index".
static java.lang.Object[] getFieldArray(java.lang.String sIn, java.lang.String fieldName)
           Construct an 'Object' Array for the given "Field Name".
static java.lang.String getGroupName(java.lang.String in)
          Return the 'Group Name' String...
static int getHeight(java.lang.String in)
          Return the bounds Height int...
static java.lang.String getHintText(java.lang.String in)
          Return the 'Hint Text' String...
static java.lang.String getID(java.lang.String in)
          Construct the 'JFormField' ID from the given 'savedJFormField' String [in]...
static int getIndex(java.lang.String sFieldIn)
           Return the field order index for the given Field Name String [sFieldIn].
static java.lang.String getName(java.lang.String in)
          Return the 'Name' String...
static boolean getNewRow(java.lang.String in)
          Return the 'newRow' boolean...
static java.lang.String getPrompt(java.lang.String in)
          Return the 'Prompt' String...
static boolean getRequired(java.lang.String in)
          Return true if the 'Availability' parameter has the 'R' [Required] Annotation...
static int getRow(java.lang.String in)
          Return the 'Row' int...
static java.lang.String getSavedJFormField(java.util.Vector JFormData, java.lang.String searchNameIN)
           Return the 'savedjFormField' String that matches the given 'name' String [searchNameIN] in the given 'JFormData' Vector...
static java.lang.String getSetNumber(java.lang.String in)
          Return the 'Set Number' String...
static java.lang.String getText(java.lang.String in)
          Return the 'Text' String as a function of the 'JFormField' Type...
static char getType(java.lang.String in)
          Return the 'Type' char...
static int getWidth(java.lang.String in)
          Return the Bounds 'Width' int for *this* JFormField...
static java.lang.String setField(java.lang.String sIn, int index, java.lang.String value)
           Re-Set the given 'savedJFormField' String [sIn] as a function of the given Index [index] and Value [value] String...
static void showObjectArray(java.lang.Object[] objectArray)
           Show an Object Array that was constructed using the '*this*.getFieldArray' method.
static void showSavedJFormField(java.lang.String sIn)
          Show the given 'savedJFormField' after a generic unpacking...
static java.lang.String XXXsetRow(java.lang.String in, int row)
           Set the 'Row' field of the given Saved JFormField [in] with the given Row number [row]...
static java.lang.String XXXupdateRow(java.lang.String in, int delta)
           Increment the 'Row' Field of the given Saved 'JFormField' [in] with the given delta int [delta].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dot

static java.lang.String dot

F

static boolean F

lines

public static int lines

fieldOrder

static java.lang.String[] fieldOrder

LF

static java.lang.String LF

QUOTE

static java.lang.String QUOTE

T

static boolean T

TAB

static java.lang.String TAB

testArray

static java.lang.Object[] testArray

testsavedJFormField

java.lang.String testsavedJFormField
Constructor Detail

Data

public Data()
Method Detail

getAvailability

public static char getAvailability(java.lang.String in)
Return the 'Availability' char...

Parameters:
in - - Saved 'JFormField' String.
Returns:
char availabilty

getBreakpoint

public static int getBreakpoint(java.lang.String in)
Return the 'Breakpoint' as an 'int'value...

Parameters:
in - - Saved 'JFormField' String.
Returns:
int breakpoint

getCol

public static int getCol(java.lang.String in)
Return the 'Col' int.

Parameters:
in - - Saved 'JFormField' String.
Returns:
ing column

getCrypt

public static boolean getCrypt(java.lang.String in)
Return the 'crypt' Boolean...

Parameters:
in - - Saved 'JFormField' String.
Returns:
crypt Flag...

getField

public static java.lang.String getField(java.lang.String sIn,
                                        int index)
        Return the String in the 'index' element of the given 'savedJFormField' String
        [sIn]...
        

Parameters:
sIn - - Saved 'JFormField' String.
index - - field index to be unpacked from 'sIn'...
Returns:
String unpacked_Field

getFieldArray

public static java.lang.Object[] getFieldArray(java.lang.String sIn,
                                               int index)
 Construct an 'Object' Array for the given "Field Index". 
 The format is as follows:
    Object[0] - Field Name [String]
    Object[1] - Type [String]
    NOTE: . Type Strings are as follows:
          . String, Integer, Character, Vector, Boolean, Color, Font
    Object[2] - Value [f(Type)]
 
 NOTE:
 This is a 'debug' method generally used by the 'jFormTK' kernel development team...
 

Parameters:
sIn - - Saved 'JFormField' String.
index - - 'JFormFields' element index to be unpacked
Returns:
- Object[3] Array as described in description...

getFieldArray

public static java.lang.Object[] getFieldArray(java.lang.String sIn,
                                               java.lang.String fieldName)
 Construct an 'Object' Array for the given "Field Name".
 The format is as follows:
   Object[0] - Type [String], e.g. int, boolean, String, char
  . Type Strings are as follows:
     . String, Integer, Character, Vector, Boolean, Color, Font
   Object[1] - Value [f(Type)]
 

Parameters:
sIn - - Saved 'JFormField' String.
fieldName - - JFormField element Name to be serviced
Returns:
- Object[2] array with Type and Value parameters.

getGroupName

public static java.lang.String getGroupName(java.lang.String in)
Return the 'Group Name' String...

Parameters:
in - - Saved 'JFormField' String.
Returns:
Group Name String

getHeight

public static int getHeight(java.lang.String in)
Return the bounds Height int...

Parameters:
in - - Saved 'JFormField' String.
Returns:
int height

getHintText

public static java.lang.String getHintText(java.lang.String in)
Return the 'Hint Text' String...

Parameters:
in - - Saved 'JFormField' String.
Returns:
Hint Text String...

getID

public static java.lang.String getID(java.lang.String in)
Construct the 'JFormField' ID from the given 'savedJFormField' String [in]...

Parameters:
in - - Saved 'JFormField' String.
Returns:
JFormField ID String

getIndex

public static int getIndex(java.lang.String sFieldIn)
 Return the field order index for the given Field Name String [sFieldIn].
 For example if sFieldIn = "HintText", "hintText", "hintText", etc. the
 return index shall be 13 after matching with the 'fieldOrder' String Array
 13th element.
 
 NOTE: The match is NOT case sensitive...
 

Parameters:
sFieldIn - - field name to be searched for...
Returns:
int index of 'fieldOrder element where a match was found...

getName

public static java.lang.String getName(java.lang.String in)
Return the 'Name' String...

Parameters:
in - - Saved 'JFormField' String.
Returns:
String Name field value...

getNewRow

public static boolean getNewRow(java.lang.String in)
Return the 'newRow' boolean...

Parameters:
in - - Saved 'JFormField' String.
Returns:
boolean newFlag

getPrompt

public static java.lang.String getPrompt(java.lang.String in)
Return the 'Prompt' String...

Parameters:
in - - Saved 'JFormField' String.
Returns:
String prompt

getRequired

public static boolean getRequired(java.lang.String in)
Return true if the 'Availability' parameter has the 'R' [Required] Annotation...

Parameters:
in - - Saved 'JFormField' String.
Returns:
boolean required field flag...

getRow

public static int getRow(java.lang.String in)
Return the 'Row' int...

Parameters:
in - - Saved 'JFormField' String.
Returns:
int row

getSavedJFormField

public static java.lang.String getSavedJFormField(java.util.Vector JFormData,
                                                  java.lang.String searchNameIN)
 Return the 'savedjFormField' String that matches the given 'name' String [searchNameIN] in the given 'JFormData' Vector...
 
 NOTE: The compare IS case sensitive.
 

Parameters:
JFormData - - A Vector that contains a set of Saved JFormField Strings for a specific Form...
searchNameIN - - The 'JFormField' Name to be retrieved from the 'JFormData' Vector...
Returns:
String savedJFormField

getSetNumber

public static java.lang.String getSetNumber(java.lang.String in)
Return the 'Set Number' String...

Parameters:
in - - Saved 'JFormField' String.
Returns:
String setNumber

getText

public static java.lang.String getText(java.lang.String in)
Return the 'Text' String as a function of the 'JFormField' Type...

Parameters:
in - - Saved 'JFormField' String.
Returns:
String Text

getType

public static char getType(java.lang.String in)
Return the 'Type' char...

Parameters:
in - - Saved 'JFormField' String.
Returns:
char type

getWidth

public static int getWidth(java.lang.String in)
Return the Bounds 'Width' int for *this* JFormField...

Parameters:
in - - Saved 'JFormField' String.
Returns:
int width

setField

public static java.lang.String setField(java.lang.String sIn,
                                        int index,
                                        java.lang.String value)
         Re-Set the given 'savedJFormField' String [sIn] as a function of the given Index
        [index] and Value [value] String...
        
        Kernel Usage:
        1)      'Data.setRow' Method...
        2)      'Data.updateRow' Method...
        3)      'JHDD_IO.doCrypt' Method to reset the Text [value] parameter to the
                'cipherValue' String...
        

Parameters:
sIn - Saved 'JFormField' String.
index - element index to be modified in the return Saved 'JFormField'
value - String value to be inserted into the return Saved 'JFormField'.
Returns:
revised Saved JFormField

XXXsetRow

public static java.lang.String XXXsetRow(java.lang.String in,
                                         int row)
        Set the 'Row' field of the given Saved JFormField [in] with the given Row
        number [row]...
        

Parameters:
in - Saved 'JFormField' String.
row - row number to be inserted
Returns:
revised Saved 'JFormField'

showObjectArray

public static void showObjectArray(java.lang.Object[] objectArray)
        Show an Object Array that was constructed using the '*this*.getFieldArray' method. 
        NOTE:
        This is a Debug time method that is used in the 'JFormField(savedJFormField)'
        constructor as required. This is generally used by the 'jFormTK' Kernel developer
        only...
        

Parameters:
objectArray - as constructed by the '*this*.getFieldArray' method...

showSavedJFormField

public static void showSavedJFormField(java.lang.String sIn)
Show the given 'savedJFormField' after a generic unpacking...

Parameters:
sIn - Saved 'JFormField' String.

XXXupdateRow

public static java.lang.String XXXupdateRow(java.lang.String in,
                                            int delta)
 Increment the 'Row' Field of the given Saved 'JFormField' [in] with the given delta int [delta].
 
 Return the given Saved 'JFormField' with the updated  'Row' field.
 

Parameters:
in - - Saved 'JFormField' String.
delta - - int value to increment the Saved 'JFormField' Row Field with.
Returns:
String of Saved 'JFormField' with the Row Field updated...