Interface ListCellRenderer<E>

All Known Implementing Classes:
DefaultListCellRenderer

public interface ListCellRenderer<E>
Port of ListCellRenderer. Returns Component so the renderer can hand back our emulator's component hierarchy — JDK's java.awt.Component return type is incompatible with our hierarchy and is the central reason this interface is ported wholesale rather than reused (D_event_port_policy + the cell-renderer carve-out).

The first parameter is vaadinx.swing.JList<? extends E> per D_jlist (superseding D_jcombobox's placeholder Object), matching the JDK signature — so a JDK-faithful renderer override compiles unchanged after the import swap. It arrives differently from the two bridges (see @param list); a renderer that reads selection / model state off the list needs the JList bridge, while the common-case value-formatting renderer (the DefaultListCellRenderer pattern) works under both.

  • Method Summary

    Modifier and Type
    Method
    Description
    getListCellRendererComponent(JList<? extends E> list, E value, int index, boolean isSelected, boolean cellHasFocus)
    Build the rendering component for value.
  • Method Details

    • getListCellRendererComponent

      Component getListCellRendererComponent(JList<? extends E> list, E value, int index, boolean isSelected, boolean cellHasFocus)
      Build the rendering component for value.
      Parameters:
      list - the rendering host: the JList instance from the :emulators.JList bridge, or null from the :emulators.JComboBox bridge (a combo box has no JList).
      value - the model value to render.
      index - the index of the cell, or -1 when rendering the selected value (e.g. in the JComboBox button face).
      isSelected - whether the cell is currently selected. The JComboBox bridge passes false; full selected-cell highlighting is browser-driven.
      cellHasFocus - whether the cell has keyboard focus. The JComboBox bridge passes false.