Commit | Line | Data |
---|---|---|
e119a1c1 NR |
1 | package be.nikiroo.jvcard.resources.enums; |
2 | ||
3 | import java.io.IOException; | |
4 | import java.io.Writer; | |
5 | ||
6 | import be.nikiroo.jvcard.resources.Meta; | |
7 | import be.nikiroo.jvcard.resources.Bundles.Bundle; | |
8 | ||
9 | /** | |
10 | * Represent an element that can be coloured (foreground/background colours). | |
11 | * | |
12 | * @author niki | |
13 | * | |
14 | */ | |
15 | public enum ColorOption { | |
16 | @Meta(what = "", where = "", format = "colour", info = "") | |
17 | DEFAULT, // | |
18 | ||
19 | @Meta(what = "", where = "", format = "colour", info = "") | |
20 | TITLE_MAIN, // | |
21 | @Meta(what = "", where = "", format = "colour", info = "") | |
22 | TITLE_VARIABLE, // | |
23 | @Meta(what = "", where = "", format = "colour", info = "") | |
24 | TITLE_COUNT, // | |
25 | ||
26 | @Meta(what = "", where = "", format = "colour", info = "") | |
27 | ACTION_KEY, // | |
28 | @Meta(what = "", where = "", format = "colour", info = "") | |
29 | ACTION_DESC, // | |
30 | ||
31 | @Meta(what = "", where = "", format = "colour", info = "") | |
32 | LINE_MESSAGE, // | |
33 | @Meta(what = "", where = "", format = "colour", info = "") | |
34 | LINE_MESSAGE_ERR, // | |
35 | @Meta(what = "", where = "", format = "colour", info = "") | |
36 | LINE_MESSAGE_QUESTION, // | |
37 | @Meta(what = "", where = "", format = "colour", info = "") | |
38 | LINE_MESSAGE_ANS, // | |
39 | ||
40 | @Meta(what = "", where = "", format = "colour", info = "") | |
41 | CONTACT_LINE, // | |
42 | @Meta(what = "", where = "", format = "colour", info = "") | |
43 | CONTACT_LINE_SEPARATOR, // | |
44 | @Meta(what = "", where = "", format = "colour", info = "") | |
45 | CONTACT_LINE_SELECTED, // | |
46 | @Meta(what = "", where = "", format = "colour", info = "") | |
47 | CONTACT_LINE_SEPARATOR_SELECTED, // | |
48 | @Meta(what = "", where = "", format = "colour", info = "") | |
49 | CONTACT_LINE_DIRTY, // | |
50 | @Meta(what = "", where = "", format = "colour", info = "") | |
51 | CONTACT_LINE_DIRTY_SELECTED, // | |
52 | ||
53 | @Meta(what = "", where = "", format = "colour", info = "") | |
54 | VIEW_CONTACT_NAME, // | |
55 | @Meta(what = "", where = "", format = "colour", info = "") | |
56 | VIEW_CONTACT_NORMAL, // | |
57 | @Meta(what = "", where = "", format = "colour", info = "") | |
58 | VIEW_CONTACT_HIGHLIGHT, // | |
59 | @Meta(what = "", where = "", format = "colour", info = "") | |
60 | VIEW_CONTACT_NOTES_TITLE, // | |
61 | ||
62 | ; | |
63 | ||
64 | /** | |
65 | * Write the header found in the configuration <tt>.properties</tt> file of | |
66 | * this {@link Bundle}. | |
67 | * | |
68 | * @param writer | |
69 | * the {@link Writer} to write the header in | |
70 | * | |
71 | * @throws IOException | |
72 | * in case of IO error | |
73 | */ | |
74 | static public void writeHeader(Writer writer) throws IOException { | |
75 | writer.write("# Application colours\n"); | |
76 | writer.write("# \n"); | |
77 | writer.write("# Note that you can define a colour in one of those 3 ways:\n"); | |
78 | writer.write("# - WHITE: one of the ANSI colour names, in upper case\n"); | |
79 | writer.write("# - @RRGGBB: a RGB code we will try to match using one of the 256 Terminal colours\n"); | |
80 | writer.write("# - #RRGGBB: an exact RGB colour (please make sure your terminal supports this)\n"); | |
81 | writer.write("# - 255: one of the 256 indexed colours of the terminal (the 16 first colours are theme-based) \n"); | |
82 | writer.write("# \n"); | |
83 | writer.write("# ...and thus either for xxx_FG (foreground colour) or xxx_BG (background colour)\n"); | |
84 | writer.write("# \n"); | |
85 | } | |
86 | } |