git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#49 cell attributes to int
[fanfix.git]
/
src
/
jexer
/
bits
/
Cell.java
diff --git
a/src/jexer/bits/Cell.java
b/src/jexer/bits/Cell.java
index 4be433c7d33d8d05201fd6d3b869ff37e06cfa54..c949c3e36c147efb830f019f988225df966974cf 100644
(file)
--- a/
src/jexer/bits/Cell.java
+++ b/
src/jexer/bits/Cell.java
@@
-73,7
+73,7
@@
public final class Cell extends CellAttributes {
/**
* The character at this cell.
*/
/**
* The character at this cell.
*/
- private char ch;
+ private char ch
= ' '
;
/**
* The display width of this cell.
/**
* The display width of this cell.
@@
-94,7
+94,7
@@
public final class Cell extends CellAttributes {
* The background color used for the area the image portion might not
* cover.
*/
* 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
/**
* hashCode() needs to call image.hashCode(), which can get quite
@@
-119,7
+119,7
@@
public final class Cell extends CellAttributes {
* @see #reset()
*/
public Cell() {
* @see #reset()
*/
public Cell() {
- reset();
+ // NOP
}
/**
}
/**
@@
-130,7
+130,17
@@
public final class Cell extends CellAttributes {
* @see #reset()
*/
public Cell(final char ch) {
* @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;
}
this.ch = ch;
}