Module MaterialFX

Class ToggleButtonsUtil

java.lang.Object
io.github.palexdev.materialfx.utils.ToggleButtonsUtil

public class ToggleButtonsUtil extends Object
Utils class for ToggleButtons.
  • Constructor Details

    • ToggleButtonsUtil

      public ToggleButtonsUtil()
  • Method Details

    • addAlwaysOneSelectedSupport

      public static void addAlwaysOneSelectedSupport(ToggleGroup toggleGroup)
      Adds a handler to the given ToggleGroup to make sure there's always at least one ToggleButton selected.
      Parameters:
      toggleGroup - The given ToggleGroup
    • clearSelectedToggle

      public static void clearSelectedToggle(ToggleGroup toggleGroup)
      Copied from ToggleGroup. It's a package-private method that is used in Toggles when the selection state changes and a toggle group is set.