diff options
author | Sven Gothel <[email protected]> | 2013-05-07 00:35:08 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-05-07 00:35:08 +0200 |
commit | 84576bc0b7c5bd9b7554ec02f01786228efdbe07 (patch) | |
tree | 8544a03b8df8a92a62e1a36ada8d462ca22747bc /src/newt/classes/jogamp | |
parent | 5fb7f6322863e11892ace100e131ac7451ba8274 (diff) |
MonitorMode: Fix API doc / comments / names.
Diffstat (limited to 'src/newt/classes/jogamp')
6 files changed, 41 insertions, 41 deletions
diff --git a/src/newt/classes/jogamp/newt/MonitorDeviceImpl.java b/src/newt/classes/jogamp/newt/MonitorDeviceImpl.java index 96daed54a..db31cc83f 100644 --- a/src/newt/classes/jogamp/newt/MonitorDeviceImpl.java +++ b/src/newt/classes/jogamp/newt/MonitorDeviceImpl.java @@ -64,7 +64,7 @@ public class MonitorDeviceImpl extends MonitorDevice { // if mode has changed somehow, update it .. if( getCurrentMode().hashCode() != mmU.hashCode() ) { setCurrentModeValue(mmU); - sms.fireScreenModeChanged(this, mmU, true); + sms.fireMonitorModeChanged(this, mmU, true); } return mmU; } finally { @@ -75,7 +75,7 @@ public class MonitorDeviceImpl extends MonitorDevice { @Override public final boolean setCurrentMode(MonitorMode mode) { if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode.0: "+this+" -> "+mode); + System.err.println("Screen.setCurrentMode.0: "+this+" -> "+mode); } final ScreenImpl screenImpl = (ScreenImpl)screen; final ScreenMonitorState sms = screenImpl.getScreenMonitorStatus(true); @@ -88,7 +88,7 @@ public class MonitorDeviceImpl extends MonitorDevice { } if( mmU.equals( mmC ) ) { if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode: 0.0 is-current (skip) "+mmU+" == "+mmC); + System.err.println("Screen.setCurrentMode: 0.0 is-current (skip) "+mmU+" == "+mmC); } return true; } @@ -99,32 +99,32 @@ public class MonitorDeviceImpl extends MonitorDevice { tStart = 0; } - sms.fireScreenModeChangeNotify(this, mmU); + sms.fireMonitorModeChangeNotify(this, mmU); if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode ("+(System.nanoTime()-tStart)/1e6+"ms): fireScreenModeChangeNotify() "+mmU); + System.err.println("Screen.setCurrentMode ("+(System.nanoTime()-tStart)/1e6+"ms): fireModeChangeNotify() "+mmU); } boolean success = screenImpl.setCurrentMonitorModeImpl(this, mmU); if(success) { if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode ("+(System.nanoTime()-tStart)/1e6+"ms): setCurrentScreenModeImpl() "+mmU+", success(1): "+success); + System.err.println("Screen.setCurrentMode ("+(System.nanoTime()-tStart)/1e6+"ms): setCurrentModeImpl() "+mmU+", success(1): "+success); } } else { // 2nd attempt validate! - final MonitorMode queriedCurrent = queryCurrentMode(); // may fireScreenModeChanged(..) if successful and differs! + final MonitorMode queriedCurrent = queryCurrentMode(); // may fireModeChanged(..) if successful and differs! success = queriedCurrent.hashCode() == mmU.hashCode() ; if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode.2: queried "+queriedCurrent); - System.err.println("Screen.setCurrentScreenMode ("+(System.nanoTime()-tStart)/1e6+"ms): setCurrentScreenModeImpl() "+mmU+", success(2): "+success); + System.err.println("Screen.setCurrentMode.2: queried "+queriedCurrent); + System.err.println("Screen.setCurrentMode ("+(System.nanoTime()-tStart)/1e6+"ms): setCurrentModeImpl() "+mmU+", success(2): "+success); } } if( success ) { setCurrentModeValue(mmU); modeChanged = !isOriginalMode(); } - sms.fireScreenModeChanged(this, mmU, success); + sms.fireMonitorModeChanged(this, mmU, success); if(Screen.DEBUG) { - System.err.println("Screen.setCurrentScreenMode ("+(System.nanoTime()-tStart)/1e6+"ms): X.X "+this+", success: "+success); + System.err.println("Screen.setCurrentMode ("+(System.nanoTime()-tStart)/1e6+"ms): X.X "+this+", success: "+success); } return success; } finally { @@ -144,4 +144,4 @@ public class MonitorDeviceImpl extends MonitorDevice { return supportedModes; } -}
\ No newline at end of file +} diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java index 4d20fdb83..d7bd326fe 100644 --- a/src/newt/classes/jogamp/newt/ScreenImpl.java +++ b/src/newt/classes/jogamp/newt/ScreenImpl.java @@ -73,7 +73,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { protected Rectangle vOriginSize = new Rectangle(0, 0, 0, 0); // virtual rotated screen origin and size protected static Dimension usrSize = null; // property values: newt.ws.swidth and newt.ws.sheight protected static volatile boolean usrSizeQueried = false; - private ArrayList<MonitorModeListener> referencedScreenModeListener = new ArrayList<MonitorModeListener>(); + private ArrayList<MonitorModeListener> refMonitorModeListener = new ArrayList<MonitorModeListener>(); private long tCreated; // creationTime @@ -181,7 +181,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { throw new NativeWindowException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen"); } - initScreenMonitorState(); + initMonitorState(); if(DEBUG) { System.err.println("Screen.createNative() END ("+DisplayImpl.getThreadName()+", "+this+"), total "+ (System.nanoTime()-tCreated)/1e6 +"ms"); } @@ -195,7 +195,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { @Override public synchronized final void destroy() { - releaseScreenModeStatus(); + releaseMonitorState(); synchronized(screenList) { screenList.remove(this); @@ -261,7 +261,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { /** * Stores the virtual origin and virtual <b>rotated</b> screen size. * <p> - * This method is called after the ScreenMode has been set or changed, + * This method is called after the MonitorMode has been set or changed, * hence you may utilize it. * </p> * <p> @@ -393,7 +393,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { final String key = this.getFQName(); final ScreenMonitorState res = ScreenMonitorState.getScreenMonitorState(key); if(null == res & throwException) { - throw new InternalError("ScreenMonitorStatus.getScreenModeStatus("+key+") == null"); + throw new InternalError("ScreenMonitorStatus.getMonitorModeStatus("+key+") == null"); } return res; } @@ -403,8 +403,8 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { if(DEBUG) { System.err.println("monitorModeChangeNotify: "+me); } - for(int i=0; i<referencedScreenModeListener.size(); i++) { - ((MonitorModeListener)referencedScreenModeListener.get(i)).monitorModeChangeNotify(me); + for(int i=0; i<refMonitorModeListener.size(); i++) { + ((MonitorModeListener)refMonitorModeListener.get(i)).monitorModeChangeNotify(me); } } @@ -431,19 +431,19 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { if(DEBUG) { System.err.println("monitorModeChanged: success "+success+", "+me); } - for(int i=0; i<referencedScreenModeListener.size(); i++) { - ((MonitorModeListener)referencedScreenModeListener.get(i)).monitorModeChanged(me, success); + for(int i=0; i<refMonitorModeListener.size(); i++) { + ((MonitorModeListener)refMonitorModeListener.get(i)).monitorModeChanged(me, success); } } @Override public synchronized final void addMonitorModeListener(MonitorModeListener sml) { - referencedScreenModeListener.add(sml); + refMonitorModeListener.add(sml); } @Override public synchronized final void removeMonitorModeListener(MonitorModeListener sml) { - referencedScreenModeListener.remove(sml); + refMonitorModeListener.remove(sml); } private final MonitorMode getVirtualMonitorMode(int modeId) { @@ -503,11 +503,11 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { return res; } - private final ScreenMonitorState initScreenMonitorState() { + private final ScreenMonitorState initMonitorState() { long t0; if(DEBUG) { t0 = System.nanoTime(); - System.err.println("Screen.initScreenModeStatus() START ("+DisplayImpl.getThreadName()+", "+this+")"); + System.err.println("Screen.initMonitorState() START ("+DisplayImpl.getThreadName()+", "+this+")"); } else { t0 = 0; } @@ -549,7 +549,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { ScreenMonitorState.unlockScreenMonitorState(); } if(DEBUG) { - System.err.println("Screen.initScreenModeStatus() END dt "+ (System.nanoTime()-t0)/1e6 +"ms"); + System.err.println("Screen.initMonitorState() END dt "+ (System.nanoTime()-t0)/1e6 +"ms"); } if( !vScrnSizeUpdated ) { updateVirtualScreenOriginAndSize(); @@ -596,7 +596,7 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { return cache.monitorDevices.size(); } - private void releaseScreenModeStatus() { + private void releaseMonitorState() { ScreenMonitorState sms; ScreenMonitorState.lockScreenMonitorState(); try { @@ -666,4 +666,4 @@ public abstract class ScreenImpl extends Screen implements MonitorModeListener { } }); } -}
\ No newline at end of file +} diff --git a/src/newt/classes/jogamp/newt/ScreenMonitorState.java b/src/newt/classes/jogamp/newt/ScreenMonitorState.java index beeb7b922..7cda18521 100644 --- a/src/newt/classes/jogamp/newt/ScreenMonitorState.java +++ b/src/newt/classes/jogamp/newt/ScreenMonitorState.java @@ -137,7 +137,7 @@ public class ScreenMonitorState { lock(); try { if(!listener.remove(l)) { - throw new RuntimeException("ScreenModeListener "+l+" not contained"); + throw new RuntimeException("MonitorModeListener "+l+" not contained"); } if(DEBUG) { System.err.println("ScreenMonitorState.removeListener (size: "+listener.size()+"): "+l); @@ -159,7 +159,7 @@ public class ScreenMonitorState { } } - protected final void fireScreenModeChangeNotify(MonitorDevice monitor, MonitorMode desiredMode) { + protected final void fireMonitorModeChangeNotify(MonitorDevice monitor, MonitorMode desiredMode) { lock(); try { validateMonitor(monitor); @@ -172,7 +172,7 @@ public class ScreenMonitorState { } } - protected void fireScreenModeChanged(MonitorDevice monitor, MonitorMode currentMode, boolean success) { + protected void fireMonitorModeChanged(MonitorDevice monitor, MonitorMode currentMode, boolean success) { lock(); try { validateMonitor(monitor); diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 3a018d231..578dbec7b 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -254,7 +254,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer void destroyActionInLock(); /** - * Invoked for expensive modifications, ie while reparenting and ScreenMode change.<br> + * Invoked for expensive modifications, ie while reparenting and MonitorMode change.<br> * No lock is hold when invoked.<br> * * @return true is paused, otherwise false. If true {@link #resumeRenderingAction()} shall be issued. @@ -264,7 +264,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer boolean pauseRenderingAction(); /** - * Invoked for expensive modifications, ie while reparenting and ScreenMode change. + * Invoked for expensive modifications, ie while reparenting and MonitorMode change. * No lock is hold when invoked.<br> * * @see #pauseRenderingAction() @@ -311,7 +311,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } final long t0 = System.currentTimeMillis(); createNativeImpl(); - screen.addMonitorModeListener(screenModeListenerImpl); + screen.addMonitorModeListener(monitorModeListenerImpl); setTitleImpl(title); setPointerVisibleImpl(pointerVisible); confinePointerImpl(pointerConfined); @@ -937,7 +937,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } if( isNativeValid() ) { - screen.removeMonitorModeListener(screenModeListenerImpl); + screen.removeMonitorModeListener(monitorModeListenerImpl); closeNativeImpl(); final AbstractGraphicsDevice cfgADevice = config.getScreen().getDevice(); if( cfgADevice != screen.getDisplay().getGraphicsDevice() ) { // don't pull display's device @@ -1962,12 +1962,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } } - private class ScreenModeListenerImpl implements MonitorModeListener { + private class MonitorModeListenerImpl implements MonitorModeListener { boolean animatorPaused = false; public void monitorModeChangeNotify(MonitorEvent me) { if(DEBUG_IMPLEMENTATION) { - System.err.println("Window.screenModeChangeNotify: "+me); + System.err.println("Window.monitorModeChangeNotify: "+me); } if(null!=lifecycleHook) { @@ -1977,7 +1977,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer public void monitorModeChanged(MonitorEvent me, boolean success) { if(DEBUG_IMPLEMENTATION) { - System.err.println("Window.screenModeChanged: "+me+", success: "+success); + System.err.println("Window.monitorModeChanged: "+me+", success: "+success); } if(success) { @@ -2007,7 +2007,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener } } - private final ScreenModeListenerImpl screenModeListenerImpl = new ScreenModeListenerImpl(); + private final MonitorModeListenerImpl monitorModeListenerImpl = new MonitorModeListenerImpl(); diff --git a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java index 803c7e1de..653cbf945 100644 --- a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java @@ -562,7 +562,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 { surface=null; } if(getScreen().isNativeValid()) { - // if ScreenMode changed .. trigger ScreenMode event + // if MonitorMode changed .. trigger MonitorMode event final MonitorDevice mainMonitor = getMainMonitor(); mainMonitor.queryCurrentMode(); } diff --git a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java index ba22a6ce4..f2836f190 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java @@ -188,7 +188,7 @@ public class ScreenDriver extends ScreenImpl { }).booleanValue(); if(DEBUG || !done) { - System.err.println("X11Screen.setCurrentScreenModeImpl: TO ("+SCREEN_MODE_CHANGE_TIMEOUT+") reached: "+ + System.err.println("X11Screen.setCurrentMonitorModeImpl: TO ("+SCREEN_MODE_CHANGE_TIMEOUT+") reached: "+ (System.currentTimeMillis()-t0)+"ms; "+monitor.getCurrentMode()+" -> "+mode); } return done; |