public final class Config
extends java.lang.Object
Sequence
)true
for windowed, false
for
fullscreen)Example:
final Resolution output = new Resolution(640, 480, 60); final Config config = new Config(output, 16, true);
Resolution
,
Filter
,
Ratio
Constructor and Description |
---|
Config(Resolution output,
int depth,
boolean windowed)
Constructor.
|
Config(Resolution output,
int depth,
boolean windowed,
Filter filter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<A extends Applet<A>> |
getApplet()
Get applet reference.
|
int |
getDepth()
Get the display depth.
|
Filter |
getFilter()
Get the filter.
|
Resolution |
getOutput()
Get the resolution output.
|
Resolution |
getSource()
Get the resolution source.
|
boolean |
isWindowed()
Get the windowed mode.
|
void |
setApplet(Applet<?> applet)
Set applet reference, and enable applet mode.
|
void |
setRatio(double ratio)
Set the ratio and adapt the resolution to the new ratio (based on the height value).
|
public Config(Resolution output, int depth, boolean windowed)
output
- The output resolution (used on rendering).depth
- The screen color depth in bits (usually 16 or 32).windowed
- The windowed mode: true
for windowed, false
for fullscreen.public Config(Resolution output, int depth, boolean windowed, Filter filter)
output
- The output resolution (used on rendering).depth
- The screen color depth in bits (usually 16 or 32).windowed
- The windowed mode: true
for windowed, false
for fullscreen.filter
- The filter mode (must not be null).public void setRatio(double ratio)
ratio
- The new ratio.public void setApplet(Applet<?> applet)
applet
- The applet reference.public Resolution getSource()
public Resolution getOutput()
public <A extends Applet<A>> A getApplet()
public int getDepth()
public Filter getFilter()
public boolean isWindowed()
true
if is windowed, false
else.