Search in sources :

Example 1 with LeftToggleButton

use of org.phoenicis.javafx.views.mainwindow.ui.LeftToggleButton in project POL-POM-5 by PlayOnLinux.

the class SettingsSideBar method createSettingsToggleButton.

/**
     * This method creates a toggle button for a given settings panel.
     *
     * @param item The settings panel together with its displayed name and icon css class
     * @return The created toggle button
     */
private ToggleButton createSettingsToggleButton(SettingsSideBarItem item) {
    ToggleButton toggleButton = new LeftToggleButton(item.getName());
    toggleButton.getStyleClass().add(item.getIconClass());
    toggleButton.setOnAction(event -> onSelectSettingsItem.accept(item.getPanel()));
    return toggleButton;
}
Also used : ToggleButton(javafx.scene.control.ToggleButton) LeftToggleButton(org.phoenicis.javafx.views.mainwindow.ui.LeftToggleButton) LeftToggleButton(org.phoenicis.javafx.views.mainwindow.ui.LeftToggleButton)

Aggregations

ToggleButton (javafx.scene.control.ToggleButton)1 LeftToggleButton (org.phoenicis.javafx.views.mainwindow.ui.LeftToggleButton)1