Class DockingSize

java.lang.Object
com.dlsc.gemsfx.docking.DockingSize

public final class DockingSize extends Object
An immutable preferred size for a dockable when it creates a side split. The size describes width for left/right docking and height for top/bottom docking. Weights refer to the entire destination DockingPane, not the target tab group.
  • Method Details

    • weight

      public static DockingSize weight(double weight)
      Creates a size relative to the entire destination pane.
      Parameters:
      weight - a finite value in [0, 1], from no space to the entire pane dimension
      Returns:
      the preferred size
      Throws:
      IllegalArgumentException - if the weight is outside [0, 1] or not finite
    • pixels

      public static DockingSize pixels(double pixels)
      Creates an initial size in JavaFX logical pixels.
      Parameters:
      pixels - a finite, nonnegative size
      Returns:
      the preferred size
      Throws:
      IllegalArgumentException - if the size is negative or not finite
    • getValue

      public double getValue()
      Returns the requested size in the specified unit.
      Returns:
      the size
    • getUnit

      public DockingSize.Unit getUnit()
      Returns the unit of the requested size.
      Returns:
      the unit