From 03411cbd9c6009f804b8471a673009d513e6893d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 14 Jul 2005 03:54:11 +0000 Subject: [PATCH] Various renamery. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3650 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/jme/JmeApp.java | 18 ++++++++---------- src/java/com/threerings/jme/JmeCanvasApp.java | 5 +++-- src/java/com/threerings/jme/JmeContext.java | 6 +++--- .../threerings/jme/client/JabberClient.java | 6 +++--- .../com/threerings/jme/client/JabberView.java | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/java/com/threerings/jme/JmeApp.java b/src/java/com/threerings/jme/JmeApp.java index fc8f09877..0ba2384a4 100644 --- a/src/java/com/threerings/jme/JmeApp.java +++ b/src/java/com/threerings/jme/JmeApp.java @@ -40,8 +40,8 @@ import com.jme.system.JmeException; import com.jme.system.PropertiesIO; import com.jme.system.lwjgl.LWJGLPropertiesDialog; -import com.jme.bui.event.InputDispatcher; -import com.jme.bui.event.PolledInputDispatcher; +import com.jme.bui.BRootNode; +import com.jme.bui.PolledRootNode; import com.jme.input.InputHandler; import com.jme.input.InputSystem; import com.jme.input.Mouse; @@ -339,7 +339,8 @@ public class JmeApp _iface = new Node("Interface"); _root.attachChild(_iface); - _dispatcher = new PolledInputDispatcher(_timer, _input, _iface); + _rnode = new PolledRootNode(_timer, _input); + _iface.attachChild(_rnode); // we don't hide the cursor InputSystem.getMouseInput().setCursorVisible(true); } @@ -401,11 +402,8 @@ public class JmeApp // recalculate the frame rate _timer.update(); - // update the input system - float timePerFrame = _timer.getTimePerFrame(); - _dispatcher.update(timePerFrame); - // run all of the controllers attached to nodes + float timePerFrame = _timer.getTimePerFrame(); _root.updateGeometricState(timePerFrame, true); // update our stats display if we have one @@ -516,8 +514,8 @@ public class JmeApp return _input; } - public InputDispatcher getInputDispatcher () { - return _dispatcher; + public BRootNode getRootNode () { + return _rnode; } }; @@ -530,7 +528,7 @@ public class JmeApp protected Camera _camera; protected InputHandler _input; - protected InputDispatcher _dispatcher; + protected BRootNode _rnode; protected long _targetFrameTicks; protected boolean _finished; diff --git a/src/java/com/threerings/jme/JmeCanvasApp.java b/src/java/com/threerings/jme/JmeCanvasApp.java index 10c59d464..3233c2287 100644 --- a/src/java/com/threerings/jme/JmeCanvasApp.java +++ b/src/java/com/threerings/jme/JmeCanvasApp.java @@ -33,7 +33,7 @@ import com.jme.system.DisplaySystem; import com.jme.util.awt.JMECanvas; import com.jme.util.awt.JMECanvasImplementor; -import com.jme.bui.event.CanvasInputDispatcher; +import com.jme.bui.CanvasRootNode; /** * Extends the basic {@link JmeApp} with the necessary wiring to use the @@ -105,7 +105,8 @@ public class JmeCanvasApp extends JmeApp _iface = new Node("Interface"); _root.attachChild(_iface); - _dispatcher = new CanvasInputDispatcher(_iface, _canvas); + _rnode = new CanvasRootNode(_canvas); + _iface.attachChild(_rnode); } /** This is used if we embed our GL display in an AWT component. */ diff --git a/src/java/com/threerings/jme/JmeContext.java b/src/java/com/threerings/jme/JmeContext.java index 98205ea30..c9f4acdf1 100644 --- a/src/java/com/threerings/jme/JmeContext.java +++ b/src/java/com/threerings/jme/JmeContext.java @@ -27,7 +27,7 @@ import com.jme.renderer.Renderer; import com.jme.scene.Node; import com.jme.system.DisplaySystem; -import com.jme.bui.event.InputDispatcher; +import com.jme.bui.BRootNode; /** * Provides access to the various bits needed by things that operate in @@ -53,6 +53,6 @@ public interface JmeContext /** Returns our main input handler. */ public InputHandler getInputHandler (); - /** Returns our main input dispatcher. */ - public InputDispatcher getInputDispatcher (); + /** Returns our UI root node. */ + public BRootNode getRootNode (); } diff --git a/tests/src/java/com/threerings/jme/client/JabberClient.java b/tests/src/java/com/threerings/jme/client/JabberClient.java index 31e36007d..25716e05d 100644 --- a/tests/src/java/com/threerings/jme/client/JabberClient.java +++ b/tests/src/java/com/threerings/jme/client/JabberClient.java @@ -21,7 +21,7 @@ package com.threerings.jme.client; -import com.jme.bui.event.InputDispatcher; +import com.jme.bui.BRootNode; import com.jme.input.InputHandler; import com.jme.renderer.Camera; import com.jme.renderer.Renderer; @@ -207,8 +207,8 @@ public class JabberClient // return _app.getContext().getBufferedInputHandler(); // } - public InputDispatcher getInputDispatcher () { - return _app.getContext().getInputDispatcher(); + public BRootNode getRootNode () { + return _app.getContext().getRootNode(); } } diff --git a/tests/src/java/com/threerings/jme/client/JabberView.java b/tests/src/java/com/threerings/jme/client/JabberView.java index e9632bd64..baed98909 100644 --- a/tests/src/java/com/threerings/jme/client/JabberView.java +++ b/tests/src/java/com/threerings/jme/client/JabberView.java @@ -30,7 +30,7 @@ public class JabberView extends BWindow _chat = new ChatView(_jctx, _ctx.getChatDirector()); add(_chat, BorderLayout.CENTER); - _jctx.getInputDispatcher().addWindow(this); + _jctx.getRootNode().addWindow(this); setBounds(0, 40, 640, 240); }