+ /**
+ * Double-width line flag.
+ */
+ private boolean doubleWidth = false;
+
+ /**
+ * Double height line flag. Valid values are:
+ *
+ * <p><pre>
+ * 0 = single height
+ * 1 = top half double height
+ * 2 = bottom half double height
+ * </pre>
+ */
+ private int doubleHeight = 0;
+
+ /**
+ * DECSCNM - reverse video. We copy the flag to the line so that
+ * reverse-mode scrollback lines still show inverted colors correctly.
+ */
+ private boolean reverseColor = false;
+
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Public constructor makes a duplicate (deep copy).
+ *
+ * @param line the line to duplicate
+ */
+ public DisplayLine(final DisplayLine line) {
+ chars = new Cell[MAX_LINE_LENGTH];
+ for (int i = 0; i < chars.length; i++) {
+ chars[i] = new Cell(line.chars[i]);
+ }
+ doubleWidth = line.doubleWidth;
+ doubleHeight = line.doubleHeight;
+ reverseColor = line.reverseColor;
+ }
+
+ /**
+ * Public constructor sets everything to drawing attributes.
+ *
+ * @param attr current drawing attributes
+ */
+ public DisplayLine(final CellAttributes attr) {
+ chars = new Cell[MAX_LINE_LENGTH];
+ for (int i = 0; i < chars.length; i++) {
+ chars[i] = new Cell();
+ chars[i].setTo(attr);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // DisplayLine ------------------------------------------------------------
+ // ------------------------------------------------------------------------
+