public class ControlUtils
extends java.lang.Object
Controls.
See comment for MenuItemUtils and TabUtils.
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.13.0
- Author:
- Ekkart Kleinod
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.Class<? extends javafx.scene.control.Control>,java.lang.String>PREFIXESVariable name prefixes. -
Constructor Summary
Constructors Constructor Description ControlUtils() -
Method Summary
Modifier and Type Method Description static voidfillViewControl(javafx.scene.control.Control theControl, java.lang.Object theController, int theSize, ResourceType... theResourceTypes)Fills control with graphic (given size), text, and tooltip.static voidfillViewControl(javafx.scene.control.Control theControl, java.lang.Object theController, ResourceType... theResourceTypes)Fills control with graphic (default size), text, and tooltip.static voidfillViewControl(javafx.scene.control.Control theControl, java.lang.String theAdditionalId, java.lang.Object theController, int theSize, ResourceType... theResourceTypes)Fills control with graphic (given size), text, and tooltip.static voidfillViewControl(javafx.scene.control.Control theControl, java.lang.String theAdditionalId, java.lang.Object theController, ResourceType... theResourceTypes)Fills control with graphic (default size), text, and tooltip.static voidfillViewControls(ResourceType theResourceType, java.lang.Object theController, javafx.scene.control.Control... theControls)Fills controls with specific resource type.static java.lang.StringgetIdWithoutPrefix(javafx.scene.control.Control theControl)Returns id without prefix from control with ID.static java.lang.StringgetIdWithoutPrefix(javafx.scene.control.Control theControl, java.lang.String theAdditionalId)Returns id without prefix from control with ID.static java.lang.StringremovePrefix(java.lang.String theID, java.lang.String thePrefix)Removes prefix from ID.
-
Field Details
-
PREFIXES
public static final java.util.Map<java.lang.Class<? extends javafx.scene.control.Control>,java.lang.String> PREFIXESVariable name prefixes.
-
-
Constructor Details
-
ControlUtils
public ControlUtils()
-
-
Method Details
-
fillViewControl
public static void fillViewControl(javafx.scene.control.Control theControl, java.lang.Object theController, ResourceType... theResourceTypes)Fills control with graphic (default size), text, and tooltip. One could useLabeledinstead ofControlbut my hope is, thatMenuItems someday will be at leastControls and thus can be filled within this class.- Parameters:
theControl- control to filltheController- view controllertheResourceTypes- resource types
-
fillViewControl
public static void fillViewControl(javafx.scene.control.Control theControl, java.lang.String theAdditionalId, java.lang.Object theController, ResourceType... theResourceTypes)Fills control with graphic (default size), text, and tooltip. One could useLabeledinstead ofControlbut my hope is, thatMenuItems someday will be at leastControls and thus can be filled within this class.- Parameters:
theControl- control to filltheAdditionalId- additional id (null for none)theController- view controllertheResourceTypes- resource types
-
fillViewControl
public static void fillViewControl(javafx.scene.control.Control theControl, java.lang.Object theController, int theSize, ResourceType... theResourceTypes)Fills control with graphic (given size), text, and tooltip.- Parameters:
theControl- control to filltheController- view controllertheSize- size of the icontheResourceTypes- resource types
-
fillViewControl
public static void fillViewControl(javafx.scene.control.Control theControl, java.lang.String theAdditionalId, java.lang.Object theController, int theSize, ResourceType... theResourceTypes)Fills control with graphic (given size), text, and tooltip. One could useLabeledinstead ofControlbut my hope is, thatMenuItems someday will be at leastControls and thus can be filled within this class.- Parameters:
theControl- control to filltheAdditionalId- additional id (null for none)theController- view controllertheSize- size of the icontheResourceTypes- resource types (optional)
-
getIdWithoutPrefix
public static java.lang.String getIdWithoutPrefix(javafx.scene.control.Control theControl)Returns id without prefix from control with ID.- Parameters:
theControl- control with id- Returns:
- id without prefix
-
getIdWithoutPrefix
public static java.lang.String getIdWithoutPrefix(javafx.scene.control.Control theControl, java.lang.String theAdditionalId)Returns id without prefix from control with ID.- Parameters:
theControl- control with idtheAdditionalId- additional id (null for none)- Returns:
- id without prefix
-
fillViewControls
public static void fillViewControls(ResourceType theResourceType, java.lang.Object theController, javafx.scene.control.Control... theControls)Fills controls with specific resource type.- Parameters:
theResourceType- resource typetheController- view controllertheControls- control to fill
-
removePrefix
public static java.lang.String removePrefix(java.lang.String theID, java.lang.String thePrefix)Removes prefix from ID.- Parameters:
theID- id with prefixthePrefix- prefix- Returns:
- id without prefix
-