X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FColorTheme.java;h=a8c0c899ce32f27ff038f3cbabe3b3a344617c2e;hb=329fd62e4acdaa8e9f4cccd518d47c0b07e79f51;hp=6f406994e8314e494f00646a62b34ff89dabfbdb;hpb=7b5261bc5b641e0769902f014e3b21f61050b02b;p=fanfix.git diff --git a/src/jexer/bits/ColorTheme.java b/src/jexer/bits/ColorTheme.java index 6f40699..a8c0c89 100644 --- a/src/jexer/bits/ColorTheme.java +++ b/src/jexer/bits/ColorTheme.java @@ -1,4 +1,4 @@ -/** +/* * Jexer - Java Text User Interface * * License: LGPLv3 or later @@ -68,6 +68,17 @@ public final class ColorTheme { return attr; } + /** + * Set the color for a named theme color. + * + * @param name theme color name, e.g. "twindow.border" + * @param color the new color to associate with name, e.g. bold yellow on + * blue + */ + public void setColor(final String name, final CellAttributes color) { + colors.put(name, color); + } + /** * Save the color theme mappings to an ASCII file. * @@ -129,6 +140,8 @@ public final class ColorTheme { color.setBackColor(Color.getColor(backColor)); colors.put(key, color); } + // All done. + reader.close(); } /**