# Interface SelectableIconHolder

All Superinterfaces:
  `IconHolder`

All Known Implementing Classes:
  `Button, CheckBox, FloatingActionButton, LikeButton, MultiButton, Picker, RadioButton, ScaleImageButton, ShareButton, SpanButton, SpanMultiButton`

public interface SelectableIconHolder extends IconHolder
An interface that is implemented by "selectable" components that hold icons, such as `Button`, `SpanButton`, `MultiButton`, etc... This interface includes methods for managing different icons for different component states (e.g. pressed, disabled, etc..).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Image`
  `getDisabledIcon()`
  Indicates the icon that is displayed on the button when the button is in the disabled state
  `Image`
  `getIconFromState()`
  Returns the icon for the button based on its current state
  `Image`
  `getPressedIcon()`
  Indicates the icon that is displayed on the button when the button is in pressed state
  `Image`
  `getRolloverIcon()`
  Indicates the icon that is displayed on the button when the button is in rolled over state
  `Image`
  `getRolloverPressedIcon()`
  Indicates the icon that is displayed on the button when the button is in pressed state and is selected.
  `void`
  `setDisabledIcon(Image disabledIcon)`
  Indicates the icon that is displayed on the button when the button is in the disabled state
  `void`
  `setPressedIcon(Image pressedIcon)`
  Indicates the icon that is displayed on the button when the button is in pressed state
  `void`
  `setRolloverIcon(Image rolloverIcon)`
  Indicates the icon that is displayed on the button when the button is in rolled over state
  `void`
  `setRolloverPressedIcon(Image rolloverPressedIcon)`
  Indicates the icon that is displayed on the button when the button is in pressed state and is selected.

  ### Methods inherited from interface IconHolder

  `getGap, getIcon, getIconStyleComponent, getIconUIID, getTextPosition, setFontIcon, setGap, setIcon, setIconUIID, setMaterialIcon, setTextPosition`
  Modifier and Type
  Method
  Description
  `int`
  `getGap()`
  Returns the gap in pixels between the icon/text to the Label boundaries
  `Image`
  `getIcon()`
  Returns the labels icon
  `Component`
  `getIconStyleComponent()`
  Gets the component that should be used for styling material the material icon.
  `String`
  `getIconUIID()`
  Gets the UIID used for styling material icons on this component.
  `int`
  `getTextPosition()`
  Returns The position of the text relative to the icon
  `void`
  `setFontIcon(Font font, char c, float size)`
  This method is shorthand for `com.codename1.ui.Font, char, float)`
  `void`
  `setGap(int gap)`
  Set the gap in pixels between the icon/text to the Label boundaries
  `void`
  `setIcon(Image icon)`
  Sets the Label icon, if the icon is unmodified a repaint would not be triggered
  `void`
  `setIconUIID(String uiid)`
  Sets a UIID to be used for the material icon style.
  `void`
  `setMaterialIcon(char c, float size)`
  This method is shorthand for `char, float)`
  `void`
  `setTextPosition(int textPosition)`
  Sets the position of the text relative to the icon if exists

- ## Method Details

  - ### getRolloverIcon

    Image getRolloverIcon()

    Indicates the icon that is displayed on the button when the button is in rolled over state

    ###### Returns

    icon used

    ###### See also

    - Button#STATE_ROLLOVER

  - ### setRolloverIcon

    void setRolloverIcon(Image rolloverIcon)

    Indicates the icon that is displayed on the button when the button is in rolled over state

    ###### Parameters

    - `rolloverIcon`: icon to use

    ###### See also

    - Button#STATE_ROLLOVER

  - ### getPressedIcon

    Image getPressedIcon()

    Indicates the icon that is displayed on the button when the button is in pressed state

    ###### Returns

    icon used

    ###### See also

    - Button#STATE_PRESSED

  - ### setPressedIcon

    void setPressedIcon(Image pressedIcon)

    Indicates the icon that is displayed on the button when the button is in pressed state

    ###### Parameters

    - `pressedIcon`: icon used

    ###### See also

    - Button#STATE_PRESSED

  - ### getDisabledIcon

    Image getDisabledIcon()

    Indicates the icon that is displayed on the button when the button is in the disabled state

    ###### Returns

    icon used

  - ### setDisabledIcon

    void setDisabledIcon(Image disabledIcon)

    Indicates the icon that is displayed on the button when the button is in the disabled state

    ###### Parameters

    - `disabledIcon`: icon used

  - ### getRolloverPressedIcon

    Image getRolloverPressedIcon()

    Indicates the icon that is displayed on the button when the button is in pressed state and is selected. This is ONLY applicable to toggle buttons

    ###### Returns

    icon used

  - ### setRolloverPressedIcon

    void setRolloverPressedIcon(Image rolloverPressedIcon)

    Indicates the icon that is displayed on the button when the button is in pressed state and is selected. This is ONLY applicable to toggle buttons

    ###### Parameters

    - `rolloverPressedIcon`: icon used

  - ### getIconFromState

    Image getIconFromState()

    Returns the icon for the button based on its current state

    ###### Returns

    the button icon based on its current state