Update of /cvsroot/javanetsim/javaNetSim/guiUI
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24574/guiUI
Modified Files:
MainScreen.java
Log Message:
HTML generation to fila added. HTML headers added, HTML generation structure corrected.
Index: MainScreen.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** MainScreen.java 15 Sep 2007 12:36:21 -0000 1.58
--- MainScreen.java 15 Sep 2007 13:42:33 -0000 1.59
***************
*** 2837,2841 ****
* Generates HTML code from text in console.
* Is not used. generate_html_console_out_rapid is used instead.
! *
* P.S. Generation is independent of mConsole structure => slower that generate_html_console_out_rapid. Has some bugs with coloring
* that are not fixed due to my lazy mood.
--- 2837,2841 ----
* Generates HTML code from text in console.
* Is not used. generate_html_console_out_rapid is used instead.
! * @author gift (sourceforge.net user)
* P.S. Generation is independent of mConsole structure => slower that generate_html_console_out_rapid. Has some bugs with coloring
* that are not fixed due to my lazy mood.
***************
*** 2918,2922 ****
/**
* Generates HTML code from text in console.
! *
* P.S. Depends on mConsole structure => faster that generate_html_console_out and has less bugs with coloring :)
*/
--- 2918,2922 ----
/**
* Generates HTML code from text in console.
! * @author gift (sourceforge.net user)
* P.S. Depends on mConsole structure => faster that generate_html_console_out and has less bugs with coloring :)
*/
***************
*** 2926,2930 ****
int clr = 0xFFFFFF;
int r_c = mConsole.getRowCount();
! StringBuffer out = new StringBuffer(655360);
String cur;
--- 2926,2930 ----
int clr = 0xFFFFFF;
int r_c = mConsole.getRowCount();
! StringBuffer out = new StringBuffer(655360); //640Kb for a log stripe
String cur;
***************
*** 2974,2977 ****
--- 2974,3000 ----
return out;
}
+
+ /**
+ * Generates HTML code from text in node information.
+ *
+ * @author gift (sourceforge.net user)
+ */
+ public StringBuffer generate_html_node_info(){
+
+ int i,j;
+ StringBuffer out = new StringBuffer(10240); //approx 10 units in simulation
+ String cur;
+
+ if (true)
+ {
+ out.append("<BR />Sorry :) not implemented yet.<BR /><BR />");
+ } else
+ {
+ out.append("<BR />Nothing to show in node information.<BR />");
+ }
+
+ return out;
+ }
+
class GraphicFilter extends FileFilter{
***************
*** 3243,3251 ****
/**
* Generates HTML report of the simulation
! *
*/
public void generate_html_report()
! {
! this.addToConsole(generate_html_console_out_rapid().toString());
}
--- 3266,3295 ----
/**
* Generates HTML report of the simulation
! * @author gift (sourceforge.net user)
*/
public void generate_html_report()
! {
! FileWriter f_out;
!
! try {
! f_out = new FileWriter("c:\\jns_rpt.htm");
!
! f_out.write("<HTML>\r\n" +
! "<HEAD>\r\n" +
! "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1251\">\r\n" +
! "<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\r\n" +
! "<META HTTP-EQUIV=\"Author\" CONTENT=\"javaNetSim, http://sf.net/projects/javanetsim\">\r\n" +
! "<META HTTP-EQUIV=\"Keywords\" CONTENT=\"javaNetSim, network simulator, eth, ethernet, nets, ip, tcp, udp, switch, hub, dod\">\r\n" +
! "<!-- <LINK REL=stylesheet type=text/css href=\"style.css\"> -->\r\n" +
! "<TITLE>javaNetSim HTML report</TITLE>\r\n" +
! "</HEAD>\r\n\r\n");
! f_out.write(generate_html_node_info().toString());
! f_out.write(generate_html_console_out_rapid().toString());
! f_out.write("\r\n<!-- close html file -->>\r\n</HTML>");
! f_out.close();
! } catch (IOException ex) {
! addToConsole(ex.toString());
! }
!
}
|