Class JSparklinesIntegerIconTableCellRenderer

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

public class JSparklinesIntegerIconTableCellRenderer
extends JPanel
implements TableCellRenderer
Table cell renderer displaying integers as icons. Supported input: Integer objects. Other object types are rendered using the DefaultTableCellRenderer.
Author:
Harald Barsnes
See Also:
Serialized Form
  • Constructor Details

    • JSparklinesIntegerIconTableCellRenderer

      public JSparklinesIntegerIconTableCellRenderer​(HashMap<Integer,​ImageIcon> icons)
      Creates a new JSparklinesIntegerIconTableCellRenderer, where all integer cell values are displayed as an icon as defined by the icons hash map.
      Parameters:
      icons - a HashMap with the integer to icon mappings
    • JSparklinesIntegerIconTableCellRenderer

      public JSparklinesIntegerIconTableCellRenderer​(HashMap<Integer,​ImageIcon> icons, HashMap<Integer,​String> tooltips)
      Creates a new JSparklinesIntegerIconTableCellRenderer, where all integer cell values are displayed as an icon as defined by the icons hash map.
      Parameters:
      icons - a HashMap with the integer to icon mappings
      tooltips - a HashMap with the integer to tooltip mappings
    • JSparklinesIntegerIconTableCellRenderer

      public JSparklinesIntegerIconTableCellRenderer​(ImageIcon defaultIcon, String defaultTooltip, HashMap<Integer,​ImageIcon> icons)
      Creates a new JSparklinesIntegerIconTableCellRenderer, where all integer cell values are displayed as an icon as defined by the icons hash map.
      Parameters:
      defaultIcon - the icon to use if an integer without a mapped icon is
      defaultTooltip - the default tooltip, can be null found, can be null
      icons - a HashMap with the integer to icon mappings
    • JSparklinesIntegerIconTableCellRenderer

      public JSparklinesIntegerIconTableCellRenderer​(ImageIcon defaultIcon, String defaultTooltip, HashMap<Integer,​ImageIcon> icons, HashMap<Integer,​String> tooltips)
      Creates a new JSparklinesIntegerIconTableCellRenderer, where all integer cell values are displayed is as an icon as defined by the icons hash map.
      Parameters:
      defaultIcon - the icon to use if an integer without a mapped icon is found, can be null
      defaultTooltip - the default tooltip, can be null
      icons - a HashMap with the integer to icon mappings
      tooltips - a HashMap with the integer to tooltip mappings
  • Method Details