X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FCell.java;h=56633e779b245a0b2ba90df3e34d7d51414af851;hb=d36057dfab8def933a64be042b039d76708ac5ba;hp=fd347be9ef97ba3e64c5cb70936ce259bfe5f6e1;hpb=a2018e9964f6c58742cd1e6dd0a0c63e244a89d6;p=fanfix.git diff --git a/src/jexer/bits/Cell.java b/src/jexer/bits/Cell.java index fd347be..56633e7 100644 --- a/src/jexer/bits/Cell.java +++ b/src/jexer/bits/Cell.java @@ -33,11 +33,45 @@ package jexer.bits; */ public final class Cell extends CellAttributes { + // ------------------------------------------------------------------------ + // Variables -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * The character at this cell. */ private char ch; + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ + + /** + * Public constructor sets default values of the cell to blank. + * + * @see #isBlank() + * @see #reset() + */ + public Cell() { + reset(); + } + + /** + * Public constructor sets the character. Attributes are the same as + * default. + * + * @param ch character to set to + * @see #reset() + */ + public Cell(final char ch) { + reset(); + this.ch = ch; + } + + // ------------------------------------------------------------------------ + // Cell ------------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Getter for cell character. * @@ -149,28 +183,6 @@ public final class Cell extends CellAttributes { super.setTo(that); } - /** - * Public constructor sets default values of the cell to blank. - * - * @see #isBlank() - * @see #reset() - */ - public Cell() { - reset(); - } - - /** - * Public constructor sets the character. Attributes are the same as - * default. - * - * @param ch character to set to - * @see #reset() - */ - public Cell(final char ch) { - reset(); - this.ch = ch; - } - /** * Make human-readable description of this Cell. * @@ -178,7 +190,7 @@ public final class Cell extends CellAttributes { */ @Override public String toString() { - return String.format("fore: %d back: %d bold: %s blink: %s ch %c", + return String.format("fore: %s back: %s bold: %s blink: %s ch %c", getForeColor(), getBackColor(), isBold(), isBlink(), ch); } }