Package io.github.jbastgen.stemma.app.ui
Class WindowSizing
java.lang.Object
io.github.jbastgen.stemma.app.ui.WindowSizing
How big the window is when Stemma starts (feature 62): what the last run left, if it fits on the screen, else three quarters of the
screen, and never bigger than what can be seen. Pure arithmetic, no JavaFX: the screen is its
WindowSizing.Area without the task bar, the menu
bar and the dock (JavaFX's "visual bounds").-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe viewable part of a screen.static final recordA window size. -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]centered(WindowSizing.Size size, WindowSizing.Area visual) The top left corner that puts a window of this size in the middle of the viewable area.static WindowSizing.Sizeinitial(WindowSizing.Size saved, WindowSizing.Area visual, WindowSizing.Size min) The size to start with.static WindowSizing.Sizeminimum(WindowSizing.Size wanted, WindowSizing.Area visual) The smallest size the user may give the window: what the layout needs, but never more than the screen shows.
-
Method Details
-
minimum
The smallest size the user may give the window: what the layout needs, but never more than the screen shows. -
initial
public static WindowSizing.Size initial(WindowSizing.Size saved, WindowSizing.Area visual, WindowSizing.Size min) The size to start with.- Parameters:
saved- the size the window had when the last run ended, or null for nonevisual- the viewable part of the screenmin- the smallest size the window may have (already limited to the screen:minimum(io.github.jbastgen.stemma.app.ui.WindowSizing.Size, io.github.jbastgen.stemma.app.ui.WindowSizing.Area))
-
centered
The top left corner that puts a window of this size in the middle of the viewable area.
-