edu.kzoo.grid
Class TextCell

java.lang.Object
  |
  +--edu.kzoo.grid.GridObject
        |
        +--edu.kzoo.grid.TextCell

public class TextCell
extends GridObject

Grid Container Package:
A TextCell object encapsulates text to go in a cell in a grid.

Version:
13 December 2003
Author:
Alyce Brady
See Also:
Grid, Location

Constructor Summary
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.
 
Method Summary
 java.awt.Color color()
          Gets color of text.
 java.lang.String text()
          Gets text in this text cell.
 
Methods inherited from class edu.kzoo.grid.GridObject
act, addToGrid, changeLocation, grid, isInAGrid, location, removeFromGrid, theGridObjectInvariantHolds, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextCell

public TextCell(java.lang.String text)
Constructs a text cell with the specified text and a default color of black.

Parameters:
text - the text to go in this cell

TextCell

public TextCell(java.lang.String text,
                java.awt.Color textColor)
Constructs a text cell with the specified text and color.

Parameters:
text - the text to go in this cell
textColor - the color of the text

TextCell

public 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.

Parameters:
text - the text to go in this cell
grid - the grid containing this text cell
loc - the location of the text cell in grid

TextCell

public 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.

Parameters:
text - the text to go in this cell
textColor - the color of the text
grid - the grid containing this text cell
loc - the location of the text cell in grid
Method Detail

text

public java.lang.String text()
Gets text in this text cell.


color

public java.awt.Color color()
Gets color of text.