X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbits%2FCell.java;h=3c0eb14a04a4c0969b4a778b6d54050379a2c89d;hb=2b9c27db318b916730aa04f2b41bd3bff795a5dc;hp=f110d3362e6c61b3fe67ff94802d66afc57043c5;hpb=30d336cc33e26af877f7950b93f3b77d9c3a3bd3;p=fanfix.git diff --git a/src/jexer/bits/Cell.java b/src/jexer/bits/Cell.java index f110d33..3c0eb14 100644 --- a/src/jexer/bits/Cell.java +++ b/src/jexer/bits/Cell.java @@ -33,7 +33,7 @@ package jexer.bits; /** * This class represents a single text cell on the screen. */ -public class Cell extends CellAttributes { +public final class Cell extends CellAttributes { /** * The character at this cell. @@ -45,7 +45,7 @@ public class Cell extends CellAttributes { * * @return cell character */ - public final char getChar() { + public char getChar() { return ch; } @@ -54,7 +54,7 @@ public class Cell extends CellAttributes { * * @param ch new cell character */ - public final void setChar(final char ch) { + public void setChar(final char ch) { this.ch = ch; } @@ -62,7 +62,7 @@ public class Cell extends CellAttributes { * Reset this cell to a blank. */ @Override - public final void reset() { + public void reset() { super.reset(); ch = ' '; } @@ -74,7 +74,7 @@ public class Cell extends CellAttributes { * * @return true if this cell has default attributes. */ - public final boolean isBlank() { + public boolean isBlank() { if ((getForeColor().equals(Color.WHITE)) && (getBackColor().equals(Color.BLACK)) && !getBold() @@ -97,7 +97,7 @@ public class Cell extends CellAttributes { * @return true if all fields are equal */ @Override - public final boolean equals(final Object rhs) { + public boolean equals(final Object rhs) { if (!(rhs instanceof Cell)) { return false; } @@ -113,7 +113,7 @@ public class Cell extends CellAttributes { * @param rhs an instance of either Cell or CellAttributes */ @Override - public final void setTo(final Object rhs) { + public void setTo(final Object rhs) { // Let this throw a ClassCastException CellAttributes thatAttr = (CellAttributes) rhs; super.setTo(thatAttr); @@ -129,7 +129,7 @@ public class Cell extends CellAttributes { * * @param that a CellAttributes instance */ - public final void setAttr(final CellAttributes that) { + public void setAttr(final CellAttributes that) { super.setTo(that); } @@ -161,7 +161,7 @@ public class Cell extends CellAttributes { * @return displayable String */ @Override - public final String toString() { + public String toString() { return String.format("fore: %d back: %d bold: %s blink: %s ch %c", getForeColor(), getBackColor(), getBold(), getBlink(), ch); }