浏览代码

changing naming to "Display" instead of "Monitor"

KEVIN-DESKTOP\kevinba 1 年之前
父节点
当前提交
8ddb04bec3

+ 2 - 2
jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java

@@ -557,13 +557,13 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer, SoftTex
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }

+ 26 - 0
jme3-core/src/main/java/com/jme3/app/LegacyApplication.java

@@ -50,6 +50,7 @@ import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.Renderer;
 import com.jme3.renderer.ViewPort;
 import com.jme3.system.AppSettings;
+import com.jme3.system.Displays;
 import com.jme3.system.JmeContext;
 import com.jme3.system.JmeContext.Type;
 import com.jme3.system.JmeSystem;
@@ -882,4 +883,29 @@ public class LegacyApplication implements Application, SystemListener {
             return null;
         }
     }
+    
+    
+    /**
+     * This call will return a list of Monitors that glfwGetMonitors()
+     * returns and information about the monitor, like width, height, 
+     * and refresh rate.
+     * 
+     * @return returns a list of monitors and their information.
+     */
+    public Displays getDisplays()
+    {
+       return context.getDisplays();
+    }
+    
+    /**
+     * Use this to get the positional number of the primary
+     * monitor from the glfwGetMonitors() function call.
+     * 
+     * @return the position of the value in the arraylist of
+     *         the primary monitor.
+     */
+    public int getPrimaryDisplay()
+    {
+       return context.getPrimaryDisplay();
+    }
 }

+ 11 - 12
jme3-core/src/main/java/com/jme3/system/AppSettings.java

@@ -266,7 +266,7 @@ public final class AppSettings extends HashMap<String, Object> {
     public static final String JOAL = "JOAL";
 
     static {
-        defaults.put("Monitor", 0);
+        defaults.put("Display", 0);
         defaults.put("CenterWindow", true);
         defaults.put("Width", 640);
         defaults.put("Height", 480);
@@ -1483,31 +1483,30 @@ public final class AppSettings extends HashMap<String, Object> {
     
     
     /**
-     * Gets the monitor number used when creating a window.
+     * Gets the display number used when creating a window.
      *
      * <p>
-     * This setting is used only with LWJGL3, it defines which monitor to use when creating a OpenGL
+     * This setting is used only with LWJGL3, it defines which display to use when creating a OpenGL
      * window.
      *
-     * @return the desired monitor used when creating a OpenGL window
-     * @see #setMonitor(long)
+     * @return the desired display used when creating a OpenGL window
      */
-    public int getMonitor() {
-      return getInteger("Monitor");
+    public int getDisplay() {
+      return getInteger("Display");
     }
 
     /**
-     * Sets the monitor number used when creating a window. The position number is the number in the
+     * Sets the display number used when creating a window. The position number is the number in the
      * list of monitors GlfwGetMonitors returns.
      *
      * <p>
-     * This setting is used only with LWJGL3, it defines which monitor to use when creating a OpenGL
+     * This setting is used only with LWJGL3, it defines which display to use when creating a OpenGL
      * window. its default value is 0.
      *
-     * @param mon the desired monitor used when creating a OpenGL window
+     * @param mon the desired display used when creating a OpenGL window
      * 
      */
-    public void setMonitor(int mon) {
-      putInteger("Monitor", mon);
+    public void setDisplay(int mon) {
+      putInteger("Display", mon);
     }
   }

+ 66 - 0
jme3-core/src/main/java/com/jme3/system/DisplayInfo.java

@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2009-2023 jMonkeyEngine All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions
+ * and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided with
+ * the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+ * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.system;
+
+/**
+ * This class holds information about the display that was returned by glfwGetMonitors() calls in
+ * the context class
+ * 
+ * @author Kevin Bales
+ */
+public class DisplayInfo {
+
+  /**
+   * displayID - display id that was return from Lwjgl3.
+   */
+  public long displayID = 0;
+
+  /**
+   * width - width that was return from Lwjgl3.
+   */
+  public int width = 1080;
+
+  /**
+   * height - height that was return from Lwjgl3.
+   */
+  public int height = 1920;
+
+  /**
+   * rate - refresh rate that was return from Lwjgl3.
+   */
+  public int rate = 60;
+
+  /**
+   * primary - indicates if the display is the primary monitor.
+   */
+  public boolean primary = false;
+
+  /**
+   * name - display name that was return from Lwjgl3.
+   */
+  public String name = "Generic Monitor";
+
+}

+ 106 - 0
jme3-core/src/main/java/com/jme3/system/Displays.java

@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2009-2023 jMonkeyEngine All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted
+ * provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions
+ * and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials provided with
+ * the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors may be used to endorse or
+ * promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+ * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.system;
+
+import java.util.ArrayList;
+
+/**
+ * This class holds all information about all displays that where return from the glfwGetMonitors()
+ * call. It stores them into an ArrayList
+ * 
+ * @author Kevin Bales
+ */
+public class Displays {
+
+  private ArrayList<DisplayInfo> displays = new ArrayList<DisplayInfo>();
+
+  public int addNewMonitor(long displaysID) {
+    DisplayInfo info = new DisplayInfo();
+    info.displayID = displaysID;
+    displays.add(info);
+    return displays.size() - 1;
+  }
+
+  /**
+   * This function returns the size of the display ArrayList
+   * 
+   * @return the
+   */
+  public int size() {
+    return displays.size();
+  }
+
+  /**
+   * Call to get display information on a certain display.
+   * 
+   * @param pos the position in the ArrayList of the display information that you want to get.
+   * @return returns the DisplayInfo data for the display called for.
+   */
+  public DisplayInfo get(int pos) {
+    if (pos < displays.size())
+      return displays.get(pos);
+
+    return null;
+  }
+
+  /**
+   * Set information about this display stored in displayPos display in the array list.
+   * 
+   * @param displayPos ArrayList position of display to update
+   * @param name name of the display 
+   * @param width the current width the display is displaying
+   * @param height the current height the display is displaying
+   * @param rate the current refresh rate the display is set to
+   */
+  public void setInfo(int displayPos, String name, int width, int height, int rate) {
+    if (displayPos < displays.size()) {
+      DisplayInfo info = displays.get(displayPos);
+      if (info != null) {
+        info.width = width;
+        info.height = height;
+        info.rate = rate;
+        info.name = name;
+      }
+    }
+  }
+
+  /**
+   * This function will mark a certain display as the primary display.
+   * 
+   * @param displayPos the position in the ArrayList of which display is the primary display
+   */
+  public void setPrimaryDisplay(int displayPos) {
+    if (displayPos < displays.size()) {
+      DisplayInfo info = displays.get(displayPos);
+      if (info != null)
+        info.primary = true;
+    }
+
+  }
+
+
+
+}

+ 2 - 2
jme3-core/src/main/java/com/jme3/system/JmeContext.java

@@ -232,7 +232,7 @@ public interface JmeContext {
      * 
      * @return returns a list of monitors and their information.
      */
-    public Monitors getMonitors();
+    public Displays getDisplays();
 
     /**
      * Use this to get the positional number of the primary monitor from the glfwGetMonitors()
@@ -240,5 +240,5 @@ public interface JmeContext {
      * 
      * @return the position of the value in the arraylist of the primary monitor.
      */
-    public int getPrimaryMonitor();
+    public int getPrimaryDisplay();
   }

+ 2 - 2
jme3-core/src/main/java/com/jme3/system/NullContext.java

@@ -308,13 +308,13 @@ public class NullContext implements JmeContext, Runnable {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/system/AWTContext.java

@@ -277,13 +277,13 @@ public class AWTContext implements JmeContext {
     }
 
    @Override
-   public Monitors getMonitors() {
+   public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
    }
 
    @Override
-   public int getPrimaryMonitor() {
+   public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
    }

+ 2 - 2
jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java

@@ -330,13 +330,13 @@ public class AwtPanelsContext implements JmeContext {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
        // TODO Auto-generated method stub
        return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
        // TODO Auto-generated method stub
        return 0;
     }

+ 14 - 14
jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java

@@ -49,8 +49,8 @@ import com.jme3.material.Material;
 import com.jme3.scene.Geometry;
 import com.jme3.scene.shape.Box;
 import com.jme3.system.AppSettings;
-import com.jme3.system.MonitorInfo;
-import com.jme3.system.Monitors;
+import com.jme3.system.DisplayInfo;
+import com.jme3.system.Displays;
 
 /**
  * Tests the capability to change which monitor the window will be created on.
@@ -67,7 +67,7 @@ public class TestMonitorApp extends SimpleApplication
    private BitmapText selectedMonitorTxt;
    private BitmapText fullScreenTxt;
    private int monitorSelected = 0;
-   private Monitors monitors = null;
+   private Displays monitors = null;
 
    public static void main(String[] args) {
       TestMonitorApp app = new TestMonitorApp();
@@ -75,7 +75,7 @@ public class TestMonitorApp extends SimpleApplication
       settings.setResizable(false);
       app.setShowSettings(true);
       settings.setRenderer(AppSettings.LWJGL_OPENGL33);
-      settings.setMonitor(0);
+      settings.setDisplay(0);
       settings.setResolution(800, 600);
 
       settings.setFullscreen(true);
@@ -115,8 +115,8 @@ public class TestMonitorApp extends SimpleApplication
       }
 
       // Get the selected monitor
-      monitorSelected = settings.getMonitor();
-      monitors = context.getMonitors();
+      monitorSelected = settings.getDisplay();
+      monitors = context.getDisplays();
       if (monitors != null)
          numMonitors = monitors.size();
 
@@ -134,7 +134,7 @@ public class TestMonitorApp extends SimpleApplication
       if (!settings.isFullscreen())
          txt.setText("Window is on Monitor N/A (fullscreen only feature)");
       else
-         txt.setText("Window is on Monitor " + settings.getMonitor());
+         txt.setText("Window is on Monitor " + settings.getDisplay());
 
       txt.setLocalTranslation(0, settings.getHeight() - 40, 0);
       guiNode.attachChild(txt);
@@ -143,11 +143,11 @@ public class TestMonitorApp extends SimpleApplication
          selectedMonitorTxt = new BitmapText(loadGuiFont());
          // Lets display information about selected monitor
          String label = "Selected Monitor " + "Name: "
-                  + monitors.get(settings.getMonitor()).name + " "
+                  + monitors.get(settings.getDisplay()).name + " "
                   + monitorSelected + " Res: "
-                  + monitors.get(settings.getMonitor()).width + ","
-                  + monitors.get(settings.getMonitor()).height + " refresh: "
-                  + monitors.get(settings.getMonitor()).rate;
+                  + monitors.get(settings.getDisplay()).width + ","
+                  + monitors.get(settings.getDisplay()).height + " refresh: "
+                  + monitors.get(settings.getDisplay()).rate;
          selectedMonitorTxt.setText(label);
          selectedMonitorTxt.setLocalTranslation(0, settings.getHeight() - 80,
                   0);
@@ -155,7 +155,7 @@ public class TestMonitorApp extends SimpleApplication
 
          // Let's loop through all the monitors and display on the screen
          for (int i = 0; i < monitors.size(); i++) {
-            MonitorInfo monitor = monitors.get(i);
+            DisplayInfo monitor = monitors.get(i);
             labelValue = "Mon : " + i + " " + monitor.name + " " + monitor.width
                      + "," + monitor.height + " refresh: " + monitor.rate;
             txt = new BitmapText(loadGuiFont());
@@ -212,11 +212,11 @@ public class TestMonitorApp extends SimpleApplication
    public void saveSettings() {
 
       try {
-         settings.setMonitor(monitorSelected);
+         settings.setDisplay(monitorSelected);
          OutputStream out = new FileOutputStream("TestMonitorApp.prefs");
          settings.save(out);
 
-         int monitorSelected = settings.getMonitor();
+         int monitorSelected = settings.getDisplay();
          String label = "Selected Monitor " + monitorSelected + " "
                   + monitors.get(monitorSelected).name + " Res: "
                   + monitors.get(monitorSelected).width + ","

+ 2 - 2
jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java

@@ -269,13 +269,13 @@ public class IGLESContext implements JmeContext {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }

+ 3 - 3
jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java

@@ -27,10 +27,10 @@
 package com.jme3.system.lwjgl;
 
 import com.jme3.system.AppSettings;
+import com.jme3.system.Displays;
 import com.jme3.system.JmeCanvasContext;
 import com.jme3.system.JmeContext.Type;
 import com.jme3.system.JmeSystem;
-import com.jme3.system.Monitors;
 import com.jme3.system.Platform;
 import java.awt.Canvas;
 import java.util.logging.Level;
@@ -484,13 +484,13 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
   }
 
   @Override
-  public Monitors getMonitors() {
+  public Displays getDisplays() {
     // TODO Auto-generated method stub
     return null;
   }
 
   @Override
-  public int getPrimaryMonitor() {
+  public int getPrimaryDisplay() {
     // TODO Auto-generated method stub
     return 0;
   }

+ 3 - 3
jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java

@@ -33,8 +33,8 @@
 package com.jme3.system.lwjgl;
 
 import com.jme3.system.AppSettings;
+import com.jme3.system.Displays;
 import com.jme3.system.JmeContext.Type;
-import com.jme3.system.Monitors;
 
 import java.awt.Graphics2D;
 import java.awt.image.BufferedImage;
@@ -285,13 +285,13 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }

+ 3 - 3
jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java

@@ -38,7 +38,7 @@ import com.jme3.input.MouseInput;
 import com.jme3.input.TouchInput;
 import com.jme3.input.dummy.DummyKeyInput;
 import com.jme3.input.dummy.DummyMouseInput;
-import com.jme3.system.Monitors;
+import com.jme3.system.Displays;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.logging.Level;
@@ -221,13 +221,13 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }

+ 14 - 0
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java

@@ -31,6 +31,8 @@
  */
 package com.jme3.system.lwjgl;
 
+import com.jme3.system.Displays;
+
 /**
  * @author Daniel Johansson
  */
@@ -39,4 +41,16 @@ public class LwjglDisplay extends LwjglWindow {
     public LwjglDisplay() {
         super(Type.Display);
     }
+
+   @Override
+   public Displays getDisplays() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public int getPrimaryDisplay() {
+      // TODO Auto-generated method stub
+      return 0;
+   }
 }

+ 29 - 29
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

@@ -41,9 +41,9 @@ import com.jme3.input.lwjgl.GlfwKeyInput;
 import com.jme3.input.lwjgl.GlfwMouseInput;
 import com.jme3.math.Vector2f;
 import com.jme3.system.AppSettings;
+import com.jme3.system.Displays;
 import com.jme3.system.JmeContext;
 import com.jme3.system.JmeSystem;
-import com.jme3.system.Monitors;
 import com.jme3.system.NanoTimer;
 import com.jme3.util.BufferUtils;
 import com.jme3.util.SafeArrayList;
@@ -292,11 +292,11 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
 //        long monitor = NULL;
 
         /**
-         * Let's grab the monitor selected, if not found it will return
-         * primaryMonitor. if not full screen just use primary monitor data.
+         * Let's grab the display selected, if not found it will return
+         * primaryMonitor. if not full screen just use primary display data.
          */
         if (settings.isFullscreen()) {
-           monitor = getMonitor(settings.getMonitor());
+           monitor = getDisplay(settings.getDisplay());
         } else {
            monitor = glfwGetPrimaryMonitor();
         }
@@ -882,12 +882,12 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
      * @return returns the Primary Monitor Position.
      */
     @Override
-    public int getPrimaryMonitor()
+    public int getPrimaryDisplay()
     {
        long prim = glfwGetPrimaryMonitor();
-       Monitors monitors = getMonitors();
+       Displays monitors = getDisplays();
        for ( int i = 0; i < monitors.size(); i++ ) {
-          long monitorI = monitors.get(i).monitorID;
+          long monitorI = monitors.get(i).displayID;
           if (monitorI == prim)
              return i;
        }
@@ -898,41 +898,41 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
     
     
     /**
-     * This routines return the monitor ID by position in an array of monitors returned
+     * This routines return the display ID by position in an array of display returned
      * by glfwGetMonitors().
      * 
-     * @param pos  the position of the monitor in the list of monitors returned.
-     * @return return the monitorID if found otherwise return Primary Monitor
+     * @param pos  the position of the display in the list of displays returned.
+     * @return return the displayID if found otherwise return Primary display
      */
-    private long getMonitor(int pos) {
-       Monitors monitors = getMonitors();
-       if (pos < monitors.size())
-          return monitors.get(pos).monitorID;
+    private long getDisplay(int pos) {
+       Displays displays = getDisplays();
+       if (pos < displays.size())
+          return displays.get(pos).displayID;
        
-       LOGGER.log(Level.SEVERE,"Couldn't locate Monitor requested in the list of Monitors. pos:"+pos+" size: "+ monitors.size());
+       LOGGER.log(Level.SEVERE,"Couldn't locate Display requested in the list of Displays. pos:"+pos+" size: "+ displays.size());
        return glfwGetPrimaryMonitor();
     }
     
     /**
-     * This returns an arraylist of all the monitors returned by OpenGL get Monitor
-     * call.  It will also has some limited information about each monitor, like:
+     * This returns an arraylist of all the Display returned by OpenGL get Monitor
+     * call.  It will also has some limited information about each display, like:
      * width, height and refresh rate.
      * 
-     * @return returns an ArrayList of all Monitors returned by glfwGetMonitors()
+     * @return returns an ArrayList of all Display returned by glfwGetMonitors()
      */
     
     @Override
-    public Monitors getMonitors()  {
-       PointerBuffer monitors = glfwGetMonitors();
+    public Displays getDisplays()  {
+       PointerBuffer displays = glfwGetMonitors();
        long primary = glfwGetPrimaryMonitor();
-       Monitors monitorList = new Monitors();
+       Displays displayList = new Displays();
        
-       for ( int i = 0; i < monitors.limit(); i++ ) {
-           long monitorI = monitors.get(i);
-           int monPos = monitorList.addNewMonitor(monitorI);
-           //lets check if this monitor is the primary monitor. If use mark it as such.
+       for ( int i = 0; i < displays.limit(); i++ ) {
+           long monitorI = displays.get(i);
+           int monPos = displayList.addNewMonitor(monitorI);
+           //lets check if this display is the primary display. If use mark it as such.
            if (primary == monitorI)
-              monitorList.setPrimaryMonitor(monPos);
+              displayList.setPrimaryDisplay(monPos);
            
            final GLFWVidMode modes = glfwGetVideoMode(monitorI);
            String name = glfwGetMonitorName(monitorI);
@@ -940,9 +940,9 @@ public abstract class LwjglWindow extends LwjglContext implements Runnable {
            int width = modes.width();
            int height = modes.height();
            int rate = modes.refreshRate();
-           monitorList.setInfo(monPos, name, width, height, rate);
-           LOGGER.log(Level.INFO, "Monitor id: "+monitorI+" Resolution: " + width + " x " + height + " @ " + rate);
+           displayList.setInfo(monPos, name, width, height, rate);
+           LOGGER.log(Level.INFO, "Display id: "+monitorI+" Resolution: " + width + " x " + height + " @ " + rate);
         }
-        return monitorList;    
+        return displayList;    
     }
 }

+ 3 - 3
jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglDisplayVR.java

@@ -32,7 +32,7 @@
 package com.jme3.system.lwjgl;
 
 import com.jme3.opencl.Context;
-import com.jme3.system.Monitors;
+import com.jme3.system.Displays;
 
 /**
  * A VR oriented LWJGL display.
@@ -54,13 +54,13 @@ public class LwjglDisplayVR extends LwjglWindowVR {
     }
 
     @Override
-    public Monitors getMonitors() {
+    public Displays getDisplays() {
       // TODO Auto-generated method stub
       return null;
     }
 
     @Override
-    public int getPrimaryMonitor() {
+    public int getPrimaryDisplay() {
       // TODO Auto-generated method stub
       return 0;
     }