Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
small update to network drawing
orbiter579b22d8ff85
diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.javaindex d02a25b57..8d15742af 100644--- a/htroot/NetworkPicture.java+++ b/htroot/NetworkPicture.java@@ -88,6 +88,7 @@ public class NetworkPicture {// draw connected senior and principalsint count = 0;+ int totalCount = 0;Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null);while (e.hasMoreElements() && count < maxCount) {seed = (yacySeed) e.nextElement();@@ -96,6 +97,7 @@ public class NetworkPicture {count++;}}+ totalCount += count;// draw disconnected senior and principals that have been seen latelycount = 0;@@ -109,6 +111,7 @@ public class NetworkPicture {count++;}}+ totalCount += count;// draw juniors that have been seen latelycount = 0;@@ -122,13 +125,16 @@ public class NetworkPicture {count++;}}+ totalCount += count;// draw my own peerdrawPeer(img, width / 2, height / 2, radius, yacyCore.seedDB.mySeed, "800000", "FFFFFF");// draw descriptionimg.setColor("FFFFFF");- img.print(2, 8, "YACY NETWORK PICTURE / SNAPSHOT FROM " + new Date().toString().toUpperCase());+ img.print(2, 8, "YACY NETWORK PICTURE", true);+ img.print(2, 16, "DRAWING OF " + totalCount + " SELECTED PEERS", true);+ img.print(width - 2, 8, "SNAPSHOT FROM " + new Date().toString().toUpperCase(), false);return img.toImage(true);}diff --git a/htroot/imagetest.java b/htroot/imagetest.javaindex 1792376f6..f1065250d 100644--- a/htroot/imagetest.java+++ b/htroot/imagetest.java@@ -100,8 +100,8 @@ public class imagetest {img.setMode(ImagePainter.MODE_ADD);img.setColor(ImagePainter.ADDITIVE_BLACK);- for (int y = 0; y < 600; y = y + 50) img.print(0, 6 + y, "" + y);- for (int x = 0; x < 800; x = x + 50) img.print(x, 6 , "" + x);+ for (int y = 0; y < 600; y = y + 50) img.print(0, 6 + y, "" + y, true);+ for (int x = 0; x < 800; x = x + 50) img.print(x, 6 , "" + x, true);img.setColor(ImagePainter.ADDITIVE_RED);img.dot(550, 110, 90, true);img.setColor(ImagePainter.ADDITIVE_GREEN);@@ -114,9 +114,9 @@ public class imagetest {img.arc(220, 110, 50, 90, 30, 110);img.arc(210, 120, 50, 90, 30, 110);img.setColor(ImagePainter.ADDITIVE_BLACK);- img.print(50, 110, "BROADCAST MESSAGE #772: NODE %882 BLACK abcefghijklmnopqrstuvwxyz");+ img.print(50, 110, "BROADCAST MESSAGE #772: NODE %882 BLACK abcefghijklmnopqrstuvwxyz", true);img.setColor(ImagePainter.ADDITIVE_GREEN);- img.print(50, 120, "BROADCAST MESSAGE #772: NODE %882 GREEN abcefghijklmnopqrstuvwxyz");+ img.print(50, 120, "BROADCAST MESSAGE #772: NODE %882 GREEN abcefghijklmnopqrstuvwxyz", true);for (long i = 0; i < 256; i++) {img.setColor(i);img.dot(10 + 14 * (int) (i / 16), 200 + 14 * (int) (i % 16), 6, true);diff --git a/source/de/anomic/plasma/plasmaCrawlStacker.java b/source/de/anomic/plasma/plasmaCrawlStacker.javaindex 8f4cbfe9d..0c863e375 100644--- a/source/de/anomic/plasma/plasmaCrawlStacker.java+++ b/source/de/anomic/plasma/plasmaCrawlStacker.java@@ -1,4 +1,4 @@-// plasmaSwitchboard.java+// plasmaCrawlStacker.java// -----------------------// part of YaCy// (C) by Michael Peter Christen; [email protected]diff --git a/source/de/anomic/tools/ImagePainter.java b/source/de/anomic/tools/ImagePainter.javaindex b6e1d68bc..c202d979f 100644--- a/source/de/anomic/tools/ImagePainter.java+++ b/source/de/anomic/tools/ImagePainter.java@@ -307,10 +307,11 @@ public class ImagePainter {}- public void print(int x, int y, String message) {+ public void print(int x, int y, String message, boolean alignRight) {+ int xx = (alignRight) ? x : x - 6 * message.length();for (int i = 0; i < message.length(); i++) {- print(x, y, message.charAt(i));- x += 6;+ print(xx, y, message.charAt(i));+ xx += 6;}}@@ -326,7 +327,7 @@ public class ImagePainter {int xp = x - 3 * message.length();if ((angle > (90 + arcDist)) && (angle < (270 - arcDist))) xp = x - 6 * message.length();if ((angle < (90 - arcDist)) || (angle > (270 + arcDist))) xp = x;- print(xp, yp, message);+ print(xp, yp, message, true);}public void arcLine(int cx, int cy, int innerRadius, int outerRadius, int angle) {