+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Construct a new Line from an existing text string, and highlight
+ * certain strings.
+ *
+ * @param str the text string
+ * @param defaultColor the color for unhighlighted text
+ * @param highlighter the highlighter to use
+ */
+ public Line(final String str, final CellAttributes defaultColor,
+ final Highlighter highlighter) {
+
+ this.defaultColor = defaultColor;
+ this.highlighter = highlighter;
+ this.rawText = new StringBuilder(str);
+
+ scanLine();
+ }
+
+ /**
+ * Construct a new Line from an existing text string.
+ *
+ * @param str the text string
+ * @param defaultColor the color for unhighlighted text
+ */
+ public Line(final String str, final CellAttributes defaultColor) {
+ this(str, defaultColor, null);
+ }
+
+ // ------------------------------------------------------------------------
+ // Line -------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+