java.lang.Object
javax.swing.table.AbstractTableModel
org.pentaho.reporting.engine.classic.demo.ancient.demo.swingicons.IconTableModel
All Implemented Interfaces:
Serializable, TableModel
Direct Known Subclasses:
SwingIconsDemoTableModel

public class IconTableModel extends AbstractTableModel
A simple TableModel implementation used for demonstration purposes.
Author:
David Gilbert
See Also:
  • Constructor Details

    • IconTableModel

      public IconTableModel()
      Constructs a new IconTableModel, initially empty.
  • Method Details

    • addIconEntry

      protected void addIconEntry(String name, String category, Image icon, Long size)
      Adds a new entry to the table model.
      Parameters:
      name - The icon name.
      category - The category name.
      icon - The icon.
      size - The size of the icon image in bytes.
    • clear

      public void clear()
    • getRowCount

      public int getRowCount()
      Returns the number of rows in the table model.
      Returns:
      The row count.
    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in the table model.
      Returns:
      The column count.
    • getValueAt

      public Object getValueAt(int row, int column)
      Returns the data item at the specified row and column.
      Parameters:
      row - The row index.
      column - The column index.
      Returns:
      The data item.
    • getColumnClass

      public Class getColumnClass(int column)
      Returns the class of the specified column.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      column - The column index.
      Returns:
      The column class.
    • getColumnName

      public String getColumnName(int column)
      Returns the name of the specified column.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      column - The column.
      Returns:
      The column name.