Interface TreeCellRenderer

All Known Implementing Classes:
DefaultTreeCellRenderer

public interface TreeCellRenderer
Port of TreeCellRenderer. Returns Component so the renderer hands 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; mirrors ListCellRenderer and TableCellRenderer).

The tree parameter is typed JTree; the D_jtree_renderer_registry bridge passes the emulator JTree, so renderers down-casting or reading tree.convertValueToText(...) (the DefaultTreeCellRenderer pattern) work as written. null is tolerated for renderers invoked from a pure-surrogate context.

  • Method Summary

    Modifier and Type
    Method
    Description
    getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
    Build the rendering component for value.
  • Method Details

    • getTreeCellRendererComponent

      Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
      Build the rendering component for value.
      Parameters:
      tree - the rendering host — the emulator JTree in emulator flow, null from pure-surrogate contexts.
      value - the node to render. null is valid.
      selected - whether the node is currently selected.
      expanded - whether the node is currently expanded.
      leaf - whether the node is a leaf per the model.
      row - the node's visible-row index, or -1 when the node isn't currently displayed.
      hasFocus - always false from the D_jtree_renderer_registry bridge — Vaadin TreeGrid has no per-cell focus signal at render time (R_vaadin_first sub-bucket (c)).