public class TextCell extends GridObject
TextCell object encapsulates text to go in a
cell in a grid.| Constructor and Description |
|---|
TextCell(java.lang.String text)
Constructs a text cell with the specified text and a default color
of black.
|
TextCell(java.lang.String text,
java.awt.Color textColor)
Constructs a text cell with the specified text and color.
|
TextCell(java.lang.String text,
java.awt.Color textColor,
Grid grid,
Location loc)
Constructs a text cell at a given location of a grid with the
specified text and color.
|
TextCell(java.lang.String text,
Grid grid,
Location loc)
Constructs a text cell at a given location of a grid with the
specified text and a default color of black.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
color()
Gets color of text.
|
java.lang.String |
text()
Gets text in this text cell.
|
act, addToGrid, changeLocation, grid, isInAGrid, location, removeFromGrid, theGridObjectInvariantHolds, toStringpublic TextCell(java.lang.String text)
text - the text to go in this cellpublic TextCell(java.lang.String text,
java.awt.Color textColor)
text - the text to go in this celltextColor - the color of the textpublic TextCell(java.lang.String text,
Grid grid,
Location loc)
text - the text to go in this cellgrid - the grid containing this text cellloc - the location of the text cell in gridpublic TextCell(java.lang.String text,
java.awt.Color textColor,
Grid grid,
Location loc)
text - the text to go in this celltextColor - the color of the textgrid - the grid containing this text cellloc - the location of the text cell in grid