3.7.11 - Address Entry - JdlAddressEntry

John W. Campbell Introduction

This class stores details of an address for use in conjunction with a JdlAddressWindow view object.

Class, fields, constructor and methods:

Class Details
Accessible Fields
Class Methods
Address Entry Strings Class Details

Class name:
Class definition:
public class JdlAddressEntry
none Accessible Fields

The following accessible fields have been defined:

static String[] sect_strings
List of section strings which may be used for sorting by section if defined.
static int sort_opt
Sort option:
= 0, Use sort key
= 1, Use section (if sect_strings defined) and then sort key
public String section
Address book section.
public boolean mult
Single/multiple individuals entry:
= true, multiple
= false, single
public String sort_key
Key string for sorting.
public String address
public String post_code
public Vector<JdlAddressEntryDetails> details
Sets of entry details:
For a single entry there will be one JdlEntryDetails object in the vector. For a multiple entry there will be one JdlEntryDetails object for the entry as a whole plus one for each individual person's entry.
For a single individual entry list will contain just one element.
For a multiple individual entry with 'n' individuals, there will be 'n+1' elements in the vector list. Constructor Introduction

A single constructor is available.


Standard constructor Standard constructor

Constructs an empty address entry object.

Constructor Definition:
public JdlAddressEntry()
Parameters List:
none Class Methods Introduction

Class methods are available to enable the sort requirements for the class to be specified.


Set class section strings - setSectionStrings
Set sort option - setSortOption Set class section strings - setSectionStrings

This method sets a list of the section names which will define the order in which sections of address entries will be sorted.

Method Definition:
public static void setSectionStrings(String[] strs)
Parameters List:
List of sections in required order in which address entries may be sorted. Set sort option - setSortOption

This method sets the current required sort option for the class.

Method Definition:
public static void setSortOption (int opt)
Parameters List:
Sort option:
= 0, Sort using sort key only
= 1, Sort by section (if defined) & within that, sort key Address Entry Strings Introduction

This section contains methods for conversions associated with the storage of address entry data in an XML based address file.


Convert address strings - getAddressEntryLines
Form address entry string - getXMLString Convert address strings - getAddressEntryLines

This method converts Address/Notes strings from the format as stored in an XML address file to the string format required for JdlAddressEntry and JdlAddressEntryDetails objects.

Method Definition:
public static String getAddressEntryLines(String str)
Parameters List:
String from XML file.
Method Return:
The string for the JdlAddressEntry, JdlAddressEntryDetails object fields. Form address entry string - getXMLString

This method forms the string required for an XML address book file (JWC) from the address entry data.

Method Definition:
public String getXMLString(int indent_col, int indent_width)
Parameters List:
Start column number for indentation
No characters indent per column
Method Return:
The string to be written to the file

⇑ Up 3   ⇑ Up 2   ⇑ Up 1   ⇑ Top of this