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

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

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

revision 1.3 by tjl, Sun Apr 27 11:40:27 2003 UTC revision 1.4 by tjl, Mon Apr 28 08:57:27 2003 UTC
# Line 44  public static final String rcsid = "$Id$ Line 44  public static final String rcsid = "$Id$
44              if(!(next instanceof Pair)) continue;              if(!(next instanceof Pair)) continue;
45              Pair pair = (Pair)next;              Pair pair = (Pair)next;
46              int cs = m.getCS(parentCs, pair);              int cs = m.getCS(parentCs, pair);
47                int culledCS = m.getCS(cs, "CULL");
48                if(culledCS > 0) cs = culledCS;
49    
50              Object container = pair.first;              Object container = pair.first;
51              Object node = pair.second;              Object node = pair.second;
# Line 55  public static final String rcsid = "$Id$ Line 57  public static final String rcsid = "$Id$
57              while (iter.hasNext()) {              while (iter.hasNext()) {
58                  Object obj = iter.next();                  Object obj = iter.next();
59                  Object plane = fen.constgraph.find1_X11(PP.contains, obj);                  Object plane = fen.constgraph.find1_X11(PP.contains, obj);
60                  Pair anchor = new Pair(plane, getRect(node));                  Pair anchor = new Pair(plane, getRect(obj));
61                  l.link(1, cs, nodeType, new Pair(node, obj), anchor);                  l.link(1, cs, nodeType, new Pair(node, obj), anchor);
62              }              }
63    
64              // Left links!              // Left links!
65              iter = fen.constgraph.findN_X11_Iter(PP.association, node);              iter = fen.constgraph.findN_X11_Iter(PP.association, node);
66              while (iter.hasNext()) {              while (iter.hasNext()) {
67                  Object sub = iter.next();                  Object obj = iter.next();
68                  Object plane = fen.constgraph.find1_X11(PP.contains, sub);                  Object plane = fen.constgraph.find1_X11(PP.contains, obj);
69                  Pair anchor = new Pair(plane, getRect(node));                  Pair anchor = new Pair(plane, getRect(obj));
70                  l.link(-1, cs, nodeType, new Pair(sub, node), anchor);                  l.link(-1, cs, nodeType, new Pair(obj, node), anchor);
71              }              }
72          }          }
73      }      }
74    
75        public int dx = -100, dy = -200, w = 400, h = 400;
76      protected java.awt.Rectangle getRect(Object node) {      protected java.awt.Rectangle getRect(Object node) {
77          int x = RDFUtil.getInt(fen, node, SPATIAL.coordX);          int x = RDFUtil.getInt(fen, node, SPATIAL.coordX);
78          int y = RDFUtil.getInt(fen, node, SPATIAL.coordY);          int y = RDFUtil.getInt(fen, node, SPATIAL.coordY);
79          return new java.awt.Rectangle(x-20, y-20, 240, 140);          return new java.awt.Rectangle(x+dx, y+dy, w, h);
80      }      }
81  }  }

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

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