X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Ftui%2FUiColors.java;h=0a4696888e5e37278f07443da336690d0ce10038;hb=3634193b7a8927e68a3ae3d38fff4f6bd36c4ee5;hp=5c5d01eebcf32e3f1611a3daece2f14ae30f3d18;hpb=176a83279a5aafb7e44cc7c34bf78f0bc35225fe;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/tui/UiColors.java b/src/be/nikiroo/jvcard/tui/UiColors.java index 5c5d01e..0a46968 100644 --- a/src/be/nikiroo/jvcard/tui/UiColors.java +++ b/src/be/nikiroo/jvcard/tui/UiColors.java @@ -22,7 +22,6 @@ public class UiColors { private ResourceBundle bundle = null; private Map colorMap = null; - private boolean utf = true; private UiColors() { colorMap = new HashMap(); @@ -42,7 +41,7 @@ public class UiColors { ACTION_KEY, ACTION_DESC, // LINE_MESSAGE, LINE_MESSAGE_ERR, LINE_MESSAGE_QUESTION, LINE_MESSAGE_ANS, // CONTACT_LINE, CONTACT_LINE_SEPARATOR, CONTACT_LINE_SELECTED, CONTACT_LINE_SEPARATOR_SELECTED, CONTACT_LINE_DIRTY, CONTACT_LINE_DIRTY_SELECTED, // - VIEW_CONTACT_NAME, VIEW_CONTACT_NORMAL, VIEW_CONTACT_NOTES_TITLE, // + VIEW_CONTACT_NAME, VIEW_CONTACT_NORMAL, VIEW_CONTACT_HIGHLIGHT, VIEW_CONTACT_NOTES_TITLE, // ; /** @@ -86,25 +85,6 @@ public class UiColors { } } - /** - * Check if unicode characters should be used. - * - * @return TRUE to allow unicode - */ - public boolean isUnicode() { - return utf; - } - - /** - * Allow or disallow unicode characters in the program. - * - * @param utf - * TRUE to allow unuciode, FALSE to only allow ASCII characters - */ - public void setUnicode(boolean utf) { - this.utf = utf; - } - /** * Create a new {@link Label} with the colours of the given {@link Element}. * @@ -220,6 +200,8 @@ public class UiColors { int g = Integer.parseInt(value.substring(3, 5), 16); int b = Integer.parseInt(value.substring(5, 7), 16); return new TextColor.RGB(r, g, b); + } else if (value.replaceAll("[0-9]*", "").length() == 0) { + return new TextColor.Indexed(Integer.parseInt(value)); } else { return TextColor.ANSI.valueOf(value); }