java.lang.Object
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.cell.AbstractCell<T>
All Implemented Interfaces:
Cell<T>, Control
Direct Known Subclasses:
AbstractListCell, AbstractTextCell

public abstract class AbstractCell<T> extends AbstractControl implements Cell<T>
Base implementation of a Cell.
  • Constructor Details

    • AbstractCell

      public AbstractCell(T item)
  • Method Details

    • getItem

      public T getItem()
      Description copied from interface: Cell
      Get item bound to a cell.
      Specified by:
      getItem in interface Cell<T>
      Returns:
      item bound to a cell
    • setItem

      public void setItem(T item)
      Description copied from interface: Cell
      Sets an item to bound into a cell.
      Specified by:
      setItem in interface Cell<T>
      Parameters:
      item - item to bound into a cell
    • setStyle

      public void setStyle(int style)
      Description copied from interface: Cell
      Sets a style.
      Specified by:
      setStyle in interface Cell<T>
      Parameters:
      style - the style
    • setForegroundColor

      public void setForegroundColor(int foregroundColor)
      Description copied from interface: Cell
      Sets a foreground color.
      Specified by:
      setForegroundColor in interface Cell<T>
      Parameters:
      foregroundColor - the background color
    • setBackgroundColor

      public void setBackgroundColor(int backgroundColor)
      Description copied from interface: Cell
      Sets a background color.
      Specified by:
      setBackgroundColor in interface Cell<T>
      Parameters:
      backgroundColor - the background color
    • getStyle

      public int getStyle()
    • getForegroundColor

      public int getForegroundColor()
    • getBackgroundColor

      public int getBackgroundColor()
    • draw

      public void draw(Screen screen)
      Description copied from interface: Control
      Draw Control into a Screen.
      Specified by:
      draw in interface Control
      Parameters:
      screen - the screen
    • drawBackground

      protected void drawBackground(Screen screen)
    • drawContent

      protected void drawContent(Screen screen)