From 634ff30472247bdfb03f1dffe74417601dd4743f Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 3 Mar 2012 13:37:51 -0800 Subject: j3dcore: preparation patch for cleanup of getViewList() users in VirtualUniverse No functional changes, just making the whitespace consistent. Signed-off-by: Harvey Harrison --- .../share/javax/media/j3d/VirtualUniverse.java | 269 ++++++++++----------- 1 file changed, 132 insertions(+), 137 deletions(-) (limited to 'src') diff --git a/src/classes/share/javax/media/j3d/VirtualUniverse.java b/src/classes/share/javax/media/j3d/VirtualUniverse.java index 38ab3ae..e5cfb6d 100644 --- a/src/classes/share/javax/media/j3d/VirtualUniverse.java +++ b/src/classes/share/javax/media/j3d/VirtualUniverse.java @@ -698,248 +698,243 @@ synchronized ViewPlatformRetained[] getViewPlatformList() { } - void disableFocusEvents() { - ViewPlatformRetained vp; +void disableFocusEvents() { + ViewPlatformRetained vp; View views[]; ViewPlatformRetained[] vps = getViewPlatformList(); enableFocus = false; if (vps != null) { - for (int i=0; i=0; j--) { + for (int i = 0; i < vps.length; i++) { + vp = vps[i]; + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.disableFocusEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.disableFocusEvents(); + } + } + } } +} - } - - void enableFocusEvents() { - ViewPlatformRetained vp; +void enableFocusEvents() { + ViewPlatformRetained vp; View views[]; ViewPlatformRetained[] vps = getViewPlatformList(); enableFocus = true; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.enableFocusEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.enableFocusEvents(); + } + } + } } - } - +} - void disableKeyEvents() { - ViewPlatformRetained vp; +void disableKeyEvents() { + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); View views[]; enableKey = false; if (vps != null) { - for (int i=0; i=0; j--) { + for (int i = 0; i < vps.length; i++) { + vp = vps[i]; + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.disableKeyEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.disableKeyEvents(); + } + } + } } - } - +} - void enableKeyEvents() { - ViewPlatformRetained vp; +void enableKeyEvents() { + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); View views[]; enableKey = true; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.enableKeyEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.enableKeyEvents(); + } + } + } } - } - +} - void disableMouseEvents() { +void disableMouseEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouse = false; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.disableMouseEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.disableMouseEvents(); + } + } + } } - } +} - void enableMouseEvents() { +void enableMouseEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouse = true; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.enableMouseEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.enableMouseEvents(); + } + } + } } - } - +} - void disableMouseMotionEvents() { +void disableMouseMotionEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouseMotion = false; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.disableMouseMotionEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.disableMouseMotionEvents(); + } + } + } } - } +} - void enableMouseMotionEvents() { +void enableMouseMotionEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouseMotion = true; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.enableMouseMotionEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.enableMouseMotionEvents(); + } + } + } } - } +} - void disableMouseWheelEvents() { +void disableMouseWheelEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouseWheel = false; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.disableMouseWheelEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.disableMouseWheelEvents(); + } + } + } } - } +} - void enableMouseWheelEvents() { +void enableMouseWheelEvents() { View views[]; - ViewPlatformRetained vp; + ViewPlatformRetained vp; ViewPlatformRetained[] vps = getViewPlatformList(); enableMouseWheel = true; if (vps != null) { - for (int i=0; i=0; j--) { + views = vp.getViewList(); + for (int j = views.length - 1; j >= 0; j--) { Enumeration cvs = views[j].getAllCanvas3Ds(); - while(cvs.hasMoreElements()) { + while (cvs.hasMoreElements()) { Canvas3D cv = cvs.nextElement(); - // offscreen canvas does not have event catcher - if (cv.eventCatcher != null) - cv.eventCatcher.enableMouseWheelEvents(); - } - } - } + // offscreen canvas does not have event catcher + if (cv.eventCatcher != null) + cv.eventCatcher.enableMouseWheelEvents(); + } + } + } } - } +} /** * Sets the "current" view (during view activation) for this virtual -- cgit v1.2.3