/[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.18 by tjl, Wed Jul 30 09:11:46 2003 UTC revision 1.19 by tjl, Wed Jul 30 12:38:32 2003 UTC
# Line 94  public static final String rcsid = "$Id$ Line 94  public static final String rcsid = "$Id$
94                  Object obj = iter.next();                  Object obj = iter.next();
95                  Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj);                  Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj);
96                  if (container == plane) continue;                  if (container == plane) continue;
97                  Object anchor = new Triple(plane, getRect(obj), obj);                  Object anchor = getAnchor(plane, obj);
98                  if (dbg) pa("rect:"+getRect(obj));                  if (dbg) pa("rect:"+anchor);
99                  l.link(1, cs, nodeType, new Pair(node, obj), anchor, shift);                  l.link(1, cs, nodeType, new Pair(node, obj), anchor, shift);
100                  shift++;                  shift++;
101              }              }
# Line 107  public static final String rcsid = "$Id$ Line 107  public static final String rcsid = "$Id$
107                  Object obj = iter.next();                  Object obj = iter.next();
108                  Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj);                  Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj);
109                  if (container == plane) continue;                  if (container == plane) continue;
110                  Object anchor = new Triple(plane, getRect(obj), obj);                  Object anchor = getAnchor(plane, obj);
111                  if (dbg) pa("rect:"+getRect(obj));                  if (dbg) pa("rect:"+anchor);
112                  l.link(-1, cs, nodeType, new Pair(obj, node), anchor, shift);                  l.link(-1, cs, nodeType, new Pair(obj, node), anchor, shift);
113                  shift++;                  shift++;
114              }              }
# Line 116  public static final String rcsid = "$Id$ Line 116  public static final String rcsid = "$Id$
116      }      }
117    
118      public int dx = 30, dy = 30;      public int dx = 30, dy = 30;
119      protected java.awt.Rectangle getRect(Object node) {      protected View2D.Anchor getAnchor(Object plane, Object node) {
120          if (node == null) throw new Error("Impossible!");          if (node == null) throw new Error("Impossible!");
121          float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x);          float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x);
122          float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y);          float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y);
123          org.nongnu.libvob.lava.placeable.Placeable p =          org.nongnu.libvob.lava.placeable.Placeable p =
124                  (org.nongnu.libvob.lava.placeable.Placeable)nodeView.f(fen.constgraph, node);                  (org.nongnu.libvob.lava.placeable.Placeable)nodeView.f(fen.constgraph, node);
125          return new java.awt.Rectangle((int)(x-dx), (int)(y-dy),          return new View2D.Anchor(plane,
126                                        (int)p.getWidth()+dx+dx,                                  x-dx, y-dy,
127                                        (int)p.getHeight()+dy+dy);                                    p.getWidth()+dx+dx,
128                                      p.getHeight()+dy+dy,
129                                      node);
130      }      }
131  }  }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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