Commit | Line | Data |
---|---|---|
f06c8100 | 1 | package be.nikiroo.jvcard.resources; |
e119a1c1 NR |
2 | |
3 | import java.io.IOException; | |
4 | import java.io.Writer; | |
5 | ||
f06c8100 NR |
6 | import be.nikiroo.utils.resources.Meta; |
7 | ||
e119a1c1 NR |
8 | |
9 | public enum DisplayOption { | |
f06c8100 | 10 | @Meta( info = "comma-separated list of CLF", description = "The format of each line in the contact list") |
e119a1c1 | 11 | CONTACT_LIST_FORMAT, // |
f06c8100 | 12 | @Meta( info = "CDIF", description = "The list of details to show in View Contact mode") |
e119a1c1 | 13 | CONTACT_DETAILS_INFO, // |
f06c8100 | 14 | @Meta( info = "Integer or nothing for auto", description = "The size of the details' labels") |
e119a1c1 | 15 | CONTACT_DETAILS_LABEL_WIDTH, // |
f06c8100 | 16 | @Meta( info = "CLF", description = "The default value of FN if it is not present") |
e119a1c1 | 17 | CONTACT_DETAILS_DEFAULT_FN, // |
f06c8100 | 18 | @Meta(info = "TRUE or FALSE", description = "TRUE to force all FNs to be recreated from CONTACT_DETAILS_DEFAULT_FN") |
e119a1c1 NR |
19 | CONTACT_DETAILS_SHOW_COMPUTED_FN, // |
20 | ||
21 | ; | |
22 | ||
23 | /** | |
24 | * Write the header found in the configuration <tt>.properties</tt> file of | |
25 | * this {@link Bundle}. | |
26 | * | |
27 | * @param writer | |
28 | * the {@link Writer} to write the header in | |
29 | * | |
30 | * @throws IOException | |
31 | * in case of IO error | |
32 | */ | |
33 | static public void writeHeader(Writer writer) throws IOException { | |
34 | writer.write("# Display options configuration\n"); | |
35 | writer.write("#\n"); | |
36 | writer.write("# The Contact List Format (CLF) is basically a list of VCF field names\n"); | |
37 | writer.write("# separated by a pipe and optionally parametrised.\n"); | |
38 | writer.write("# The parameters allows you to:\n"); | |
39 | writer.write("# - @x: (the 'x' is the letter 'x') show only a present/not present info\n"); | |
40 | writer.write("# - @n: limit the size to a fixed value 'n'\n"); | |
41 | writer.write("# - @+: expand the size of this field as much as possible\n"); | |
42 | writer.write("#\n"); | |
43 | writer.write("# In case of lists or multiple-fields values, you can select a specific\n"); | |
44 | writer.write("# list or field with:\n"); | |
45 | writer.write("# - FIELD@(0): select the first value in a list\n"); | |
46 | writer.write("# - FIELD@[1]: select the second field in a multiple-fields value\n"); | |
47 | writer.write("#\n"); | |
48 | writer.write("# You can also add a fixed text if it starts with a simple-quote (').\n"); | |
49 | writer.write("#\n"); | |
50 | writer.write("# Example: \"'Contact: |N@10|FN@20|NICK@+|PHOTO@x\"\n"); | |
51 | writer.write("# \n"); | |
52 | writer.write("# \n"); | |
53 | writer.write("# The Contact Details Info Format (CDIF):\n"); | |
54 | writer.write("# - Each detail (separated by a pipe \"|\" character) is visible on its own line\n"); | |
55 | writer.write("# - It is made up of two parts: the label and the linked VCF field (optional),\n"); | |
56 | writer.write("# separated by an equal \"=\", sharp \"#\", plus \"+\" or asterisk \"*\" sign\n"); | |
57 | writer.write("# - \"=FIELD\" will take the preferred value for this field\n"); | |
58 | writer.write("# - \"+FIELD\" will take the preferred value for this field and highlight it\n"); | |
59 | writer.write("# - \"#FIELD\" will take all the values with this field's name\n"); | |
60 | writer.write("# - \"*FIELD\" will take all the values with this field's name, highlighting the preferred one\n"); | |
61 | writer.write("#\n"); | |
62 | writer.write("# Example:\n"); | |
63 | writer.write("# CONTACT_DETAILS_INFO = Phone:=TEL|eMail:=EMAIL\n"); | |
64 | writer.write("#\n"); | |
65 | writer.write("# This will print two lines:\n"); | |
66 | writer.write("# Phone: +32 888 88 88 88\n"); | |
67 | writer.write("# eMail: nobody@nowhere.com\n"); | |
68 | writer.write("#\n"); | |
69 | } | |
70 | } |