Class Table.DefaultCellMessage<C>

Type Parameters:
C - The type of value in the cell.
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Component, Displayable, InfoModel, LabelModel, Model, PresentationModel, DepictedObject
Enclosing class:
Table

public static class Table.DefaultCellMessage<C> extends Message
A message model that returns a default representation of the cell in a message.
Author:
Garret Wilson
  • Constructor Details

    • DefaultCellMessage

      public DefaultCellMessage(TableModel tableModel, TableModel.Cell<C> cell, Converter<? super C,String> converter)
      Constructs a default message for a cell.
      Parameters:
      tableModel - The table model of the cell.
      cell - The cell being represented.
      converter - The converter to use for displaying the value as a string.
      Throws:
      NullPointerException - if the given session, table model and/or cell is null.
  • Method Details

    • getTableModel

      protected TableModel getTableModel()
      Returns:
      The table model of the cell.
    • getCell

      protected TableModel.Cell<C> getCell()
      Returns:
      The cell being represented
    • getConverter

      public Converter<? super C,String> getConverter()
      Returns:
      The converter to use for displaying the value as a string.
    • getMessage

      public String getMessage()

      This implementation returns a message with a string value of the given value using the installed converter, if no message has been explicitly set.

      Overrides:
      getMessage in class Message
      Returns:
      The message text, which may include a resource reference, or null if there is no message text.
      See Also: