diff --git a/jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java b/jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java index 005a579b7e..e15dbeb930 100644 --- a/jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java +++ b/jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java @@ -557,13 +557,13 @@ private Rect getSurfaceFrame() { } @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; } diff --git a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java index e74874b095..47f0a90f1b 100644 --- a/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java +++ b/jme3-core/src/main/java/com/jme3/app/LegacyApplication.java @@ -825,8 +825,8 @@ public Object call() { * * @return returns a list of monitors and their information. */ - public Monitors getMonitors() { - return context.getMonitors(); + public Displays getDisplays() { + return context.getDisplays(); } /** @@ -835,7 +835,7 @@ public Monitors getMonitors() { * * @return the position of the value in the arraylist of the primary monitor. */ - public int getPrimaryMonitor() { - return context.getPrimaryMonitor(); + public int getPrimaryDisplay() { + return context.getPrimaryDisplay(); } } diff --git a/jme3-core/src/main/java/com/jme3/system/MonitorInfo.java b/jme3-core/src/main/java/com/jme3/system/DisplayInfo.java similarity index 97% rename from jme3-core/src/main/java/com/jme3/system/MonitorInfo.java rename to jme3-core/src/main/java/com/jme3/system/DisplayInfo.java index a7791d37b2..249d7f52ec 100644 --- a/jme3-core/src/main/java/com/jme3/system/MonitorInfo.java +++ b/jme3-core/src/main/java/com/jme3/system/DisplayInfo.java @@ -31,12 +31,12 @@ * * @author Kevin Bales */ -public class MonitorInfo { +public class DisplayInfo { /** * monitorID - monitor id that was return from Lwjgl3. */ - public long monitorID = 0; + public long displayID = 0; /** * width - width that was return from Lwjgl3. diff --git a/jme3-core/src/main/java/com/jme3/system/Monitors.java b/jme3-core/src/main/java/com/jme3/system/Displays.java similarity index 81% rename from jme3-core/src/main/java/com/jme3/system/Monitors.java rename to jme3-core/src/main/java/com/jme3/system/Displays.java index b834e518f8..ea61eefd6a 100644 --- a/jme3-core/src/main/java/com/jme3/system/Monitors.java +++ b/jme3-core/src/main/java/com/jme3/system/Displays.java @@ -28,24 +28,24 @@ import java.util.ArrayList; /** - * This class holds all information about all monitors that where return from the glfwGetMonitors() + * This class holds all information about all displays that where return from the glfwGetMonitors() * call. It stores them into an * * @author Kevin Bales */ -public class Monitors { +public class Displays { - private ArrayList monitors = new ArrayList(); + private ArrayList monitors = new ArrayList(); public int addNewMonitor(long monitorID) { - MonitorInfo info = new MonitorInfo(); - info.monitorID = monitorID; + DisplayInfo info = new DisplayInfo(); + info.displayID = monitorID; monitors.add(info); return monitors.size() - 1; } /** - * This function returns the size of the monitor ArrayList + * This function returns the size of the displays ArrayList * * @return the */ @@ -54,12 +54,12 @@ public int size() { } /** - * Call to get monitor information on a certain monitor. + * Call to get monitor information on a certain display. * - * @param pos the position in the arraylist of the monitor information that you want to get. - * @return returns the MonitorInfo data for the monitor called for. + * @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 MonitorInfo get(int pos) { + public DisplayInfo get(int pos) { if (pos < monitors.size()) return monitors.get(pos); @@ -76,7 +76,7 @@ public MonitorInfo get(int pos) { */ public void setInfo(int monPos, String name, int width, int height, int rate) { if (monPos < monitors.size()) { - MonitorInfo info = monitors.get(monPos); + DisplayInfo info = monitors.get(monPos); if (info != null) { info.width = width; info.height = height; @@ -91,9 +91,9 @@ public void setInfo(int monPos, String name, int width, int height, int rate) { * * @param monPos the position in the arraylist of which monitor is the primary monitor */ - public void setPrimaryMonitor(int monPos) { + public void setActiveMonitor(int monPos) { if (monPos < monitors.size()) { - MonitorInfo info = monitors.get(monPos); + DisplayInfo info = monitors.get(monPos); if (info != null) info.primary = true; } diff --git a/jme3-core/src/main/java/com/jme3/system/JmeContext.java b/jme3-core/src/main/java/com/jme3/system/JmeContext.java index 258639634f..d735033cef 100644 --- a/jme3-core/src/main/java/com/jme3/system/JmeContext.java +++ b/jme3-core/src/main/java/com/jme3/system/JmeContext.java @@ -227,18 +227,18 @@ public enum Type { public int getWindowYPosition(); /** - * This call will return a list of Monitors that glfwGetMonitors() returns and information about + * This call will return a list of Displays that glfwGetMonitors() returns and information about * the monitor, like width, height, and refresh rate. * - * @return returns a list of monitors and their information. + * @return returns a list of displays and their information. */ - public Monitors getMonitors(); + public Displays getDisplays(); /** - * Use this to get the positional number of the primary monitor from the glfwGetMonitors() + * Use this to get the positional number of the primary Displays from the glfwGetMonitors() * function call. * - * @return the position of the value in the arraylist of the primary monitor. + * @return the position of the value in the arraylist of the primary Displays. */ - public int getPrimaryMonitor(); + public int getPrimaryDisplay(); } diff --git a/jme3-core/src/main/java/com/jme3/system/NullContext.java b/jme3-core/src/main/java/com/jme3/system/NullContext.java index e58f143b45..b317ce24ed 100644 --- a/jme3-core/src/main/java/com/jme3/system/NullContext.java +++ b/jme3-core/src/main/java/com/jme3/system/NullContext.java @@ -308,13 +308,13 @@ public int getWindowYPosition() { } @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; } diff --git a/jme3-desktop/src/main/java/com/jme3/system/AWTContext.java b/jme3-desktop/src/main/java/com/jme3/system/AWTContext.java index c58b2c44af..095bcd6691 100644 --- a/jme3-desktop/src/main/java/com/jme3/system/AWTContext.java +++ b/jme3-desktop/src/main/java/com/jme3/system/AWTContext.java @@ -277,13 +277,13 @@ public int getWindowYPosition() { } @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; } diff --git a/jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java b/jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java index afb8003fcd..fc165bb1fd 100644 --- a/jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java +++ b/jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java @@ -330,13 +330,13 @@ public int getWindowYPosition() { } @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; } diff --git a/jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java b/jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java index bf3b837fdd..e4018f8f9e 100644 --- a/jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java +++ b/jme3-examples/src/main/java/jme3test/app/TestMonitorApp.java @@ -49,8 +49,8 @@ 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(); @@ -116,7 +116,7 @@ public void simpleInitApp() { // Get the selected monitor monitorSelected = settings.getMonitor(); - monitors = context.getMonitors(); + monitors = context.getDisplays(); if (monitors != null) numMonitors = monitors.size(); @@ -155,7 +155,7 @@ public void simpleInitApp() { // 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()); diff --git a/jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java b/jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java index 2a18b56569..0343dadbd8 100644 --- a/jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java +++ b/jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java @@ -269,13 +269,13 @@ public int getWindowYPosition() { } @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; } diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java index 7728c11257..7fe2964ac8 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java @@ -30,7 +30,7 @@ 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.Displays; import com.jme3.system.Platform; import java.awt.Canvas; import java.util.logging.Level; @@ -484,13 +484,13 @@ protected void createContext(AppSettings settings) { } @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; } diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java index 020746256b..1516dc54a1 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java @@ -34,7 +34,7 @@ import com.jme3.system.AppSettings; import com.jme3.system.JmeContext.Type; -import com.jme3.system.Monitors; +import com.jme3.system.Displays; import java.awt.Graphics2D; import java.awt.image.BufferedImage; @@ -285,13 +285,13 @@ private ByteBuffer imageToByteBuffer(BufferedImage image) { } @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; } diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java index 86add690a4..727890a981 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java @@ -38,7 +38,7 @@ 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 void setTitle(String title) { } @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; } diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java index d9f23baeeb..5770f1c437 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java @@ -43,7 +43,7 @@ import com.jme3.system.AppSettings; import com.jme3.system.JmeContext; import com.jme3.system.JmeSystem; -import com.jme3.system.Monitors; +import com.jme3.system.Displays; import com.jme3.system.NanoTimer; import com.jme3.util.BufferUtils; import com.jme3.util.SafeArrayList; @@ -882,12 +882,12 @@ public int getWindowYPosition() { * @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; } @@ -905,9 +905,9 @@ public int getPrimaryMonitor() * @return return the monitorID if found otherwise return Primary Monitor */ private long getMonitor(int pos) { - Monitors monitors = getMonitors(); + Displays monitors = getDisplays(); if (pos < monitors.size()) - return monitors.get(pos).monitorID; + return monitors.get(pos).displayID; LOGGER.log(Level.SEVERE,"Couldn't locate Monitor requested in the list of Monitors. pos:"+pos+" size: "+ monitors.size()); return glfwGetPrimaryMonitor(); @@ -922,17 +922,17 @@ private long getMonitor(int pos) { */ @Override - public Monitors getMonitors() { + public Displays getDisplays() { PointerBuffer monitors = glfwGetMonitors(); long primary = glfwGetPrimaryMonitor(); - Monitors monitorList = new Monitors(); + Displays monitorList = 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. if (primary == monitorI) - monitorList.setPrimaryMonitor(monPos); + monitorList.setActiveMonitor(monPos); final GLFWVidMode modes = glfwGetVideoMode(monitorI); String name = glfwGetMonitorName(monitorI); diff --git a/jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglDisplayVR.java b/jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglDisplayVR.java index f7f08126ba..2f557d8ae5 100644 --- a/jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglDisplayVR.java +++ b/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 Context getOpenCLContext() { } @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; }