- * Represent an element that can be coloured (foreground/background
- * colours).
- *
- * @author niki
- *
- */
- 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_HIGHLIGHT, VIEW_CONTACT_NOTES_TITLE, //
- ;
-
- /**
- * Get the foreground colour of this element.
- *
- * @return the colour
- */
- public TextColor getForegroundColor() {
- return UiColors.getInstance().getForegroundColor(this);
- }
-
- /**
- * Get the background colour of this element.
- *
- * @return the colour
- */
- public TextColor getBackgroundColor() {
- return UiColors.getInstance().getBackgroundColor(this);
- }
-
- /**
- * Create a new {@link Label} with the colours of this {@link Element}.
- *
- * @param text
- * the text of the {@link Label}
- *
- * @return the new {@link Label}
- */
- public Label createLabel(String text) {
- return UiColors.getInstance().createLabel(this, text);
- }
-
- /**
- * Theme a {@link Label} with the colours of this {@link Element}.
- *
- * @param lbl
- * the {@link Label}
- */
- public void themeLabel(Label lbl) {
- UiColors.getInstance().themeLabel(this, lbl);
- }
- }
-
- /**
- * Create a new {@link Label} with the colours of the given {@link Element}.