Interface ListView.ItemRenderer

    • Method Detail

      • render

        void render​(java.lang.Object item,
                    int index,
                    ListView listView,
                    boolean selected,
                    Button.State state,
                    boolean highlighted,
                    boolean disabled)
        Prepares the renderer for layout or paint.
        Parameters:
        item - The item to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
        index - The index of the item being rendered, or -1 if item is null.
        listView - The host component.
        selected - If true, the item is selected. the item.
        state - The selected, unselected or mixed state for the checkmark. If tri-state checkmarks are not enabled, this value will either be selected or unselected.
        highlighted - If true, the item is highlighted.
        disabled - If true, the item is disabled.
      • toString

        java.lang.String toString​(java.lang.Object item)
        Converts a list item to a string representation.
        Parameters:
        item - The particular list item.
        Returns:
        The item's string representation, or null if the item does not have a string representation.

        Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.