com.jFormTK
Class JAddressBook

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

public class JAddressBook
extends java.lang.Object
implements JConstants

        This 'jFormTK' Class is used by the 'jFormTK' Kernel to contain an entry [item] 
        for each Person associated with the Application...

        Each item added to this class has a 'JFormField' Anchor [anchor] that contains the 
        necessary information to find and load the associated 'JFormForm' subclass's
        [Application Form] Data Entry Point. For example, the anchor String would contain
        the following Maximum Information in "DOT. notation Form:

        "Category.FileName.FieldName.SetNumber"

        The 'SetNumber' fields are entered as needed to uniquely identify the 'JFormField'
        instance...

        There shall be one entry per  Name. An individual entry [person] may have multiple
        types. A 'type' identifies the person's duties or function. For example, in the
        "Professional Compuer Solutions [PCS] "Survivors List Plus" 'jFormTK' Application my
        son Stephen's entry has the following types:
 
                "Son",  "Executor"
 
        Therefore a person entry may have multiple 'Anchor' and 'Type' entries.

        NOTE:
        A Java 'TreeMap' [map] is used to collect the various individuals of a 'jFormTK'
        Application. The TreeMap ordered pairs are as follows:

                KEY:    Constructed by the 'buildJAddressBookKey' method from a collection of
                                7 Name Fields. This method calculates from 1 to 4 TreeMap keys as
                                follows:
                                        masterKey, slaveKey, maidenMasterKey, maidenSlaveKey
                                        [See 'buildJAddressBookKey' prologue for detailed explanation]...
                                
                VALUE:  1)      'JAddressBookControl' instance if the key is the 'masterKey'...
                                2)      String containing the 'masterKey' iff the key is NOT the 'masterKey'...
        NOTE:
        The 'JAddressBookControl' instance contains the following parameters for each
        unique individual in the 'jFormTK' Application's JAddressBook:
                

        Kernel Usage:
        This Class is hosted by the 'AppDB' Class. It is instanced in the 'AppDB.initialize'
        method during the 'jFormTK' Application load ohase. The methods of this class are
        always referenced using the 'AppDB.JAddressBook' prefix, i.e. the class instance is a
        'public' object of the 'AppDB' Class...
        

Version:
1.00, 9 Sep 2000
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

Nested Class Summary
(package private)  class JAddressBook.AddressBookEdit
           
(package private)  class JAddressBook.AddressBookReferenceDialog
           
(package private)  class JAddressBook.AddressBookRemove
           
(package private)  class JAddressBook.AnchorExistDialog
           
(package private)  class JAddressBook.JFormTKTextField
           Produce a 'jTextField' Inner Class that inherits all the JTextField's methods and provides the following behaviors: 1) Move to the next component if the 'ENTER' Key is pressed...
(package private) static class JAddressBook.SelectABKey
           
(package private) static class JAddressBook.ShowDialog
           
 
Field Summary
(package private)  JLAF addressBookLAF
           
(package private)  JLAF addressBookPanelLAF
           
(package private)  java.lang.Object addressBorder
           
(package private) static java.lang.String anchor
           
static JAddressBook.AddressBookEdit bookEdit
           
static JAddressBook.AddressBookRemove bookRemove
           
(package private)  javax.swing.border.Border border
           
(package private)  java.awt.Color buttonBackground
           
(package private)  javax.swing.border.Border buttonBorder
           
(package private)  java.awt.Font buttonFont
           
(package private)  java.awt.Color buttonForeground
           
(package private)  java.awt.Container contentPane
           
(package private)  java.lang.String defaultFontName
           
(package private) static boolean displayEditWindow
           
(package private) static java.lang.String[] fields
           
(package private) static boolean firstEntryFlag
           
(package private) static JAddressBook JAddressBook
           
(package private) static java.lang.String name
           
(package private)  java.awt.Color panelBackground
           
(package private)  javax.swing.border.Border panelBorder
           
(package private)  java.awt.Font panelFont
           
(package private)  java.awt.Color panelForeground
           
(package private) static java.lang.String reference
           
protected  javax.swing.JTextArea referenceTA
           
 
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
JAddressBook()
           
 
Method Summary
static int add(JFormForm form, JFormField fld, java.lang.String type)
           Add a new 'JAddressBook' Item, No 'note' parameter...
static int add(JFormForm form, JFormField fld, java.lang.String[] types)
           Add a new 'JAddressBook' Item...
static int add(JFormForm form, JFormField fld, java.lang.String[] types, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(JFormForm form, JFormField fld, java.lang.String type, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String[] names, java.lang.String[] types, java.lang.String anchor)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String[] names, java.lang.String[] types, java.lang.String anchor, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String[] name, java.lang.String type, java.lang.String anchor)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String[] name, java.lang.String type, java.lang.String anchor, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String name, java.lang.String type, java.lang.String anchor)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String name, java.lang.String type, java.lang.String anchor, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String suffix, java.lang.String[] types, java.lang.String anchor, java.lang.String note)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String suffix, java.lang.String type, java.lang.String anchor)
           Add a new 'JAddressBook' Item...
static int add(java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String suffix, java.lang.String type, java.lang.String anchorIN, java.lang.String note)
           Add a new 'JAddressBook' Item...
static void addKeys(java.lang.String keys, JAddressBookControl control)
           - Add the given keys [keys] to the specified 'JAddressBookControl' [control] instance...
static void addNote(int index, java.lang.String note)
           
static void addNote(java.lang.String name, java.lang.String note)
           
static void addPerson(java.lang.String masterKey, JAddressBookControl control)
           Add a 'JAddressBookControl' object to the tree map using the "masterKey" iff the key is not present in the TreeMap...
static void addPerson(java.lang.String key, java.lang.String masterKey)
           Add an ordered pair to the 'JAddressBook' Tree Map with a given "Non-Master" Key [key] and the master Key to be referenced [masterKey]...
static void addPersonal(int index, java.lang.String savedPersonal)
           
static void addPersonal(int index, java.lang.String[] personalFields)
           
static void addPersonal(java.lang.String name, java.lang.String savedPersonal)
           
static void addPersonal(java.lang.String name, java.lang.String[] personalFields)
           
static void addPhone(int index, java.lang.String savedPhoneIN)
           
static void addPhone(int index, java.lang.String[] phoneFields)
           
static void addPhone(java.lang.String name, java.lang.String savedPhone)
           
static void addPhone(java.lang.String name, java.lang.String[] phoneFields)
           
static void addType(int index, java.lang.String typeIn, java.lang.String anchor)
           
 void adjustAnchors(java.lang.String anchorIn, int setNumber)
           
static java.lang.String buildJAddressBookKey(java.lang.String[] nameFieldsIn)
           Build the 'JAddressBook' TreeMap Keys from a given String array [nameFields] as follows: [0] Given Name [1] Nickname [2] Middle Initial OF Name [3] Surname [4] Maiden Name * See Note...
static void clear(int anchorIndex, java.lang.String anchorToBeCleared)
           
static java.lang.String displayJAddressBookTreeMap(java.lang.String title)
           
static int findAnchor(java.lang.String anchor)
           
static boolean findKey(java.lang.String key)
           Return boolean to indicate if the current 'JAddressBook' TreeMap contains the given Name Key [key].
static int findNameStandardForm(java.lang.String name, java.lang.String from)
           
static java.lang.String formatMasterKey(java.lang.String masterKey)
          Convert the given Master key to a formatted name String...
static java.lang.String formatName(java.lang.String name)
           Convert the formated given name [Note 1 to a formatted String [Note 2] and assure that each name field is 1st Letter capitalized and the Roman Numeral Field is all caps...
static java.lang.String getAddress(int index)
           
static java.lang.String getAddress(java.lang.String name)
           
static java.lang.String getAnchor(int index)
           
static java.lang.String getAnchor(int index, java.lang.String typeIn)
           
static JContactInfo getContactInfo(java.lang.String key)
           
 boolean getDisplayEditWindow()
           
static java.lang.String getFieldType(int index, java.lang.String fieldTypeIn)
           Return the String Value for the specified Field [field] of the indicated 'JAddressBook' element [index]...
 int[] getIndexes(java.lang.String inType)
           
 int[] getIndexes(java.lang.String[] types)
           
 int[] getIndexesOrdered(java.lang.String[] types)
           
static java.util.ArrayList<java.lang.String> getKeysForSurname(java.lang.String surName, boolean masterKeyOnly)
           Return an ArrayList Collection of all the Surnames in the current 'JAddressBook' instance Collections...
static java.lang.String getLastName(int index)
           
 java.lang.String[] getList(java.lang.String[] types)
           
static java.lang.String getName(int index)
           
 java.lang.String[] getNames(java.lang.String type)
           
 java.lang.String[] getNames(java.lang.String[] types)
           
 java.lang.String[] getNamesOrdered(java.lang.String type)
           
 java.lang.String[] getNamesType(int length)
           
 java.lang.Object[] getNamesWithSeparator(java.lang.String[] types)
           
static java.lang.String getNote(int index)
           
static java.lang.String getNote(java.lang.String name)
           
static int getNumberOfAnchors(int index)
           
static int getNumberOfItems()
           
static java.lang.String getPersonal(int index)
           
static java.lang.String getPersonal(java.lang.String name)
           
static java.lang.String getPhone(int index)
           
static java.lang.String getPhone(java.lang.String name)
           
static java.lang.String getPhoneNumber(int index, java.lang.String from)
           
static java.lang.String getPhoneNumber(java.lang.String name, java.lang.String from)
           
static java.lang.String getRawName(int index)
           
 java.lang.String getReference()
           
 java.util.Vector getSavedJAddressBook()
           
static java.util.ArrayList<java.lang.String> getSurNameKeys()
           Return an ArrayList Collection of all the SurName Keys...
static java.lang.String getType(int index)
           
static java.lang.String getType(java.lang.String anchor)
           
static java.lang.String[] getTypes()
           
 java.lang.String[] getTypesName(int length)
           
static boolean isKey(java.lang.String key)
           Return boolean to indicate if the given 'JAddressBook' TreeMap contains the given Name Key [key]...
static java.lang.String packName(java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String suffix)
           Pack the given 'First', 'Middle', 'Last', and 'Suffix' Strings into a single String formatted as follows: "Last suffix,First,Middle" Kernel Usage: 1) Called by the '*this*.add' Method to add a new Item in 'Name' Order...
static void remove(java.lang.String anchor)
           
static void setAddress(int index, java.lang.String savedAddress)
           Method to set the 'Address' parameters of a specific 'JAddressBook' entry...
static void setAddress(int index, java.lang.String[] addressFields)
           Method to set the 'Address' parameters of a specific 'JAddressBook' entry...
static void setAddress(java.lang.String name, java.lang.String savedAddress)
           Method to set the 'Address' parameters of a specific 'JAddressBook' entry as a function of the given ...
static void setAddress(java.lang.String name, java.lang.String[] addressFields)
           Method to set the 'Address' parameters of a specific 'JAddressBook' entry as a function of the given name...
 void setDisplayEditWindow(boolean flag)
           
 void setFieldType(int index, java.lang.String inFieldType, java.lang.String value)
           
 void setItems(java.util.Vector v)
           
static void setName(int index, java.lang.String name)
           
static void setNote(int index, java.lang.String note)
           Set the contents of the "Note" Element of the 'Items' Vector as a function of the given Anchor index [index]...
static void setPersonal(int index, java.lang.String personal)
           
static void setPhone(int index, java.lang.String phone)
           
 void setReference(java.lang.String newReference)
           
static void showJAddressBook(java.lang.String from)
           
static void showJAddressBook(java.lang.String from, boolean all)
           
static void showJAddressBookTreeMap(java.lang.String title)
           
static int XXadd(java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String suffix, java.lang.String[] types, java.lang.String anchor)
           Add a new 'JAddressBook' Item...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addressBookLAF

JLAF addressBookLAF

addressBookPanelLAF

JLAF addressBookPanelLAF

addressBorder

java.lang.Object addressBorder

panelBackground

java.awt.Color panelBackground

buttonBackground

java.awt.Color buttonBackground

panelForeground

java.awt.Color panelForeground

buttonForeground

java.awt.Color buttonForeground

border

javax.swing.border.Border border

panelBorder

javax.swing.border.Border panelBorder

buttonBorder

javax.swing.border.Border buttonBorder

contentPane

java.awt.Container contentPane

defaultFontName

java.lang.String defaultFontName

panelFont

java.awt.Font panelFont

buttonFont

java.awt.Font buttonFont

referenceTA

protected javax.swing.JTextArea referenceTA

anchor

static java.lang.String anchor

name

static java.lang.String name

reference

static java.lang.String reference

bookEdit

public static JAddressBook.AddressBookEdit bookEdit

bookRemove

public static JAddressBook.AddressBookRemove bookRemove

displayEditWindow

static boolean displayEditWindow

fields

static java.lang.String[] fields

firstEntryFlag

static boolean firstEntryFlag

JAddressBook

static JAddressBook JAddressBook
Constructor Detail

JAddressBook

public JAddressBook()
Method Detail

addKeys

public static void addKeys(java.lang.String keys,
                           JAddressBookControl control)
        -       Add the given keys [keys] to the specified 'JAddressBookControl'
                [control] instance...
        -       Set the 'JAddressBookControl.masterKey' field...
        -       Set the 'JAddressBookControl.personName' field parameter
                = F[Master Key]...

        Keys String format:
        Surnames and TreeMap Keys delimited by 'JConstants.D_Fields'.

        Surnames:
        Person SurName and [if given] Maiden Surname delimited by
        'JConstants.D_ITEMS 'delimiter.

        TreeMap Keys:
        From 1 to 4 key Strings delimited by the 'JConstants.D_ITEMS' delimiter.
        The     TreeMap keys are as follows:
                Master Key, Slave Key, Maiden Master Key, Maiden Slave Key

        Kernel Usage:
        1)      'JFormField.init._PField Anonymous Inner Class' after
                'JAddressBookControl' [JFormField.abControl] is instanced and the
                'JAddressBook' TreeMap keys have been built...
        

Parameters:
keys - Encoded 'JAddressBook' Keys with JConstants.D_FIELDS delimiter [see above synopsis]...
control - The 'JAddressBookControl' instance to be modified...

addPerson

public static void addPerson(java.lang.String masterKey,
                             JAddressBookControl control)
        Add a 'JAddressBookControl' object to the tree map using the
        "masterKey" iff the key is not present in the TreeMap...

        If the given Master Key is present,
        Then Soft Abort for further PCS Analysis of TreeMap construction...

        

Parameters:
masterKey - Master Key String...
control - 'JAddressBookControl' instance for the given Master key...

addPerson

public static void addPerson(java.lang.String key,
                             java.lang.String masterKey)
        Add an ordered pair to the 'JAddressBook' Tree Map with a given
        "Non-Master" Key [key] and the master Key to be referenced [masterKey]...

        If the given key is present,
        Then Soft Abort for further PCS Analysis of TreeMap construction...

        

Parameters:
key - Non-Master Key String...
masterKey - Master Key String...

buildJAddressBookKey

public static java.lang.String buildJAddressBookKey(java.lang.String[] nameFieldsIn)
        Build the 'JAddressBook' TreeMap Keys from a given String array
        [nameFields] as follows:
                [0]     Given Name
                [1]     Nickname
                [2]     Middle Initial OF Name
                [3]     Surname
                [4]     Maiden Name * See Note...
                [5]     Suffix, e.g. "Jr" or "Sr"
                [6]     Roman Numeral OR Duplicate Name Mneumonic...

        This method creates from 1 to 4 'JAddressBook' TreeMap Keys as follows:
        1)      Master Key:
                If a Given Name is entered the Master key uses it.
                Else the Nickname is used in the Master key Construction...
        2)      Slave Key:
                If both a Given Name and a Nickname is entered
                Then the Slave Key is built using the Nickname
        3)      Maiden Master Key:
                If a Maiden Name is provided,
                Then a Maiden Key is constructed using either the Given Name OR
                        if no Given Name the Nickname...
        4)      Maiden Slave Key:
                If both a Given Name and a Nickname are provided with the Maiden Name
                Then the Maiden Slave key is built using the Nickname...

        The return String SHALL be constructed as follows:
        1)      SurNames
        2)      TreeMap Keys
        These fields are delimited by the 'JConstants.D_FIELDS' delimiter...

        Surnames:
        SurName and [if given] Maiden Surname delimited with the 'JConstants'
        D_ITEMS delimiter.

        TreeMap Keys:
        From 1 to 4 key Strings delimited by the 'JConstants.D_ITEMS' delimiter. The
        TreeMap keys are in the followin order:
                Master Key, Slave Key, Maiden Master Key, Maiden Slave Key

        Note:
        The "Master Key" 'JAddressBook' TreeMap always has a 'JAddressBookControl'
        instance as the 'Value' part of the TreeMap Ordered Pair. Each of the other keys
        constructed by this method have a String Control that points to the
        Masker Key. This methodology ensures that all of the 4 possible keys shall
        yield the same 'JAddressBook' Types, Anchors, Contact Info and Personal Info.

        Example:
        'nameFields' :
        [0]     Given Name              |       Cynthia
        [1]     Nickname                |       Cindy
        [2]     Middle Initial  |       A
        [3]     SurName                 |       Sass
        [4]     Maiden Name             |       Crowell
        [5]     Suffix                  |
        [6]     Roman Numeral   |

        Constructed Keys:               
        Master Key:                     |       Sass,Cynthia,A
        Slave Key:                      |       Sass,Cindy
        Maiden Master Key:      |       Crowell,Cynthia,A
        Maiden Slave Key:       |       Crowell,Cindy

        There shall be 4 keys added to the 'JAddressBook' TreeMap as follows:
        KEY                                     |       Value
        ____________________|_______________________________
        Sass,Cynthia,A          |       Instance of 'JAddressBookControls'      
        Sass,Cindy                      |       "Sass,Cynthia,A"        
        Crowell,Cynthia,A       |       "Sass,Cynthia,A"
        Crowell,Cindy           |       "Sass,Cynthia,A"

        Scenario 1:
        If a name is entered as "Cindy Crowell",
        Then the "Crowell,Cindy" Key SHALL be built and the associated
                'JAddressBookControls' for "Sass,Cynthia,A" shall be used...

        Example 2:
        If a name is entered without the middle initial, e.g. Cynthia Sass,
        Then
                a)      The original 'JAddressBook' TreeMap Query [Sass,Cynthia] shall fail.
                b)      A second query is made by matching "Sass,Cynthia" with the ordered
                        'JAddressBook' TreeMap keys. If there are multiple "Sass,Cynthia" keys,
                        i.e. keys with different Middle Initial / Middle Name appendages,
                        Then the 'jFormTK' Application End User is required to select the
                        requested person from an ordered list of found "Sass,Cynthia" entries...

        Kernel Usage:
        1)      'JFormField.init' _PField Anonymous Inner Class after the name fields have
                been entered and verified by the 'jFormTK' End User...
        

Parameters:
nameFieldsIn - String Array of name fields used in the 'key' construction...
Returns:
The constructed 'JAddressBook' keys with the appended sub keys iff they are required...

findKey

public static boolean findKey(java.lang.String key)
        Return boolean to indicate if the current 'JAddressBook' TreeMap
        contains the given Name Key [key]. If an exact match is not found an
        effort to find and verify a matching key is made as follows:
                1)      All the surname keys are collected from the 'JAddressBook' TreeMap...
                2)      The input Key given name matches are then collected and displayed to
                        the end user with the keys type annotation.
                3)      The end user may select one of the keys or refuse all the keys.
                4)      If a resusal is received,
                        Then the given key is entered into the 'JAddressBook' key map...

        Kernel Usage:
        1)      'this.addPerson' method to insure that the added person key is NOT
                currently duplicated...
        

Parameters:
key - Name Key String to be evaluated...
Returns:
flag Flag [boolean] to indicate the given 'key' status...

getContactInfo

public static JContactInfo getContactInfo(java.lang.String key)

getKeysForSurname

public static java.util.ArrayList<java.lang.String> getKeysForSurname(java.lang.String surName,
                                                                      boolean masterKeyOnly)
        Return an ArrayList Collection of all the Surnames in the current
        'JAddressBook' instance Collections...

        Kernal Usage:
        1)      'this.findKeys' method when the search key is NOT found. The Surname keys
                are then used to get all the TreeMap keys for the given Sur-Name...
                For Example:
                -       search key = "James Crowell"
                -       For SurName "Crowell" the following TreeMap keys are found:
                        james.e.crowell, james.c.crowell
                -       The 'jFormTK' Application End User is then queried [SelectABKey] to
                        select from     the found TreeMap Keys...
        2)      'JAddressBookDialog.JAddressBookDialogActionListener.actionPerformed'
                method when a Surname is selected in the Surnames Combo Box... 
        

Parameters:
surName - Surname String to search for...
masterKeyOnly - Flag [boolean] to return only the matching "Master Key" instances. If true, then the "Slave Keys" with nicknames are excluded from the return ArrayList...
Returns:
ArrayList collection of matching TreeMap Keys...

getSurNameKeys

public static java.util.ArrayList<java.lang.String> getSurNameKeys()
        Return an ArrayList Collection of all the SurName Keys...

        Kernal Usage:
        1)      'JAddressBookDialog.conctructor' to set the SurName Choice item when
                the "Same As" panel is selected...
        

Returns:
ArrayList Collection of all the SurName Keys...

formatName

public static java.lang.String formatName(java.lang.String name)
        Convert the formated given name [Note 1 to a formatted String [Note 2]
        and assure that each name field is 1st Letter capitalized and the Roman Numeral
        Field is all caps...

        Note 1:
                Input Format:
                -       SurName.Given Name.Middle Initial OR Middle Name.Suffix.Roman Numeral
        Note 2:
                Output Format:
                -       Given Name,Middle Initial OR Middle Name,SurName_Suffix_Roman Numeral
                        where "_" indicates a space character...

        Kernel Usage:
        1)      JAddressBookDialog constructor to show the names in the
                Same As Panel...
        

Parameters:
name - String with name is standard format with space delimiter... NOTE: Standard format is given name+SPACE+Middle Name / Initial+SPACE+ surname+SPACE+Suffix+Roman Numeral...
Returns:
Formatted String...

formatMasterKey

public static java.lang.String formatMasterKey(java.lang.String masterKey)
Convert the given Master key to a formatted name String... Master Key format: surname.givenName.middle.suffix.RomanNumeral [0] surname [1] givenName [2] middle [Name or Initial] [3] suffix [4] RomanNumeral The Master Key must have the first two fields by definition, i.e. lenght MUST be 2 or greater. Consecutive DOT's shall be used up to the last field [RomanNumeral] as required to identify each field of the above Master key format... The format of the return String is as follows: givenName_middle_surname_suffix_RomanNumeral where "_" represent a blank character... Kernel Usage: 1) 'JFormField.init._PField Anonymous Inner Class' to format the name for display in the 'JAddressBookDialog' Header...

Parameters:
masterKey - 'JAddressBook' TreeMap Master Key...
Returns:
Formatted String...

isKey

public static boolean isKey(java.lang.String key)
        Return boolean to indicate if the given 'JAddressBook' TreeMap
        contains the given Name Key [key]...

        Kernel Usage:
        1)      'this.addPerson' method to insure that the added person key is NOT
                currently duplicated...
        

Parameters:
key - Name Key String to be evaluated...
Returns:
flag Flag [boolean] to indicate the given 'key' status...

displayJAddressBookTreeMap

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

showJAddressBookTreeMap

public static void showJAddressBookTreeMap(java.lang.String title)

add

public static int add(JFormForm form,
                      JFormField fld,
                      java.lang.String type,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...

        Kernel Usage:
        1)      'this'.add Methods...
        2)      'JFormForm' Sub-Class as required by a 'jFormTK' App...
        

Parameters:
form - Current 'JFormForm' Sub-Class...
fld - 'JFormField' reference...
type - 'JFormField.type' String...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

add

public static int add(JFormForm form,
                      JFormField fld,
                      java.lang.String type)
        Add a new 'JAddressBook' Item, No 'note' parameter...
        

Parameters:
form - Current 'JFormForm' Sub-Class...
fld - 'JFormField' reference...
type - 'JFormField.type' String...
Returns:
'JAddressBook' index...

add

public static int add(JFormForm form,
                      JFormField fld,
                      java.lang.String[] types)
        Add a new 'JAddressBook' Item...
        

Parameters:
form - Current 'JFormForm' Sub-Class...
fld - 'JFormField' reference...
types - String array of 'JFormField' Types...
Returns:
'JAddressBook' index...

add

public static int add(JFormForm form,
                      JFormField fld,
                      java.lang.String[] types,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
form - Current 'JFormForm' Sub-Class...
fld - 'JFormField' reference...
types - String array of 'JFormField' Types...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String name,
                      java.lang.String type,
                      java.lang.String anchor)
        Add a new 'JAddressBook' Item...

        Kernel Usage:
        1)      'JFocus.doAddToAddressBook' Method...
        2)      'JFormFrame.doAddToAddressBook' Method...
        

Parameters:
name - Address Book Entry Name [String]...
type - 'JFormField.type' String...
anchor - Anchor [String] to host 'JFormField'...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String name,
                      java.lang.String type,
                      java.lang.String anchor,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
name - Address Book Entry Name [String]...
type - 'JFormField.type' String...
anchor - Anchor [String] to host 'JFormField'...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String first,
                      java.lang.String middle,
                      java.lang.String last,
                      java.lang.String suffix,
                      java.lang.String type,
                      java.lang.String anchor)
        Add a new 'JAddressBook' Item...
        

Parameters:
first - Address Book Entry First Name [String]...
middle - Address Book Entry Middle Initial|Name [String]...
last - Address Book Entry Last Name [String]...
suffix - Address Book Entry Suffic [String], e.g. "Jr"...
type - 'JFormField.type' String...
anchor - Anchor [String] to host 'JFormField'...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String first,
                      java.lang.String middle,
                      java.lang.String last,
                      java.lang.String suffix,
                      java.lang.String type,
                      java.lang.String anchorIN,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
first - Address Book Entry First Name [String]...
middle - Address Book Entry Middle Initial|Name [String]...
last - Address Book Entry Last Name [String]...
suffix - Address Book Entry Suffic [String], e.g. "Jr"...
type - 'JFormField.type' String...
anchorIN - Anchor [String] to host 'JFormField'...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

XXadd

public static int XXadd(java.lang.String first,
                        java.lang.String middle,
                        java.lang.String last,
                        java.lang.String suffix,
                        java.lang.String[] types,
                        java.lang.String anchor)
        Add a new 'JAddressBook' Item...
        

Parameters:
first - Address Book Entry First Name [String]...
middle - Address Book Entry Middle Initial|Name [String]...
last - Address Book Entry Last Name [String]...
suffix - Address Book Entry Suffic [String], e.g. "Jr"...
types - String array of 'JFormField' Types...
anchor - Anchor [String] to host 'JFormField'...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String first,
                      java.lang.String middle,
                      java.lang.String last,
                      java.lang.String suffix,
                      java.lang.String[] types,
                      java.lang.String anchor,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
first - Address Book Entry First Name [String]...
middle - Address Book Entry Middle Initial|Name [String]...
last - Address Book Entry Last Name [String]...
suffix - Address Book Entry Suffic [String], e.g. "Jr"...
types - String array of 'JFormField' Types...
anchor - Anchor [String] to host 'JFormField'...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String[] name,
                      java.lang.String type,
                      java.lang.String anchor)
        Add a new 'JAddressBook' Item...
        

Parameters:
name - Address Book Entry Name [String]...
type - 'JFormField.type' String...
anchor - Anchor [String] to host 'JFormField'...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String[] name,
                      java.lang.String type,
                      java.lang.String anchor,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
name - Address Book Entry Name [String]...
type - 'JFormField.type' String...
anchor - Anchor [String] to host 'JFormField'...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String[] names,
                      java.lang.String[] types,
                      java.lang.String anchor)
        Add a new 'JAddressBook' Item...
        

Parameters:
names - String array of 'JFormField' Names...
types - String array of 'JFormField' Types...
anchor - Anchor [String] to host 'JFormField'...
Returns:
'JAddressBook' index...

add

public static int add(java.lang.String[] names,
                      java.lang.String[] types,
                      java.lang.String anchor,
                      java.lang.String note)
        Add a new 'JAddressBook' Item...
        

Parameters:
names - String array of 'JFormField' Names...
types - String array of 'JFormField' Types...
anchor - Anchor [String] to host 'JFormField'...
note - Address 'Note' String...
Returns:
'JAddressBook' index...

setAddress

public static void setAddress(int index,
                              java.lang.String savedAddress)
        Method to set the 'Address' parameters of a specific 'JAddressBook' entry...

        NOTE:
        The 'savedAddress' String contains the following parameters delimited with the
        'JFormTKDB.itemsDelimiter':
                .       street
                .       suite OR Address2
                .       city
                .       state
                .       zip
                .       country

        Kernel Usage:
        1)      'this.setAddress' methods with the 'name' parameters...
        2)      'this.setParameters' method...
        3)      'Main.Constructor' to set the Registered User into the Address Book...
        

Parameters:
index - Index into the 'items' Vector...
savedAddress - The packed [see above] Address parameters...

setAddress

public static void setAddress(int index,
                              java.lang.String[] addressFields)
        Method to set the 'Address' parameters of a specific 'JAddressBook' entry...

        NOTE:
        The 'addressFields' String Array contains the following parameters:
                [0]     street
                [1]     suite OR Address2
                [2]     city
                [3]     state
                [4]     zip
                [5]     country

        Kernel Usage:
        1)      'this.add' Method to initialize the Address parameters of a new item...
        

Parameters:
index - Index into the 'items' Vector...
addressFields - String Array with the Address Parameters [see above]...

setAddress

public static void setAddress(java.lang.String name,
                              java.lang.String savedAddress)
        Method to set the 'Address' parameters of a specific 'JAddressBook' entry
        as a function of the given ...

        NOTE:
        The 'savedAddress' String contains the following parameters delimited with the
        'JFormTKDB.itemsDelimiter':
                .       street
                .       suite OR Address2
                .       city
                .       state
                .       zip
                .       country

        Kernel Usage:
        1)      'this.setAddress' Method with a String Array of Address Parameters...
        

Parameters:
name - 'JAddresBook' item name [String]
savedAddress - The packed [see above] Address parameters...

setAddress

public static void setAddress(java.lang.String name,
                              java.lang.String[] addressFields)
        Method to set the 'Address' parameters of a specific 'JAddressBook' entry
        as a function of the given name...

        NOTE:
        The 'addressFields' String Array contains the following parameters:
                [0]     street
                [1]     suite OR Address2
                [2]     city
                [3]     state
                [4]     zip
                [5]     country

        Kernel Usage:
        1)      None...
        

Parameters:
name - Index into the 'items' Vector...
addressFields - String Array with the Address Parameters [see above]...

addNote

public static void addNote(int index,
                           java.lang.String note)

addNote

public static void addNote(java.lang.String name,
                           java.lang.String note)

addPersonal

public static void addPersonal(int index,
                               java.lang.String savedPersonal)

addPersonal

public static void addPersonal(int index,
                               java.lang.String[] personalFields)

addPersonal

public static void addPersonal(java.lang.String name,
                               java.lang.String savedPersonal)

addPersonal

public static void addPersonal(java.lang.String name,
                               java.lang.String[] personalFields)

addPhone

public static void addPhone(int index,
                            java.lang.String savedPhoneIN)

addPhone

public static void addPhone(int index,
                            java.lang.String[] phoneFields)

addPhone

public static void addPhone(java.lang.String name,
                            java.lang.String savedPhone)

addPhone

public static void addPhone(java.lang.String name,
                            java.lang.String[] phoneFields)

addType

public static void addType(int index,
                           java.lang.String typeIn,
                           java.lang.String anchor)
Parameters:
index -
typeIn - 'JFormField.type' String...
anchor -

clear

public static void clear(int anchorIndex,
                         java.lang.String anchorToBeCleared)

findAnchor

public static int findAnchor(java.lang.String anchor)

findNameStandardForm

public static int findNameStandardForm(java.lang.String name,
                                       java.lang.String from)

getAddress

public static java.lang.String getAddress(int index)

getAddress

public static java.lang.String getAddress(java.lang.String name)

getAnchor

public static java.lang.String getAnchor(int index)

getAnchor

public static java.lang.String getAnchor(int index,
                                         java.lang.String typeIn)

getFieldType

public static java.lang.String getFieldType(int index,
                                            java.lang.String fieldTypeIn)
        Return the String Value for the specified Field [field] of the indicated
        'JAddressBook' element [index]...         

        Kernel Usage...
        1)      Called by the 'JValue.Constructor' to get a Specified Value to be used in a
                'jFormTK' Run-Time Assignment Statement...
        

Parameters:
index - Index [int] to a specific 'JAddressBook' entry [person]...
fieldTypeIn - The Type of Field [String] to return it's current value...
Returns:
The matching 'JAddressBook' Value...

getLastName

public static java.lang.String getLastName(int index)

getName

public static java.lang.String getName(int index)

getNote

public static java.lang.String getNote(int index)

getNote

public static java.lang.String getNote(java.lang.String name)

getNumberOfAnchors

public static int getNumberOfAnchors(int index)

getNumberOfItems

public static int getNumberOfItems()

getPersonal

public static java.lang.String getPersonal(int index)

getPersonal

public static java.lang.String getPersonal(java.lang.String name)

getPhone

public static java.lang.String getPhone(int index)

getPhone

public static java.lang.String getPhone(java.lang.String name)

getPhoneNumber

public static java.lang.String getPhoneNumber(int index,
                                              java.lang.String from)

getPhoneNumber

public static java.lang.String getPhoneNumber(java.lang.String name,
                                              java.lang.String from)

getRawName

public static java.lang.String getRawName(int index)

getType

public static java.lang.String getType(int index)

getType

public static java.lang.String getType(java.lang.String anchor)

getTypes

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

packName

public static java.lang.String packName(java.lang.String first,
                                        java.lang.String middle,
                                        java.lang.String last,
                                        java.lang.String suffix)
        Pack the given 'First', 'Middle', 'Last', and 'Suffix' Strings into a single
        String formatted as follows:
                        "Last suffix,First,Middle"

        Kernel Usage:
        1)      Called by the '*this*.add' Method to add a new Item in 'Name' Order...                  
        

Parameters:
first - First Name String...
middle - Middle Name or Initial String...
last - Surname or Family Name String
suffix - Surname / family name suffix, e.g. Jr.
Returns:
Packed name [String]...

remove

public static void remove(java.lang.String anchor)

setName

public static void setName(int index,
                           java.lang.String name)

setNote

public static void setNote(int index,
                           java.lang.String note)
        Set the contents of the "Note" Element of the 'Items' Vector as a function
        of the given Anchor index [index]...

        Kernel Usage:
        1)      '*this*.doSave' Method...
        2)      'JFocus.doUpdateAddressBook' Method...
        

Parameters:
index - 'items' Array index [int]...
note - Note String to be addes...

setPersonal

public static void setPersonal(int index,
                               java.lang.String personal)

setPhone

public static void setPhone(int index,
                            java.lang.String phone)

showJAddressBook

public static void showJAddressBook(java.lang.String from)

showJAddressBook

public static void showJAddressBook(java.lang.String from,
                                    boolean all)

adjustAnchors

public void adjustAnchors(java.lang.String anchorIn,
                          int setNumber)

getDisplayEditWindow

public boolean getDisplayEditWindow()

getIndexes

public int[] getIndexes(java.lang.String inType)

getIndexes

public int[] getIndexes(java.lang.String[] types)

getIndexesOrdered

public int[] getIndexesOrdered(java.lang.String[] types)

getList

public java.lang.String[] getList(java.lang.String[] types)

getNames

public java.lang.String[] getNames(java.lang.String type)

getNames

public java.lang.String[] getNames(java.lang.String[] types)

getNamesOrdered

public java.lang.String[] getNamesOrdered(java.lang.String type)

getNamesType

public java.lang.String[] getNamesType(int length)

getNamesWithSeparator

public java.lang.Object[] getNamesWithSeparator(java.lang.String[] types)

getReference

public java.lang.String getReference()

getSavedJAddressBook

public java.util.Vector getSavedJAddressBook()

getTypesName

public java.lang.String[] getTypesName(int length)

setDisplayEditWindow

public void setDisplayEditWindow(boolean flag)

setFieldType

public void setFieldType(int index,
                         java.lang.String inFieldType,
                         java.lang.String value)

setItems

public void setItems(java.util.Vector v)

setReference

public void setReference(java.lang.String newReference)