aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/Screen.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java
index 0e6895d4b..b8f096fc3 100644
--- a/src/newt/classes/com/jogamp/newt/Screen.java
+++ b/src/newt/classes/com/jogamp/newt/Screen.java
@@ -238,6 +238,18 @@ public abstract class Screen {
return monitors.get(0);
}
+ public final MonitorDevice getMonitor(final int monitorId) {
+ final List<MonitorDevice> monitors = getMonitorDevices();
+ final int monitorCount = monitors.size();
+ for(int i=0; i<monitorCount; i++) {
+ final MonitorDevice monitor = monitors.get(i);
+ if( monitor.getId() == monitorId ) {
+ return monitor;
+ }
+ }
+ return null;
+ }
+
/**
* Calculates the union of all monitor's {@link MonitorDevice#getViewport() viewport} in pixel- and window units.
* <p>