X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FCell.java;h=ed3c202a005a8c8a2a4187d08478cf8d62a6191c;hb=c4cefaa04ec122fc02efb6542451a31fdf722c32;hp=c949c3e36c147efb830f019f988225df966974cf;hpb=027de5ae322ef58d3bc74051d3aa20847455361a;p=fanfix.git diff --git a/src/jexer/bits/Cell.java b/src/jexer/bits/Cell.java index c949c3e..ed3c202 100644 --- 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. */ - private char ch = ' '; + private int ch = ' '; /** * The display width of this cell. @@ -129,17 +129,26 @@ public final class Cell extends CellAttributes { * @param ch character to set to * @see #reset() */ - public Cell(final char ch) { + 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 char ch, final CellAttributes attr) { + public Cell(final int ch, final CellAttributes attr) { super(attr); this.ch = ch; } @@ -254,7 +263,7 @@ public final class Cell extends CellAttributes { * * @return cell character */ - public char getChar() { + public int getChar() { return ch; } @@ -263,7 +272,7 @@ public final class Cell extends CellAttributes { * * @param ch new cell character */ - public void setChar(final char ch) { + public void setChar(final int ch) { this.ch = ch; } @@ -410,7 +419,7 @@ public final class Cell extends CellAttributes { int B = 23; int hash = A; hash = (B * hash) + super.hashCode(); - hash = (B * hash) + (int)ch; + hash = (B * hash) + ch; hash = (B * hash) + width.hashCode(); if (image != null) { /*