Class DecimalCellRenderer

java.lang.Object
rma.swing.table.RmaCellRenderer
rma.swing.table.DecimalCellRenderer
All Implemented Interfaces:
Serializable, TableCellRenderer, UnitsCellRenderer
Direct Known Subclasses:
PercentageCellRenderer

public class DecimalCellRenderer extends RmaCellRenderer
Renderer for decimal cells with formatting.
See Also:
  • Constructor Details

    • DecimalCellRenderer

      public DecimalCellRenderer(int precision)
      Constructor for the DecimalCellRender object
  • Method Details

    • showMaximumFractionDigitsForZero

      public void showMaximumFractionDigitsForZero(boolean tf)
      control how zero should be displayed
    • setDecimalFormat

      public void setDecimalFormat(DecimalFormat df)
    • getDecimalFormat

      public DecimalFormat getDecimalFormat()
    • setPrecision

      public void setPrecision(int precision)
      Sets the Precision attribute of the DecimalCellRender object
      Parameters:
      precision - The new Precision value
    • setAllowDefaultFont

      public void setAllowDefaultFont(boolean state)
    • getAllowDefaultFont

      public boolean getAllowDefaultFont()
    • getTableCellRendererComponent

      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Gets the TableCellRendererComponent attribute of the DecimalCellRender object
      Specified by:
      getTableCellRendererComponent in interface TableCellRenderer
      Overrides:
      getTableCellRendererComponent in class RmaCellRenderer
      Parameters:
      table - Description
      value - Description
      isSelected - Description
      hasFocus - Description
      row - Description
      column - Description
      Returns:
      The TableCellRendererComponent value