John W. Campbell
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
- Package:
- Jdl.JdlView;
- Class name:
- JdlAddressEntry
- Class definition:
- public class JdlAddressEntry
- Extends:
- Object
- Implements:
- Cloneable
Comparable
- Actions:
- none
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.
A single constructor is available.
Constructor:
Standard constructor
Constructs an empty address entry object.
- Constructor Definition:
- public JdlAddressEntry()
- Parameters List:
- none
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
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.
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
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
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.
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