What is GraphicsConfiguration in Java?

Java 8 documentation describes GraphicsConfiguration as follows.

The GraphicsConfiguration class describes the characteristics of a graphics destination, such as a printer or monitor

The description is a bit non-technical and unclear, but it was enough to allow me to use it in a screenshot app, but I still don't understand why the GraphicsDevice has multiple GraphicsConfigurations. The documentation for GraphicsDevice states:

Each graphics device has one or more GraphicsConfiguration objects associated with it. These objects define the various configurations in which the GraphicsDevice can be used.

What are these "different configurations" and when will they appear?

+3


source to share


1 answer


As stated in the Javadoc for this class:

There can be many GraphicsConfiguration objects associated with a single graphics device that represent different drawing modes or capabilities. The corresponding native structure will differ from platform to platform. For example, in X11 windowing systems, each visual is a different GraphicsConfiguration. On Microsoft Windows, GraphicsConfigurations represent the PixelFormats available at the current resolution and color depth.



http://docs.oracle.com/javase/7/docs/api/java/awt/GraphicsConfiguration.html

For X11 and the term "visual", this link clarifies a bit: http://tronche.com/gui/x/xlib/utilities/visual.html - Of course, for "normal" applications this can be annoying, but since Java AWT uses basic OS graphics, it should represent its characteristics.

+1


source







All Articles