public class Resolution
extends java.lang.Object
This class also provides access to predefined known resolutions of the different aspect ratios which can be used
to set the resolution of the GameWindow.
GameWindow.setResolution(Resolution)| Modifier and Type | Class and Description |
|---|---|
static class |
Resolution.Ratio |
static class |
Resolution.Ratio16x10
Contains predefined
Resolutions with an aspect ratio of 16:10. |
static class |
Resolution.Ratio16x9
Contains predefined
Resolutions with an aspect ratio of 16:9. |
static class |
Resolution.Ratio4x3
Contains predefined
Resolutions with an aspect ratio of 4:3. |
static class |
Resolution.Ratio5x4
Contains predefined
Resolutions with an aspect ratio of 5:4. |
| Modifier and Type | Method and Description |
|---|---|
static Resolution |
custom(int width,
int height,
java.lang.String resolutionName) |
java.awt.Dimension |
getDimension()
Gets the dimension of this resolution consisting of it's width and height.
|
int |
getHeight()
Gets the height of this resolution.
|
Resolution.Ratio |
getRatio()
Gets the aspect ratio of this resolution.
|
int |
getWidth()
Gets the width of this resolution.
|
java.lang.String |
toDimensionString() |
java.lang.String |
toDimensionString(java.lang.String delimiter) |
java.lang.String |
toString() |
public static Resolution custom(int width, int height, java.lang.String resolutionName)
public int getHeight()
public int getWidth()
public java.awt.Dimension getDimension()
public java.lang.String toDimensionString()
public java.lang.String toDimensionString(java.lang.String delimiter)
public java.lang.String toString()
toString in class java.lang.Objectpublic Resolution.Ratio getRatio()