Record Class WindowDescriptor
java.lang.Object
java.lang.Record
dev.engine.graphics.window.WindowDescriptor
public record WindowDescriptor(String title, int width, int height, boolean resizable, boolean decorated, boolean fullscreen, boolean highDpi)
extends Record
Describes window creation parameters.
var window = WindowDescriptor.builder("My Game")
.size(1280, 720)
.resizable(true)
.fullscreen(false)
.build();
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionWindowDescriptor(String title, int width, int height) Simple constructor for backward compatibility.WindowDescriptor(String title, int width, int height, boolean resizable, boolean decorated, boolean fullscreen, boolean highDpi) Creates an instance of aWindowDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WindowDescriptor.BuilderbooleanReturns the value of thedecoratedrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefullscreenrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanhighDpi()Returns the value of thehighDpirecord component.booleanReturns the value of theresizablerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
WindowDescriptor
Simple constructor for backward compatibility. -
WindowDescriptor
public WindowDescriptor(String title, int width, int height, boolean resizable, boolean decorated, boolean fullscreen, boolean highDpi) Creates an instance of aWindowDescriptorrecord class.- Parameters:
title- the value for thetitlerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentresizable- the value for theresizablerecord componentdecorated- the value for thedecoratedrecord componentfullscreen- the value for thefullscreenrecord componenthighDpi- the value for thehighDpirecord component
-
-
Method Details
-
builder
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-
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
-
fullscreen
public boolean fullscreen()Returns the value of thefullscreenrecord component.- Returns:
- the value of the
fullscreenrecord component
-
highDpi
public boolean highDpi()Returns the value of thehighDpirecord component.- Returns:
- the value of the
highDpirecord component
-