Class JSparklinesBubbleHeatMapTableCellRenderer

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
no.uib.jsparklines.renderers.JSparklinesBubbleHeatMapTableCellRenderer
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TableCellRenderer

public class JSparklinesBubbleHeatMapTableCellRenderer
extends JLabel
implements TableCellRenderer
Table cell renderer displaying JSparklines bubble heat maps. Supported input: Integer, Short, Byte, Long, Double or Float objects. Other object types are rendered using the DefaultTableCellRenderer.
Author:
Harald Barsnes
See Also:
Serialized Form
  • Constructor Details

    • JSparklinesBubbleHeatMapTableCellRenderer

      public JSparklinesBubbleHeatMapTableCellRenderer​(Double maxAbsValue, GradientColorCoding.ColorGradient colorGradient, boolean positiveColorGradient)
      Creates a new JSparklinesBubbleHeatMapTableCellRenderer.
      Parameters:
      maxAbsValue - the maximum absolute value to be plotted, used to make sure that all plots in the same column has the same maximum value and are thus comparable
      colorGradient - the color gradient to use
      positiveColorGradient - if true only positive values are expected and the middle gradient color is used for the halfway point between the min and max values, if false the middle gradient color is used for values around zero
  • Method Details

    • setGradientColoring

      public void setGradientColoring​(GradientColorCoding.ColorGradient colorGradient, boolean positiveColorGradient)
      Set the color gradient.
      Parameters:
      colorGradient - the color gradient to use, null disables the color gradient
      positiveColorGradient - if true only positive values are expected and the middle gradient color is used for the halfway point between the min and max values, if false the middle gradient color is used for values around zero
    • setMaxValue

      public void setMaxValue​(double maxAbsValue)
      Set the maximum absolute value.
      Parameters:
      maxAbsValue - the maximum absolute value
    • showNumbers

      public void showNumbers​(boolean showNumbers)
      Set if the underlying numbers or the bar charts are to be shown.
      Parameters:
      showNumbers - if true the underlying numbers are shown
    • getTableCellRendererComponent

      public Component getTableCellRendererComponent​(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Specified by:
      getTableCellRendererComponent in interface TableCellRenderer
    • getMinimumChartValue

      public double getMinimumChartValue()
      Returns the minimum chart value to plot.
      Returns:
      the minimumChartValue
    • setMinimumChartValue

      public void setMinimumChartValue​(double minimumChartValue)
      Set the minimum chart value to plot.
      Parameters:
      minimumChartValue - the minimumChartValue to set
    • getTooltipLowerValue

      public double getTooltipLowerValue()
      Returns the lower value before using 8 decimals for the tooltip.
      Returns:
      the tooltipLowerValue
    • setTooltipLowerValue

      public void setTooltipLowerValue​(double tooltipLowerValue)
      Set the lower limit for the values before using 8 decimals for the tooltip.
      Parameters:
      tooltipLowerValue - the tooltipLowerValue to set