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 | import be.nikiroo.utils.resources.Meta.Format; | |
e119a1c1 NR |
8 | |
9 | /** | |
10 | * Represent an element that can be coloured (foreground/background colours). | |
11 | * | |
12 | * @author niki | |
f06c8100 | 13 | * |
e119a1c1 NR |
14 | */ |
15 | public enum ColorOption { | |
f06c8100 | 16 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
17 | DEFAULT, // |
18 | ||
f06c8100 | 19 | @Meta(format = Format.COLOR) |
e119a1c1 | 20 | TITLE_MAIN, // |
f06c8100 | 21 | @Meta(format = Format.COLOR) |
e119a1c1 | 22 | TITLE_VARIABLE, // |
f06c8100 | 23 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
24 | TITLE_COUNT, // |
25 | ||
f06c8100 | 26 | @Meta(format = Format.COLOR) |
e119a1c1 | 27 | ACTION_KEY, // |
f06c8100 | 28 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
29 | ACTION_DESC, // |
30 | ||
f06c8100 | 31 | @Meta(format = Format.COLOR) |
e119a1c1 | 32 | LINE_MESSAGE, // |
f06c8100 | 33 | @Meta(format = Format.COLOR) |
e119a1c1 | 34 | LINE_MESSAGE_ERR, // |
f06c8100 | 35 | @Meta(format = Format.COLOR) |
e119a1c1 | 36 | LINE_MESSAGE_QUESTION, // |
f06c8100 | 37 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
38 | LINE_MESSAGE_ANS, // |
39 | ||
f06c8100 | 40 | @Meta(format = Format.COLOR) |
e119a1c1 | 41 | CONTACT_LINE, // |
f06c8100 | 42 | @Meta(format = Format.COLOR) |
e119a1c1 | 43 | CONTACT_LINE_SEPARATOR, // |
f06c8100 | 44 | @Meta(format = Format.COLOR) |
e119a1c1 | 45 | CONTACT_LINE_SELECTED, // |
f06c8100 | 46 | @Meta(format = Format.COLOR) |
e119a1c1 | 47 | CONTACT_LINE_SEPARATOR_SELECTED, // |
f06c8100 | 48 | @Meta(format = Format.COLOR) |
e119a1c1 | 49 | CONTACT_LINE_DIRTY, // |
f06c8100 | 50 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
51 | CONTACT_LINE_DIRTY_SELECTED, // |
52 | ||
f06c8100 | 53 | @Meta(format = Format.COLOR) |
e119a1c1 | 54 | VIEW_CONTACT_NAME, // |
f06c8100 | 55 | @Meta(format = Format.COLOR) |
e119a1c1 | 56 | VIEW_CONTACT_NORMAL, // |
f06c8100 | 57 | @Meta(format = Format.COLOR) |
e119a1c1 | 58 | VIEW_CONTACT_HIGHLIGHT, // |
f06c8100 | 59 | @Meta(format = Format.COLOR) |
e119a1c1 NR |
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 | } |