Java Tutorial/Trail: Full-Screen Exclusive Mode API

Full-Screen Exclusive Mode API
"Full-Screen Exclusive Mode" is a special mode of the Java graphics system that allows to write to a whole screen, not just to a window. Obviously this mode can be useful to turn a large e-paper display or monitor into a smart board.

An example smart board in Java
The following code switches the graphics system to full-screen mode.

The "any key" listener is useful to get you back to your usual desktop. The class implements the interface to listen for keyboard events and is registered with the frame as the responsible component for sending these events through the   method in the code above.

Class: Pen
In order to be able to draw on the smart board we need a pen (cvs), which is a class that implements two more listener interfaces: and.

Class: Glyph
The class Glyph (cvs) represents a connected set of points that have been drawn with a single line onto the smart board, usually a letter or several letters.

Input handling
Now the BoardPanel (cvs) methods  and   can push points of a line into the input queue, from which glyphs are assembled via the GlyphCache (cvs) class.

(source code from cvs.savannah.gnu.org/.../Blackboard)