public class ButtonUtils
extends java.lang.Object
Button.
When trying Kotlin, all static methods are candidates for extending the button class.
Legal stuff
Copyright 2010-2020 Ekkart Kleinod ekleinod@edgesoft.de
This file is part of edgeutils.
edgeutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
edgeutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with edgeutils. If not, see http://www.gnu.org/licenses/.
- Since:
- 0.10.0
- Author:
- Ekkart Kleinod
-
Constructor Summary
Constructors Constructor Description ButtonUtils() -
Method Summary
Modifier and Type Method Description static voidadaptButton(javafx.scene.control.ButtonBase theButton, javafx.scene.control.MenuItem theMenuItem)Adapts button to match menu item.static voidadaptButtonWithAction(javafx.scene.control.ButtonBase theButton, javafx.scene.control.MenuItem theMenuItem)Adapts button to match menu item including action.static voidbindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.ComboBox<?> theComboBox)Binds button disable property to selection of combo box.static voidbindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.Labeled theLabeled)Binds button disable property to emptyness of labeled item.static voidbindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.ListView<?> theListView)Binds button disable property to selection of list view.static voidfillSplitMenuButton(javafx.scene.control.SplitMenuButton theSplitButton, javafx.scene.control.MenuItem... theMenuItems)Fills aSplitMenuButtonwith the givenMenuItems, using the first for the split button.
-
Constructor Details
-
ButtonUtils
public ButtonUtils()
-
-
Method Details
-
adaptButton
public static void adaptButton(javafx.scene.control.ButtonBase theButton, javafx.scene.control.MenuItem theMenuItem)Adapts button to match menu item.- Parameters:
theButton- button to adapttheMenuItem- menu item to adapt from
-
adaptButtonWithAction
public static void adaptButtonWithAction(javafx.scene.control.ButtonBase theButton, javafx.scene.control.MenuItem theMenuItem)Adapts button to match menu item including action.- Parameters:
theButton- button to adapttheMenuItem- menu item to adapt from
-
bindDisable
public static void bindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.ListView<?> theListView)Binds button disable property to selection of list view.- Parameters:
theButton- button to disabletheListView- list view with items- Since:
- 0.10.1
-
bindDisable
public static void bindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.ComboBox<?> theComboBox)Binds button disable property to selection of combo box.- Parameters:
theButton- button to disabletheComboBox- combo box with items- Since:
- 0.10.1
-
bindDisable
public static void bindDisable(javafx.scene.control.ButtonBase theButton, javafx.scene.control.Labeled theLabeled)Binds button disable property to emptyness of labeled item.- Parameters:
theButton- button to disabletheLabeled- labeled item- Since:
- 0.12.0
-
fillSplitMenuButton
public static void fillSplitMenuButton(javafx.scene.control.SplitMenuButton theSplitButton, javafx.scene.control.MenuItem... theMenuItems)Fills aSplitMenuButtonwith the givenMenuItems, using the first for the split button.- Parameters:
theSplitButton- split button to filltheMenuItems- menu items (first will be used for split button itself)- Since:
- 0.12.0
-