java.lang.Object
no.ntnu.principes.util.styles.InsetBuilder
Fluent builder for creating JavaFX Insets objects.
Provides multiple factory methods and a chained API for creating
insets with different configurations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for creating InsetBuilder instances. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.geometry.Insetsbuild()Builds the Insets object with the configured values.static InsetBuilder.Buildercreate()Creates an empty builder with zero insets.static InsetBuilder.Buildercustom(double top, double right, double bottom, double left) Creates a builder with custom insets for each side.static InsetBuilder.Buildersymmetric(double x, double y) Creates a builder with symmetric insets.static InsetBuilder.Builderuniform(double inset) Creates a builder with uniform insets on all sides.
-
Method Details
-
uniform
Creates a builder with uniform insets on all sides.- Parameters:
inset- The value to use for all sides- Returns:
- A builder configured with uniform insets
-
create
Creates an empty builder with zero insets.- Returns:
- A builder with zero insets
-
symmetric
Creates a builder with symmetric insets. Uses x for horizontal (left and right) and y for vertical (top and bottom) insets.- Parameters:
x- The horizontal inset valuey- The vertical inset value- Returns:
- A builder configured with symmetric insets
-
custom
Creates a builder with custom insets for each side.- Parameters:
top- The top inset valueright- The right inset valuebottom- The bottom inset valueleft- The left inset value- Returns:
- A builder configured with the specified insets
-
build
public javafx.geometry.Insets build()Builds the Insets object with the configured values.- Returns:
- A new Insets object
-