3.7.11 - Address Entry - JdlAddressEntry

John W. Campbell

3.7.11.1 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
Constructor
Class Methods
Address Entry Strings

3.7.11.2 Class Details

Package:
Jdl.JdlView;
Class name:
JdlAddressEntry
Class definition:
public class JdlAddressEntry
Extends:
Object
Implements:
Cloneable
Comparable
Actions:
none

3.7.11.3 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
Address.
public String post_code
PostCode.
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.

3.7.11.4 Constructor

3.7.11.4.1 Introduction

A single constructor is available.

Constructor:

Standard constructor

3.7.11.4.2 Standard constructor

Constructs an empty address entry object.

Constructor Definition:
public JdlAddressEntry()
Parameters List:
none

3.7.11.5 Class Methods

3.7.11.5.1 Introduction

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

Methods:

Set class section strings - setSectionStrings
Set sort option - setSortOption

3.7.11.5.2 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:
strs
List of sections in required order in which address entries may be sorted.

3.7.11.5.3 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:
opt
Sort option:
= 0, Sort using sort key only
= 1, Sort by section (if defined) & within that, sort key

3.7.11.6 Address Entry Strings

3.7.11.6.1 Introduction

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

Methods:

Convert address strings - getAddressEntryLines
Form address entry string - getXMLString

3.7.11.6.2 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:
str
String from XML file.
Method Return:
The string for the JdlAddressEntry, JdlAddressEntryDetails object fields.

3.7.11.6.3 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:
indent_col
Start column number for indentation
indent_width
No characters indent per column
Method Return:
The string to be written to the file

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