Class InsetBuilder

java.lang.Object
no.ntnu.principes.util.styles.InsetBuilder

public class InsetBuilder extends Object
Fluent builder for creating JavaFX Insets objects. Provides multiple factory methods and a chained API for creating insets with different configurations.
  • Method Details

    • uniform

      public static InsetBuilder.Builder uniform(double inset)
      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

      public static InsetBuilder.Builder create()
      Creates an empty builder with zero insets.
      Returns:
      A builder with zero insets
    • symmetric

      public static InsetBuilder.Builder symmetric(double x, double y)
      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 value
      y - The vertical inset value
      Returns:
      A builder configured with symmetric insets
    • custom

      public static InsetBuilder.Builder custom(double top, double right, double bottom, double left)
      Creates a builder with custom insets for each side.
      Parameters:
      top - The top inset value
      right - The right inset value
      bottom - The bottom inset value
      left - 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