|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcurzez.Cell
A Cell
contains a character and its decoration.
This decoration is:
AbstractWindow
,
as a buffer. Thus all its member are public. And almost all its methods are
package private.
Field Summary | |
Attribute |
attribute
Attribute of the cell. |
BackgroundColor |
background
Background color of this cell. |
int |
character
The character to display. |
ForegroundColor |
foreground
Foreground color of this cell. |
boolean |
hasChanged
Indicates if the cell has changed. |
static Cell |
NULL_CELL
Singleton null cell object. |
Constructor Summary | |
(package private) |
Cell(Cell source)
Copy constructor. |
(package private) |
Cell(int character,
Attribute attribute,
BackgroundColor background,
ForegroundColor foreground)
Creates a new cell with specified decoration and specified character. |
(package private) |
Cell(int character,
Attribute attribute,
BackgroundColor background,
ForegroundColor foreground,
boolean changed)
Creates a new cell. |
Method Summary | |
(package private) void |
copyFrom(int character,
Attribute attribute,
BackgroundColor background,
ForegroundColor foreground)
Copies into this cell given attributes. |
(package private) void |
copyInto(Cell destinationCell)
Copies this to destinationCell . |
boolean |
hasSameDecoration(Cell cell)
Returns true if this and cell
have the same decoration. |
java.lang.String |
toString()
Returns a string representation of this , in the following
form: [ foregorund on background,
attribute ] . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Cell NULL_CELL
public int character
public boolean hasChanged
public Attribute attribute
Attribute
public BackgroundColor background
BackgroundColor
public ForegroundColor foreground
ForegroundColor
Constructor Detail |
Cell(Cell source)
source
- the cell to copy.Cell(int character, Attribute attribute, BackgroundColor background, ForegroundColor foreground, boolean changed)
character
- the character in this cell.attribute
- the attribute to use to paint this cell.background
- the attribute to use to paint this cell.foreground
- the attribute to use to paint this cell.changed
- true
if this cell has changed.Cell(int character, Attribute attribute, BackgroundColor background, ForegroundColor foreground)
character
- the character to use in this cell.attribute
- the attribute to use to paint this cell.background
- the attribute to use to paint this cell.foreground
- the attribute to use to paint this cell.Method Detail |
void copyInto(Cell destinationCell)
this
to destinationCell
.
destinationCell
- the cell where to copy this
.void copyFrom(int character, Attribute attribute, BackgroundColor background, ForegroundColor foreground)
character
- the character to use in this cell.attribute
- the attribute to use to paint this cell.background
- the attribute to use to paint this cell.foreground
- the attribute to use to paint this cell.public boolean hasSameDecoration(Cell cell)
true
if this
and cell
have the same decoration. That is to say foreground color, background
color and attribute.
cell
- the cell to compare this
to.true
if cell
and this
have the same decoration.public java.lang.String toString()
this
, in the following
form: [ foregorund on background,
attribute ]
.
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |