/[fenfire]/fenfire/org/fenfire/view/buoy/AbstractMainNode2D.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/buoy/AbstractMainNode2D.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by mudyc, Mon Aug 4 06:02:48 2003 UTC revision 1.39 by mudyc, Wed Aug 6 15:55:54 2003 UTC
# Line 26  AbstractMainNode2D.java Line 26  AbstractMainNode2D.java
26    
27  package org.fenfire.view.buoy;  package org.fenfire.view.buoy;
28  import org.fenfire.view.*;  import org.fenfire.view.*;
29  import org.fenfire.util.ControlBinding;  import org.nongnu.libvob.mouse.MouseMultiplexer;
30    
31  import org.nongnu.libvob.*;  import org.nongnu.libvob.*;
32  import org.nongnu.libvob.impl.DefaultVobMatcher;  import org.nongnu.libvob.impl.DefaultVobMatcher;
# Line 53  public abstract class AbstractMainNode2D Line 53  public abstract class AbstractMainNode2D
53      }      }
54                    
55    
56      /** The controller associated with this main node. */      /** The mouse controller associated with this main node. */
57      protected ControlBinding controller;      protected MouseMultiplexer mouseController;
58    
59      /** An object representing a focus on a 2D plane.      /** An object representing a focus on a 2D plane.
60       *  The SimpleFocus implementation below just stores       *  The SimpleFocus implementation below just stores
# Line 114  public abstract class AbstractMainNode2D Line 114  public abstract class AbstractMainNode2D
114      protected float boxw, boxh;      protected float boxw, boxh;
115    
116      public AbstractMainNode2D(Object plane, View2D view2d,      public AbstractMainNode2D(Object plane, View2D view2d,
117                                Focus focus, ControlBinding controller ) {                                Focus focus, MouseMultiplexer mouse) {
118          this.plane = plane; this.view2d = view2d;          this.plane = plane; this.view2d = view2d;
119          this.focus = focus; this.controller = controller;          this.focus = focus; this.mouseController = mouse;
120      }      }
121    
122    
123      /** Render the context into the main node view i.e.,      /** Render the context into the main node view i.e.,
124       * text cursor.       * text cursor.
125       */       */
126      static public Render context = null;      static public Context context = null;
127      public void keystroke(String s) {      public void keystroke(String s) {
128          throw new Error("Not implemented.");          throw new Error("Not implemented.");
129      }      }
# Line 133  public abstract class AbstractMainNode2D Line 133  public abstract class AbstractMainNode2D
133          if (context != null)          if (context != null)
134              context.mainNodeToBeRender(vs, into, this);              context.mainNodeToBeRender(vs, into, this);
135      }      }
136      public interface Render {      public interface Context {
137          void mainNodeToBeRender(VobScene vs, int into,          void mainNodeToBeRender(VobScene vs, int into,
138                                  AbstractMainNode2D main);                                  AbstractMainNode2D main);
139            boolean changeFastAfterMouseEvent();
140      }      }
141    
142      /** Cause the changes to the zooming and panning variables      /** Cause the changes to the zooming and panning variables
# Line 261  public abstract class AbstractMainNode2D Line 262  public abstract class AbstractMainNode2D
262      }      }
263    
264      public boolean mouse(VobMouseEvent e, VobScene oldVobScene) {      public boolean mouse(VobMouseEvent e, VobScene oldVobScene) {
265          return controller.handleEvent(this, e, oldVobScene);          mouseController.deliverEvent(e);
266            return context.changeFastAfterMouseEvent();
267      }      }
268    
269      public void chgFast(VobScene oldVobScene, int parent) {      public void chgFast(VobScene oldVobScene, int parent) {
# Line 271  public abstract class AbstractMainNode2D Line 273  public abstract class AbstractMainNode2D
273          View2D view = getView2D();          View2D view = getView2D();
274          while (view != null) {          while (view != null) {
275              if (view instanceof org.fenfire.view.lava.FastView)              if (view instanceof org.fenfire.view.lava.FastView)
                 /** Jams the machine if called.  
                  * ''Single Multiple'' views makes things awful.  
                  *  
                  * ...working on a better solution.  
                  */  
276                  ((org.fenfire.view.lava.FastView)view)                  ((org.fenfire.view.lava.FastView)view)
277                          .chgFast(oldVobScene, box2screen);                          .chgFast(oldVobScene, box2screen);
278              view = view.getChildView2D();              view = view.getChildView2D();

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26