summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-02-17 05:41:45 +0100
committerSven Gothel <[email protected]>2015-02-17 05:41:45 +0100
commit3ec3d5cedd7902b2fe14dc56a3f845cfe0752905 (patch)
tree0d22a4153f3faaf194ace0de1da5d6de513293f2 /src/newt/classes/com/jogamp
parent480f4251cf3cf530493611d8924f905cacc349d5 (diff)
MonitorDevice: Add 'throws IllegalStateException' for [query|set]CurrentMode(..) if !screen.isNativeValid()
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/MonitorDevice.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
index 9c12dcb58..ec38ce3c3 100644
--- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java
+++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
@@ -35,7 +35,6 @@ import com.jogamp.nativewindow.util.DimensionImmutable;
import com.jogamp.nativewindow.util.Rectangle;
import com.jogamp.nativewindow.util.RectangleImmutable;
import com.jogamp.nativewindow.util.SurfaceSize;
-
import com.jogamp.common.util.ArrayHashSet;
/**
@@ -317,16 +316,18 @@ public abstract class MonitorDevice {
* <p>
* The returned {@link MonitorMode} is element of the lists {@link #getSupportedModes()} and {@link Screen#getMonitorModes()}.
* </p>
+ * @throws IllegalStateException if the {@link #getScreen() associated screen} is not {@link Screen#isNativeValid() valid natively}.
* @see #getCurrentMode()
*/
- public abstract MonitorMode queryCurrentMode();
+ public abstract MonitorMode queryCurrentMode() throws IllegalStateException;
/**
* Set the current {@link com.jogamp.newt.MonitorMode}.
* @param mode to be made current, must be element of the list {@link #getSupportedModes()} and {@link Screen#getMonitorModes()}.
* @return true if successful, otherwise false
+ * @throws IllegalStateException if the {@link #getScreen() associated screen} is not {@link Screen#isNativeValid() valid natively}.
*/
- public abstract boolean setCurrentMode(MonitorMode mode);
+ public abstract boolean setCurrentMode(MonitorMode mode) throws IllegalStateException;
@Override
public String toString() {