Class TurnoutTableDataModel.ImageIconRenderer

java.lang.Object
javax.swing.AbstractCellEditor
jmri.jmrit.beantable.turnout.TurnoutTableDataModel.ImageIconRenderer
All Implemented Interfaces:
Serializable, CellEditor, TableCellEditor, TableCellRenderer
Enclosing class:
TurnoutTableDataModel

Visualize state in table as a graphic, customized for Turnouts (4 states). Renderer and Editor are identical, as the cell contents are not actually edited, only used to toggle state using TurnoutTableDataModel.clickOn(Turnout).

A single label is reused for every cell and the icons are loaded once per JVM, so rendering a cell allocates nothing. The label ignores revalidate/repaint requests and the row height is set once in TurnoutTableDataModel.configureTable(javax.swing.JTable): painting a cell must never schedule more painting, or the table repaints itself forever.