/[gzz]/gzz/gzz/view/buoy/BuoyAdaptor.java
ViewVC logotype

Diff of /gzz/gzz/view/buoy/BuoyAdaptor.java

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

revision 1.1 by tjl, Mon Feb 3 06:57:50 2003 UTC revision 1.2 by tjl, Tue Feb 4 05:31:39 2003 UTC
# Line 8  import gzz.*; Line 8  import gzz.*;
8  /** A class that manages the types of nodes in a buoy view.  /** A class that manages the types of nodes in a buoy view.
9   */   */
10  public class BuoyAdaptor implements BuoyViewNodeType {  public class BuoyAdaptor implements BuoyViewNodeType {
     CellBuoyViewNodeType[] cellNodes;  
11    
12        /** The cell node types used by the current instance.
13         */
14        public CellBuoyViewNodeType[] cellNodes;
15    
16        /** The cell-to-X link types used by the current instance.
17         */
18        public CellBuoyViewLinker[] cellLinkers;
19    
20        /** Get the node type that is responsible for showing the
21         * given Cell.
22         */
23      private CellBuoyViewNodeType getNode(Cell c) {      private CellBuoyViewNodeType getNode(Cell c) {
24          for(int i=0; i<cellNodes.length; i++) {          for(int i=0; i<cellNodes.length; i++) {
25              if(cellNodes[i].ownsCell(c)) {              if(cellNodes[i].ownsCell(c)) {
# Line 38  public class BuoyAdaptor implements Buoy Line 48  public class BuoyAdaptor implements Buoy
48          throw new Error("Unknown anchor!");          throw new Error("Unknown anchor!");
49      }      }
50    
51        /** An adaptor class that call
52         */
53      private class LinkAdaptor implements CellPlacementHook {      private class LinkAdaptor implements CellPlacementHook {
54          LinkAdaptor(BuoyLinkListener l) { this.l = l; }          LinkAdaptor(BuoyLinkListener l) { this.l = l; }
55          BuoyLinkListener l;          BuoyLinkListener l;
56    
57          public void placed(Cell c, VobScene sc, int b, ViewContext context) {          public void placed(Cell c, VobScene vs, int cs, ViewContext context) {
58                for(int i=0; i<cellLinkers.length; i++)
59                    cellLinkers[i].doLinks(c, vs, cs, BuoyAdaptor.this, l);
60          }          }
61      }      }
62    

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

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