MapNode[] nodes = getNodeList();
if (!isMap || !hideNetwork) {
g.setColor(LINK_COLOR);
for (MapNode n : nodes) {
for (int j = 0, mu = n.node.getLinkCount(); j < mu; j++) {
Link link = n.node.getLink(j);
MapNode linkNode = addMapNode(link.node);
int x2 = linkNode.x;
int y2 = linkNode.y;
g2d.drawLine(n.x, n.y, x2, y2);
drawArrow(g, n.x, n.y, x2, y2, 3);
if (!hideNetwork) {
int xn1, xn2, yn1, yn2;
if (n.x <= x2) {
xn1 = n.x; xn2 = x2;
yn1 = n.y; yn2 = y2;
} else {
xn1 = x2; xn2 = n.x;
yn1 = y2; yn2 = n.y;
}
int dx = xn1 + (xn2 - xn1) / 2 + 4;
int dy = yn1 + (yn2 - yn1) / 2 - fnDescent;
if (yn2 < yn1) {
dy += fnHeight - fnDescent;
}
g.drawString(
Double.toString(((int) (link.getETX() * etxFactor * 100 + 0.5)) / 100.0),
dx, dy);
}
}
}
}