Interface Spinner.ItemRenderer

    • Method Detail

      • render

        void render​(java.lang.Object item,
                    Spinner spinner)
        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.
        spinner - The host component.
      • toString

        java.lang.String toString​(java.lang.Object item)
        Converts a spinner item to a string representation.
        Parameters:
        item - The item from the spinner's data.
        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.