+ private static final int BOLD = 0x01;
+
+ /**
+ * Blink attribute.
+ */
+ private static final int BLINK = 0x02;
+
+ /**
+ * Reverse attribute.
+ */
+ private static final int REVERSE = 0x04;
+
+ /**
+ * Underline attribute.
+ */
+ private static final int UNDERLINE = 0x08;
+
+ /**
+ * Protected attribute.
+ */
+ private static final int PROTECT = 0x10;
+
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Boolean flags.
+ */
+ private int flags = 0;
+
+ /**
+ * Foreground color. Color.WHITE, Color.RED, etc.
+ */
+ private Color foreColor = Color.WHITE;
+
+ /**
+ * Background color. Color.WHITE, Color.RED, etc.
+ */
+ private Color backColor = Color.BLACK;
+
+ /**
+ * Foreground color as 24-bit RGB value. Negative value means not set.
+ */
+ private int foreColorRGB = -1;
+
+ /**
+ * Background color as 24-bit RGB value. Negative value means not set.
+ */
+ private int backColorRGB = -1;
+
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Public constructor sets default values of the cell to white-on-black,
+ * no bold/blink/reverse/underline/protect.
+ *
+ * @see #reset()
+ */
+ public CellAttributes() {
+ // NOP
+ }
+
+ /**
+ * Public constructor makes a copy from another instance.
+ *
+ * @param that another CellAttributes instance
+ * @see #reset()
+ */
+ public CellAttributes(final CellAttributes that) {
+ setTo(that);
+ }
+
+ // ------------------------------------------------------------------------
+ // CellAttributes ---------------------------------------------------------
+ // ------------------------------------------------------------------------