Class SpinnerItemRenderer

    • Constructor Detail

      • SpinnerItemRenderer

        public SpinnerItemRenderer()
    • Method Detail

      • render

        public void render​(java.lang.Object item,
                           Spinner spinner)
        Description copied from interface: Spinner.ItemRenderer
        Prepares the renderer for layout or paint.
        Specified by:
        render in interface Spinner.ItemRenderer
        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.
      • renderStyles

        protected void renderStyles​(Spinner spinner)
      • toString

        public java.lang.String toString​(java.lang.Object item)
        Description copied from interface: Spinner.ItemRenderer
        Converts a spinner item to a string representation.
        Specified by:
        toString in interface Spinner.ItemRenderer
        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.