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

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

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

revision 1.5 by tjl, Sun Apr 27 11:40:27 2003 UTC revision 1.6 by tjl, Mon Apr 28 08:57:27 2003 UTC
# Line 38  import java.awt.event.MouseEvent; Line 38  import java.awt.event.MouseEvent;
38  /** A BuoyViewNodeType showing areas of 2D planes rendered through  /** A BuoyViewNodeType showing areas of 2D planes rendered through
39   *  a View2D.   *  a View2D.
40   */   */
41  public class NodeType2D implements BuoyViewNodeType {  public class NodeType2D extends AbstractNodeType2D {
42      public static boolean dbg = false;      public static boolean dbg = false;
43      private static void pa(String s) { System.out.println(s); }      private static void pa(String s) { System.out.println(s); }
44    
45      public static int effigy = 0;      public static int effigy = 0;
46            
     protected View2D view2d;  
   
     public View2D getView2D() { return view2d; }  
47    
48      public NodeType2D(View2D view2d) {      public NodeType2D(View2D view2d) {
49          this.view2d = view2d;          super(view2d);
50      }      }
51            
52      public Object getSize(Object linkId, Object anchor,      public Object getSize(Object linkId, Object anchor,
# Line 66  public class NodeType2D implements BuoyV Line 63  public class NodeType2D implements BuoyV
63          if(effigy != 0) {          if(effigy != 0) {
64              Vob eff = org.nongnu.libvob.gl.GLRen.createQuad(effigy-1);              Vob eff = org.nongnu.libvob.gl.GLRen.createQuad(effigy-1);
65              vs.map.put( eff, into);              vs.map.put( eff, into);
             //vs.map.put(new org.nongnu.libvob.vobs.RectBgVob(  
         //              Color.green, true, Color.black), into);  
66              return into;              return into;
67          }          }
68          Pair p = (Pair)anchor;          Pair p = (Pair)anchor;
# Line 88  public class NodeType2D implements BuoyV Line 83  public class NodeType2D implements BuoyV
83  //      int box2paper = vs.coords.orthoBox(0, 0, 0, 0,  //      int box2paper = vs.coords.orthoBox(0, 0, 0, 0,
84  //                                         1, 1,  //                                         1, 1,
85  //                                         w, h);  //                                         w, h);
86          vs.matcher.add(into, box2paper, "BUOYPAP");          vs.matcher.add(into, box2paper, "BOX2PAPER");
87    
88          view2d.render(vs, plane, into, into, box2paper);          view2d.render(vs, plane, into, into, box2paper);
89    
90          return vs.coords.translate(into, w/2f, h/2f);          return vs.coords.translate(into, w/2f, h/2f);
91      }      }
   
     public BuoyViewMainNode createMainNode(Object linkId,  
                                            Object anchor) {  
         Pair p = (Pair)anchor;  
         Object plane = p.first;  
         Rectangle rect = (Rectangle)p.second;  
   
         return new MainNode2D(plane, view2d,  
                               rect.x+rect.width/2f,  
                               rect.y+rect.height/2f, 1);  
     }  
92  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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