- public enum Element {
- DEFAULT, //
- TITLE_MAIN, TITLE_VARIABLE, TITLE_COUNT, //
- 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, //
- ;
-
- /**
- * Get the foreground colour of this element.
- *
- * @return the colour
- */
- public TextColor getForegroundColor() {
- return UiColors.getInstance().getForegroundColor(this);
+ static public Theme getCustomTheme() {
+ // Create a properties-theme with our own custom values for some of it
+ Properties properties = new Properties();
+ try {
+ ClassLoader classLoader = AbstractTextGUI.class.getClassLoader();
+ InputStream resourceAsStream = classLoader
+ .getResourceAsStream("default-theme.properties");
+ if (resourceAsStream == null) {
+ resourceAsStream = new FileInputStream(
+ "src/main/resources/default-theme.properties");
+ }
+ properties.load(resourceAsStream);
+ resourceAsStream.close();
+ } catch (IOException e) {