Update of /cvsroot/freenet/freenet/src/freenet/support/graph
In directory sc8-pr-cvs1:/tmp/cvs-serv19987/src/freenet/support/graph
Modified Files:
Color.java
Log Message:
Added ability for Color to render itself to a hex string.
Made some doubles (routing probabilities) show up with only two decimals instead of
many in various HTML views.
Made the OCM PeerHandler mode routing information section useable.
Index: Color.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/support/graph/Color.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- Color.java 8 Apr 2003 22:57:42 -0000 1.2
+++ Color.java 30 Oct 2003 13:09:58 -0000 1.3
@@ -57,4 +57,16 @@
return r == c.r && g == c.g && b == c.b;
} else return false;
}
+ public String toHexString(){
+ String sr = Integer.toHexString((int)(r & 0xFF));
+ if(sr.length() == 1)
+ sr = "0"+sr;
+ String sg = Integer.toHexString((int)(g & 0xFF));
+ if(sg.length() == 1)
+ sg = "0"+sg;
+ String sb = Integer.toHexString((int)(b & 0xFF));
+ if(sb.length() == 1)
+ sb = "0"+sb;
+ return sr+sg+sb;
+ }
}
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs