com.jscape.inet.terminal

## Class Cell

- java.lang.Object
- - com.jscape.inet.terminal.Cell

-     public class Cell
      extends java.lang.Object

  Represents screen cell. Contains char value with attributes and boolean flag which shows if this object has tabstop. May be used for further screen rendering. This class uses shared attributes represented by `CellAttributes` class to reduce memory usage (pattern "Flyweight" [Gamma94]).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Cell()` Creates `Cell` object having '\000' value with default attributes.
    `Cell(Cell cell)` Copy constructor.
    `Cell(char value)` Creates `Cell` object giving it's value.
    `Cell(char value, CellAttributes attributes)` Creates `Cell` object giving value and attributes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CellAttributes` | `getAttributes()` Returns current attributes of `Cell` object.
    `char` | `getValue()` Returns current value of `Cell` object.
    `boolean` | `isTabstop()` Checks if this `Cell` object has tabstop.
    `void` | `reset()` Resets value and attributes to default.
    `void` | `setAttributes(CellAttributes attributes)` Sets current `Cell` object attributes.
    `void` | `setTabstop(boolean tabstop)` Sets tabstop to this `Cell` object.
    `void` | `setValue(char value)` Sets value of `Cell` object.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Cell

          public Cell(char value,
                      CellAttributes attributes)

      Creates `Cell` object giving value and attributes.
      Parameters:
        `value` - char value of created `Cell` object.
        `attributes` - `Cell` object attributes.

    - #### Cell

          public Cell(char value)

      Creates `Cell` object giving it's value.
      Parameters:
        `value` - char value of created `Cell` object.

    - #### Cell

          public Cell()

      Creates `Cell` object having '\000' value with default attributes.

    - #### Cell

          public Cell(Cell cell)

      Copy constructor.
      Parameters:
        `cell` - `Cell` object to be copied.

  - ### Method Detail

    - #### reset

          public void reset()

      Resets value and attributes to default.

    - #### getValue

          public char getValue()

      Returns current value of `Cell` object.
      Returns:
        char value of this object.

    - #### setValue

          public void setValue(char value)

      Sets value of `Cell` object.
      Parameters:
        `value` - new char value.

    - #### getAttributes

          public CellAttributes getAttributes()

      Returns current attributes of `Cell` object.
      Returns:
        `CellAttributes` object that represent current `Cell` object attributes.

    - #### setAttributes

          public void setAttributes(CellAttributes attributes)

      Sets current `Cell` object attributes.
      Parameters:
        `attributes` - `CellAttributes` object that must be used.

    - #### isTabstop

          public boolean isTabstop()

      Checks if this `Cell` object has tabstop.
      Returns:
        true if if this `Cell` object has tabstop.

    - #### setTabstop

          public void setTabstop(boolean tabstop)

      Sets tabstop to this `Cell` object.
      Parameters:
        `tabstop` - true if this `Cell` object must have tabstop.

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved