/**
* The character at this cell.
*/
- private char ch;
+ private char ch = ' ';
/**
* The display width of this cell.
* The background color used for the area the image portion might not
* cover.
*/
- private Color background = null;
+ private Color background = Color.BLACK;
/**
* hashCode() needs to call image.hashCode(), which can get quite
* @see #reset()
*/
public Cell() {
- reset();
+ // NOP
}
/**
* @see #reset()
*/
public Cell(final char ch) {
- reset();
this.ch = ch;
}
+ /**
+ * Public constructor sets the character and attributes.
+ *
+ * @param ch character to set to
+ * @param attr attributes to use
+ */
+ public Cell(final char ch, final CellAttributes attr) {
+ super(attr);
+ this.ch = ch;
+ }
+
+ /**
+ * Public constructor creates a duplicate.
+ *
+ * @param cell the instance to copy
+ */
+ public Cell(final Cell cell) {
+ setTo(cell);
+ }
+
// ------------------------------------------------------------------------
// Cell -------------------------------------------------------------------
// ------------------------------------------------------------------------
/**
* Setter for cell width.
*
- * @param ch new cell width, one of Width.SINGLE, Width.LEFT, or
+ * @param width new cell width, one of Width.SINGLE, Width.LEFT, or
* Width.RIGHT
*/
public void setWidth(final Width width) {