Class LookAndFeelComboBox

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

public final class LookAndFeelComboBox extends JComboBox<Item<LookAndFeelProvider>>
A combo box for selecting a LookAndFeel. Instantiate via factory methods lookAndFeelComboBox() or lookAndFeelComboBox(boolean).
See Also:
  • Field Details

    • ENABLE_ON_SELECTION

      public static final PropertyValue<Boolean> ENABLE_ON_SELECTION
      Specifies whether to enable the Look and Feel dynamically when selected
      • Value type: Boolean
      • Default value: true
  • Method Details

    • getModel

      Overrides:
      getModel in class JComboBox<Item<LookAndFeelProvider>>
    • selectedLookAndFeel

      public LookAndFeelProvider selectedLookAndFeel()
      Returns:
      the currently selected look and feel
    • enableSelected

      public void enableSelected()
      Enables the currently selected look and feel, if it is already selected, this method does nothing
    • revert

      public void revert()
      Reverts the look and feel to the look and feel active when this look and feel combobox was created, if it is already enabled, this method does nothing
    • lookAndFeelComboBox

      public static LookAndFeelComboBox lookAndFeelComboBox()
      Instantiates a new LookAndFeelComboBox displaying the available look and feels
      Returns:
      a new LookAndFeelComboBox instance
    • lookAndFeelComboBox

      public static LookAndFeelComboBox lookAndFeelComboBox(boolean enableOnSelection)
      Instantiates a new LookAndFeelComboBox displaying the available look and feels
      Parameters:
      enableOnSelection - if true the look and feel is enabled dynamically when selected
      Returns:
      a new LookAndFeelComboBox instance