+ private Color backColor;
+
+ /**
+ * 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() {
+ reset();
+ }
+
+ /**
+ * Public constructor makes a copy from another instance.
+ *
+ * @param that another CellAttributes instance
+ * @see #reset()
+ */
+ public CellAttributes(final CellAttributes that) {
+ setTo(that);
+ }
+
+ // ------------------------------------------------------------------------
+ // CellAttributes ---------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Getter for bold.
+ *
+ * @return bold value
+ */
+ public final boolean isBold() {
+ return bold;
+ }
+
+ /**
+ * Setter for bold.
+ *
+ * @param bold new bold value
+ */
+ public final void setBold(final boolean bold) {
+ this.bold = bold;
+ }
+
+ /**
+ * Getter for blink.
+ *
+ * @return blink value
+ */
+ public final boolean isBlink() {
+ return blink;
+ }
+
+ /**
+ * Setter for blink.
+ *
+ * @param blink new blink value
+ */
+ public final void setBlink(final boolean blink) {
+ this.blink = blink;
+ }
+
+ /**
+ * Getter for reverse.
+ *
+ * @return reverse value
+ */
+ public final boolean isReverse() {
+ return reverse;
+ }
+
+ /**
+ * Setter for reverse.
+ *
+ * @param reverse new reverse value
+ */
+ public final void setReverse(final boolean reverse) {
+ this.reverse = reverse;
+ }
+
+ /**
+ * Getter for underline.
+ *
+ * @return underline value
+ */
+ public final boolean isUnderline() {
+ return underline;
+ }
+
+ /**
+ * Setter for underline.
+ *
+ * @param underline new underline value
+ */
+ public final void setUnderline(final boolean underline) {
+ this.underline = underline;
+ }
+
+ /**
+ * Getter for protect.
+ *
+ * @return protect value
+ */
+ public final boolean isProtect() {
+ return protect;
+ }
+
+ /**
+ * Setter for protect.
+ *
+ * @param protect new protect value
+ */
+ public final void setProtect(final boolean protect) {
+ this.protect = protect;
+ }
+
+ /**
+ * Getter for foreColor.
+ *
+ * @return foreColor value
+ */
+ public final Color getForeColor() {
+ return foreColor;
+ }
+
+ /**
+ * Setter for foreColor.
+ *
+ * @param foreColor new foreColor value
+ */
+ public final void setForeColor(final Color foreColor) {
+ this.foreColor = foreColor;
+ }
+
+ /**
+ * Getter for backColor.
+ *
+ * @return backColor value
+ */
+ public final Color getBackColor() {
+ return backColor;
+ }