X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FColorTheme.java;h=eaa351cb12d7b2d5e86011ddb17bd24f04f04395;hb=3649b9210ea425f398ba8c24f9509669cf72aa96;hp=a8c0c899ce32f27ff038f3cbabe3b3a344617c2e;hpb=329fd62e4acdaa8e9f4cccd518d47c0b07e79f51;p=fanfix.git diff --git a/src/jexer/bits/ColorTheme.java b/src/jexer/bits/ColorTheme.java index a8c0c89..eaa351c 100644 --- a/src/jexer/bits/ColorTheme.java +++ b/src/jexer/bits/ColorTheme.java @@ -34,6 +34,9 @@ import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; import java.util.SortedMap; import java.util.StringTokenizer; import java.util.TreeMap; @@ -68,6 +71,18 @@ public final class ColorTheme { return attr; } + /** + * Retrieve all the names in the theme. + * + * @return a list of names + */ + public List getColorNames() { + Set keys = colors.keySet(); + List names = new ArrayList(keys.size()); + names.addAll(keys); + return names; + } + /** * Set the color for a named theme color. * @@ -241,7 +256,7 @@ public final class ColorTheme { color.setBold(false); colors.put("tbutton.inactive", color); color = new CellAttributes(); - color.setForeColor(Color.WHITE); + color.setForeColor(Color.CYAN); color.setBackColor(Color.GREEN); color.setBold(true); colors.put("tbutton.active", color); @@ -402,27 +417,27 @@ public final class ColorTheme { color.setBold(true); colors.put("ttreeview.inactive", color); - // TText text + // TList color = new CellAttributes(); color.setForeColor(Color.WHITE); color.setBackColor(Color.BLUE); color.setBold(false); - colors.put("tdirectorylist", color); + colors.put("tlist", color); color = new CellAttributes(); color.setForeColor(Color.BLACK); color.setBackColor(Color.CYAN); color.setBold(false); - colors.put("tdirectorylist.selected", color); + colors.put("tlist.selected", color); color = new CellAttributes(); color.setForeColor(Color.BLACK); color.setBackColor(Color.CYAN); color.setBold(false); - colors.put("tdirectorylist.unreadable", color); + colors.put("tlist.unreadable", color); color = new CellAttributes(); color.setForeColor(Color.BLACK); color.setBackColor(Color.BLUE); color.setBold(true); - colors.put("tdirectorylist.inactive", color); + colors.put("tlist.inactive", color); // TEditor color = new CellAttributes();