Class ValueInfoCellRenderer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TableCellRenderer

public class ValueInfoCellRenderer extends DefaultTableCellRenderer
A TableCellRenderer which does its rendering according to a ValueInfo object which describes the values which it is expected to have to render.
Author:
Mark Taylor (Starlink)
See Also:
  • Constructor Details

    • ValueInfoCellRenderer

      public ValueInfoCellRenderer(ValueInfo vinfo)
      Constructs a renderer from a ValueInfo object.
      Parameters:
      vinfo - the info describing the type of object to be rendered
  • Method Details

    • setValue

      protected void setValue(Object value)
      Sets the state of this renderer, overriding the method in DefaultTableCellRenderer to provide more intelligent behaviour.

      Subclasses note: the work is done by invoking this object's setText and/or setIcon methods (remember this object is a javax.swing.JLabel).

      Overrides:
      setValue in class DefaultTableCellRenderer
      Parameters:
      value - the value to be rendered
    • setMaxLength

      public void setMaxLength(int maxLength)
      Sets the length in characters at which cell value representations will be truncated.
      Parameters:
      maxLength - the maximum number of characters to write into a cell
    • getMaxLength

      public int getMaxLength()
      Gets the length in characters at which cell value representations will be truncated.
      Returns:
      the maximum number of characters to be written into a cell