public class Cell
extends java.lang.Object
Grid
.Modifier and Type | Class and Description |
---|---|
static class |
Cell.State
This enumerates the possible states for a Cell to have.
|
Constructor and Description |
---|
Cell(int index,
java.lang.String key,
Cell.State state)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getDisabled()
Gets whether or not the Cell is disabled.
|
int |
getIndex()
Gets the index of the Cell in the Grid.
|
boolean |
getInvalid()
Gets whether or not the Cell is invalid.
|
java.lang.String |
getKey()
Gets the key associated with the Cell (usually "row:column").
|
boolean |
getSelected()
Gets whether or not the Cell is currently selected.
|
Cell.State |
getState()
Gets the current state of the Cell.
|
void |
setSelected(boolean selected)
Sets whether or not the Cell is currently selected.
|
void |
setState(Cell.State state) |
public Cell(int index, java.lang.String key, Cell.State state)
index
- The index of the Cell in the Grid.key
- The key associated with the Cell (usually "row:column").state
- Whether or not the Cell is selected.public int getIndex()
public java.lang.String getKey()
public boolean getSelected()
public boolean getDisabled()
public boolean getInvalid()
public void setState(Cell.State state)
public void setSelected(boolean selected)
selected
- The Cell's selection.public Cell.State getState()