Package limn.backend
Record Class WindowConfig
java.lang.Object
java.lang.Record
limn.backend.WindowConfig
- Record Components:
title- title bar textwidth- initial width in logical pointsheight- initial height in logical pointsvisible-falsefor offscreen/screenshot rendering or windows positioned beforeNativeWindow.show()resizable- whether the user may resize the windowdecorated- native title bar/border (falsefor popups)floating- always-on-top (popups, tooltips)transparent- transparent framebuffer: pixels with alpha < 1 composite over whatever is behind the window (rounded popup corners, translucent panels)focusOnShow- whetherNativeWindow.show()steals input focus (falsekeeps focus in the parent: combo popups)
public record WindowConfig(String title, int width, int height, boolean visible, boolean resizable, boolean decorated, boolean floating, boolean transparent, boolean focusOnShow)
extends Record
Initial configuration for a
NativeWindow.-
Constructor Summary
ConstructorsConstructorDescriptionWindowConfig(String title, int width, int height, boolean visible, boolean resizable) Regular window (decorated, focus on show, opaque).WindowConfig(String title, int width, int height, boolean visible, boolean resizable, boolean decorated, boolean floating, boolean transparent, boolean focusOnShow) Creates an instance of aWindowConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedecoratedrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfloating()Returns the value of thefloatingrecord component.booleanReturns the value of thefocusOnShowrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.static WindowConfigVisible, resizable, decorated window.static WindowConfigpopup(int width, int height) Undecorated, floating, transparent, non-focus-stealing window, created hidden so it can be positioned beforeNativeWindow.show(): the shape of a combo/menu popup.booleanReturns the value of theresizablerecord component.static WindowConfigstyled(String title, int width, int height, WindowStyle style, boolean floating, boolean focusOnShow) A styled window created hidden (position, thenNativeWindow.show()).title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetransparentrecord component.booleanvisible()Returns the value of thevisiblerecord component.intwidth()Returns the value of thewidthrecord component.withVisible(boolean newVisible) A copy that starts shown or hidden.
-
Constructor Details
-
WindowConfig
public WindowConfig(String title, int width, int height, boolean visible, boolean resizable, boolean decorated, boolean floating, boolean transparent, boolean focusOnShow) Creates an instance of aWindowConfigrecord class.- Parameters:
title- the value for thetitlerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentvisible- the value for thevisiblerecord componentresizable- the value for theresizablerecord componentdecorated- the value for thedecoratedrecord componentfloating- the value for thefloatingrecord componenttransparent- the value for thetransparentrecord componentfocusOnShow- the value for thefocusOnShowrecord component
-
WindowConfig
Regular window (decorated, focus on show, opaque).
-
-
Method Details
-
of
Visible, resizable, decorated window. The common case. -
popup
Undecorated, floating, transparent, non-focus-stealing window, created hidden so it can be positioned beforeNativeWindow.show(): the shape of a combo/menu popup. -
styled
public static WindowConfig styled(String title, int width, int height, WindowStyle style, boolean floating, boolean focusOnShow) A styled window created hidden (position, thenNativeWindow.show()).- Parameters:
style- decoration/translucency (seeWindowStyle)floating- always-on-topfocusOnShow- whether showing it steals input focus
-
withVisible
A copy that starts shown or hidden. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
visible
public boolean visible()Returns the value of thevisiblerecord component.- Returns:
- the value of the
visiblerecord component
-
resizable
public boolean resizable()Returns the value of theresizablerecord component.- Returns:
- the value of the
resizablerecord component
-
decorated
public boolean decorated()Returns the value of thedecoratedrecord component.- Returns:
- the value of the
decoratedrecord component
-
floating
public boolean floating()Returns the value of thefloatingrecord component.- Returns:
- the value of the
floatingrecord component
-
transparent
public boolean transparent()Returns the value of thetransparentrecord component.- Returns:
- the value of the
transparentrecord component
-
focusOnShow
public boolean focusOnShow()Returns the value of thefocusOnShowrecord component.- Returns:
- the value of the
focusOnShowrecord component
-