|
From: John W. <jwe...@us...> - 2008-03-12 17:00:15
|
Update of /cvsroot/strandmapservic/smsServer/WEB-INF/src/edu/cu/cs/sms/svg In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12000/WEB-INF/src/edu/cu/cs/sms/svg Modified Files: my_process_old.java Log Message: address some issues rendering the new maps Index: my_process_old.java =================================================================== RCS file: /cvsroot/strandmapservic/smsServer/WEB-INF/src/edu/cu/cs/sms/svg/my_process_old.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** my_process_old.java 3 Mar 2008 21:10:55 -0000 1.8 --- my_process_old.java 12 Mar 2008 17:00:02 -0000 1.9 *************** *** 1,3 **** ! /* * Copyright 2002-2005 Boulder Learning Technologies Lab & American Association for the Advancement of Science, * DLC-1B20, Department of Computer Science, University of Colorado at Boulder, --- 1,3 ---- ! /* * Copyright 2002-2005 Boulder Learning Technologies Lab & American Association for the Advancement of Science, * DLC-1B20, Department of Computer Science, University of Colorado at Boulder, *************** *** 633,639 **** drawMap(); ! //PrintWriter pw = new PrintWriter(new FileOutputStream("C:\\Documents and Settings\\Qianyi Gu\\Desktop\\TestFile.svg"),true); ! //pw.write(outs2.toString()); ! //pw.close(); --- 633,644 ---- drawMap(); ! ! /* ! ! PrintWriter pw = new PrintWriter(new FileOutputStream("C:\\Documents and Settings\\Qianyi Gu\\Desktop\\TestFile.svg"),true); ! pw.write(outs2.toString()); ! pw.close(); ! ! */ *************** *** 1302,1307 **** Iterator it = current_process.iterator(); ! while(it.hasNext()) ! System.out.println("BMK ID : "+((benchmark)it.next()).getID()); } --- 1307,1312 ---- Iterator it = current_process.iterator(); ! //while(it.hasNext()) ! //System.out.println("BMK ID : "+((benchmark)it.next()).getID()); } *************** *** 2050,2054 **** double white_ratio=1.1; ! System.out.println("width is"+box_w); double v_scale=0.0, h_scale=0.0; --- 2055,2059 ---- double white_ratio=1.1; ! //System.out.println("width is"+box_w); double v_scale=0.0, h_scale=0.0; *************** *** 2139,2142 **** --- 2144,2201 ---- Strand st5 = (Strand)StrandList.elementAt(4); //System.out.println("st1 is: " +st1); + + // process the strand name positions: + int strand1=-1,strand2=-2,strand3=-3,strand4=-4,strand5=-5; + int mypoint=0; + boolean overlap=false; + + if (st1.getV()>0) + { + strand1=st1.getV(); + } + + if (st2.getV()>0) + { + strand2=st2.getV(); + } + + if (st3.getV()>0) + { + strand3=st3.getV(); + } + + if (st4.getV()>0) + { + strand4=st4.getV(); + } + + if (st5.getV()>0) + { + strand5=st5.getV(); + } + + + + if ((strand1==strand2)||(strand1==strand3)||(strand1==strand4)||(strand1==strand5)||(strand2==strand3)||(strand2==strand4)||(strand2==strand5)||(strand3==strand4)||(strand3==strand5)||(strand4==strand5)) + { + strand1=1; + strand2=3; + strand3=5; + strand4=7; + strand5=9; + overlap=true; + + + } + + + + + + //System.out.println("Overlap is: "+overlap); + + + + if (intersection==false) *************** *** 2145,2149 **** if (st1.getV()>0) { ! stx=st1.getV(); SX=(double)(stx-minH)*h_scale; --- 2204,2208 ---- if (st1.getV()>0) { ! stx=strand1; SX=(double)(stx-minH)*h_scale; *************** *** 2152,2165 **** outs2.println("</a>"); ! System.out.println("Strand Name:"+st1.getName()+"; Strand Position"+stx); ! System.out.println("Strand Name:"+st1.getName()+"; Strand Position"+SX); } if (st2.getV()>0) { ! stx=st2.getV(); SX=(double)(stx-minH)*h_scale+5.0; // System.out.println("draw second strand name here:"+SX); //System.out.println("draw strand name here:"+st1.getV()+"; "+st1.getName()); outs2.println("<a xlink:href=\""+st2.getID()+"\">"); --- 2211,2233 ---- outs2.println("</a>"); ! //System.out.println("Strand Name:"+st1.getName()+"; Strand Position"+stx); ! //System.out.println("Strand Name:"+st1.getName()+"; Strand Position"+SX); } if (st2.getV()>0) { ! stx=strand2; SX=(double)(stx-minH)*h_scale+5.0; // System.out.println("draw second strand name here:"+SX); //System.out.println("draw strand name here:"+st1.getV()+"; "+st1.getName()); + + if (st2.getName().length()>60) + { + String tempname=st2.getName(); + int spacepos=tempname.indexOf(" ",35); + tempname=tempname.substring(0,spacepos); + st2.setName(tempname); + } + outs2.println("<a xlink:href=\""+st2.getID()+"\">"); *************** *** 2167,2171 **** outs2.println("</a>"); ! System.out.println("Strand Name:"+st2.getName()+"; Strand Position"+stx); } --- 2235,2239 ---- outs2.println("</a>"); ! //System.out.println("Strand Name:"+st2.getName()+"; Strand Position"+stx); } *************** *** 2173,2177 **** if (st3.getV()>0) { ! stx=st3.getV(); SX=(double)(stx-minH)*h_scale+25.0; // System.out.println("draw third strand name here:"+SX); --- 2241,2245 ---- if (st3.getV()>0) { ! stx=strand3; SX=(double)(stx-minH)*h_scale+25.0; // System.out.println("draw third strand name here:"+SX); *************** *** 2182,2186 **** outs2.println("</a>"); ! System.out.println("Strand Name:"+st3.getName()+"; Strand Position"+stx); --- 2250,2254 ---- outs2.println("</a>"); ! //System.out.println("Strand Name:"+st3.getName()+"; Strand Position"+stx); *************** *** 2189,2196 **** if (st4.getV()>0) { ! stx=st4.getV(); - if (st4.getV()<=st3.getV()) - {stx=stx+2;} SX=(double)(stx-minH)*h_scale+40.0; --- 2257,2263 ---- if (st4.getV()>0) { ! stx=strand4; ! SX=(double)(stx-minH)*h_scale+40.0; *************** *** 2201,2205 **** outs2.println("</a>"); ! System.out.println("Strand Name:"+st4.getName()+"; Strand Position"+stx); } --- 2268,2272 ---- outs2.println("</a>"); ! //System.out.println("Strand Name:"+st4.getName()+"; Strand Position"+stx); } *************** *** 2207,2211 **** if (st5.getV()>0) { ! stx=st5.getV(); SX=(double)(stx-minH)*h_scale-50.0; // System.out.println("draw fifth strand name here:"+st5.getV()); --- 2274,2278 ---- if (st5.getV()>0) { ! stx=strand5; SX=(double)(stx-minH)*h_scale-50.0; // System.out.println("draw fifth strand name here:"+st5.getV()); |