Class UIUtils
java.lang.Object
org.troy.capstone.utils.UIUtils
Utility class for UI-related functions.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUIUtils()Only exists to prevent Jacoco from complaining about the default constructor not being tested. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetLineBorder(Region region, int cornerRadii, int borderWidth) Sets a solid black line border on a Region object with a specified corner radius and border width.static voidSets the size of a JavaFX Region (such as a Pane, Button, etc.) to the specified width and height.
-
Constructor Details
-
UIUtils
Only exists to prevent Jacoco from complaining about the default constructor not being tested. As the only function of this class is to provide static methods, there is no reason for it to be instantiated, so the constructor is private.
-
-
Method Details
-
setSize
Sets the size of a JavaFX Region (such as a Pane, Button, etc.) to the specified width and height. If either width or height is null, that dimension will not be modified.- Parameters:
region- The JavaFX Region to set the size of.width- The desired width to set for the region, or null to leave the width unchanged.height- The desired height to set for the region, or null to leave the height unchanged.- Preconditions:
- The region parameter should be a valid JavaFX Region object.
-
setLineBorder
Sets a solid black line border on a Region object with a specified corner radius and border width.- Parameters:
region- The JavaFX Region to set the border on.cornerRadii- The radius of the corners of the border, in pixels.borderWidth- The width of the border, in pixels.- Preconditions:
- The region parameter should be a valid JavaFX Region object, and cornerRadii and borderWidth should be non-negative integers.
- Postconditions:
- The specified Region will have a solid black line border applied to it with the given corner radius and border width.
-