package utils
- Alphabetic
- Public
- Protected
Type Members
- class GraphicTimer extends AnyRef
Provides a way to get a fixed frame rate when calling the sync method in the game loop with the desired frame rate
Provides a way to get a fixed frame rate when calling the sync method in the game loop with the desired frame rate
Adapted from http://www.java-gaming.org/index.php?topic=22933.5
- class GraphicsBitmap extends AnyRef
GraphicsBitmap contains the methods required to create a
BufferedImagefrom aStringif the file existsGraphicsBitmap contains the methods required to create a
BufferedImagefrom aStringif the file exists1.3 : Added acceleration for images using graphics card
- Version
1.3, April 2011
- class RepeatingReleasedEventsFixer extends AWTEventListener
Value Members
- object DisplaySetup
Checks that a graphical display can be reached before the first window is created and explains what to do when it cannot.
Checks that a graphical display can be reached before the first window is created and explains what to do when it cannot.
On Linux, the standard JDK only talks to X11. On a Wayland desktop (Fedora, Ubuntu, ...) that works through Xwayland, except when the program runs in a sandbox that was not given X11 access. The typical case is IntelliJ IDEA installed as a Flatpak: the IDE itself runs natively on Wayland, but the student's program then fails with
java.awt.AWTError: Can't connect to X11 window server.Two things are done here:
- if the JDK ships a Wayland toolkit (the JetBrains Runtime does) and X11 is clearly unavailable, that toolkit is selected so that the program works anyway;
- if opening the display fails, a diagnosis with the probable cause and the fix is printed on the standard error output before the error is rethrown.
- object RepeatingReleasedEventsFixer
Fixes the discrepancies between keyboard handling under Windows and linux for repeated keys.
Fixes the discrepancies between keyboard handling under Windows and linux for repeated keys. Taken from http://tech.stolsvik.com/2010/05/linux-java-repeats-released-keyevents.html