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 TypeMethodDescriptiongetTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Build the rendering component forvalue.
-
Method Details
-
getTreeCellRendererComponent
Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Build the rendering component forvalue.- Parameters:
tree- the rendering host — the emulatorJTreein emulator flow,nullfrom pure-surrogate contexts.value- the node to render.nullis 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-1when the node isn't currently displayed.hasFocus- alwaysfalsefrom the D_jtree_renderer_registry bridge — Vaadin TreeGrid has no per-cell focus signal at render time (R_vaadin_first sub-bucket (c)).
-