Last active
December 26, 2015 01:28
-
-
Save renatoathaydes/7071189 to your computer and use it in GitHub Desktop.
Groovy script that prints information about the graphics devices currently in use.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.* | |
def virtualBounds = new Rectangle() | |
GraphicsEnvironment ge = GraphicsEnvironment.localGraphicsEnvironment | |
GraphicsDevice[] gs = ge.screenDevices | |
println Arrays.toString(gs) | |
gs.each { GraphicsDevice gd -> | |
GraphicsConfiguration[] gc = gd.configurations | |
gc.each { | |
println "Device: ${it.device} | Bounds: ${it.bounds}" | |
virtualBounds = virtualBounds.union( it.bounds ) | |
} | |
} | |
println "Total bounds: $virtualBounds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment