Class ButtonDataRenderer

    • Constructor Detail

      • ButtonDataRenderer

        public ButtonDataRenderer()
    • Method Detail

      • render

        public void render​(java.lang.Object data,
                           Button button,
                           boolean highlighted)
        Description copied from interface: Button.DataRenderer
        Prepares the renderer for layout or paint.
        Specified by:
        render in interface Button.DataRenderer
        Parameters:
        data - The data to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
        button - The host component.
        highlighted - If true, the item is highlighted.
      • getIconWidth

        public int getIconWidth()
      • setIconWidth

        public void setIconWidth​(int iconWidth)
      • getIconHeight

        public int getIconHeight()
      • setIconHeight

        public void setIconHeight​(int iconHeight)
      • getShowIcon

        public boolean getShowIcon()
      • setShowIcon

        public void setShowIcon​(boolean showIcon)
      • getFillIcon

        public boolean getFillIcon()
      • setFillIcon

        public void setFillIcon​(boolean fillIcon)
      • toString

        public java.lang.String toString​(java.lang.Object data)
        Description copied from interface: Button.DataRenderer
        Converts button data to a string representation.
        Specified by:
        toString in interface Button.DataRenderer
        Parameters:
        data - The button's data.
        Returns:
        The data's string representation, or null if the data does not have a string representation.

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