/**
* The character at this cell.
*/
- private char ch;
+ private int 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
}
/**
* @param ch character to set to
* @see #reset()
*/
- public Cell(final char ch) {
- reset();
+ public Cell(final int ch) {
+ this.ch = ch;
+ }
+
+ /**
+ * Public constructor sets the attributes.
+ *
+ * @param attr attributes to use
+ */
+ public Cell(final CellAttributes attr) {
+ super(attr);
+ }
+
+ /**
+ * Public constructor sets the character and attributes.
+ *
+ * @param ch character to set to
+ * @param attr attributes to use
+ */
+ public Cell(final int ch, final CellAttributes attr) {
+ super(attr);
this.ch = ch;
}
*
* @return cell character
*/
- public char getChar() {
+ public int getChar() {
return ch;
}
*
* @param ch new cell character
*/
- public void setChar(final char ch) {
+ public void setChar(final int ch) {
this.ch = ch;
}