+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Construct a word with one character.
+ *
+ * @param ch the first character of the word
+ * @param defaultColor the color for unhighlighted text
+ * @param highlighter the highlighter to use
+ */
+ public Word(final int ch, final CellAttributes defaultColor,
+ final Highlighter highlighter) {
+
+ this.defaultColor = defaultColor;
+ this.highlighter = highlighter;
+ text.append(Character.toChars(ch));
+ }
+
+ /**
+ * Construct a word with an empty string.
+ *
+ * @param defaultColor the color for unhighlighted text
+ * @param highlighter the highlighter to use
+ */
+ public Word(final CellAttributes defaultColor,
+ final Highlighter highlighter) {
+
+ this.defaultColor = defaultColor;
+ this.highlighter = highlighter;
+ }
+
+ // ------------------------------------------------------------------------
+ // Word -------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+