/[fenfire]/fenfire/org/fenfire/view/lava/ContextNodeView.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/lava/ContextNodeView.java

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

revision 1.2 by tjl, Wed Jun 11 17:00:24 2003 UTC revision 1.3 by mudyc, Tue Jul 1 16:33:33 2003 UTC
# Line 32  import org.nongnu.libvob.*; Line 32  import org.nongnu.libvob.*;
32  import org.nongnu.libvob.vobs.*;  import org.nongnu.libvob.vobs.*;
33    
34  /** This node function uses caching for nodes which aren't focused,  /** This node function uses caching for nodes which aren't focused,
35   * othervise uses noncached node functions.   * othervise uses noncached node functions. Caching can be
36     * reinitialized i.e., after loading a new state of graph.
37   */   */
38  public class ContextNodeView implements NodeFunction {  public class ContextNodeView implements NodeFunction {
39    
40      final NodeFunction cached, unCached;      final private NodeFunction nodef;
41        private NodeFunction cached, unCached;
42      private ContextNodeView.Context context = null;      private ContextNodeView.Context context = null;
43      private NodeFunction current;      private NodeFunction current;
44    
45      public ContextNodeView(NodeFunction cached,      public ContextNodeView(NodeFunction nodef, ConstGraph graph, int n) {
46                      NodeFunction uncached)          this.nodef = nodef;
47          {          this.unCached = nodef;
48              this.cached = cached;          current = unCached;
49              this.unCached = uncached;          reinit(graph, n);
             current = unCached;  
50      }      }
51    
52        public void reinit(ConstGraph graph, int n) {
53            this.cached = new CachedNodeFunction(n, graph, nodef);
54        }
55    
56      public void setContext(ContextNodeView.Context context) {      public void setContext(ContextNodeView.Context context) {
57          this.context = context;          this.context = context;
58      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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