java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
javax.swing.table.DefaultTableCellRenderer
org.pentaho.reporting.engine.classic.demo.ancient.demo.swingicons.ImageCellRenderer
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TableCellRenderer

public class ImageCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer
A table cell renderer that draws an image in a table cell.

This class will be moved to the JCommon class library.

Author:
David Gilbert
See Also:
  • Constructor Details

    • ImageCellRenderer

      public ImageCellRenderer()
      Constructs a new renderer.
  • Method Details

    • getTableCellRendererComponent

      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Returns itself as the renderer. Supports the TableCellRenderer interface.
      Specified by:
      getTableCellRendererComponent in interface TableCellRenderer
      Overrides:
      getTableCellRendererComponent in class DefaultTableCellRenderer
      Parameters:
      table - The table.
      value - The data to be rendered.
      isSelected - A boolean that indicates whether or not the cell is selected.
      hasFocus - A boolean that indicates whether or not the cell has the focus.
      row - The (zero-based) row index.
      column - The (zero-based) column index.
      Returns:
      The component that can render the contents of the cell.