|
@@ -445,7 +445,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
if (con.getState()) {
|
|
if (con.getState()) {
|
|
g2.setColor(Color.GREEN);
|
|
g2.setColor(Color.GREEN);
|
|
if (con.getCapacity() != -1) {
|
|
if (con.getCapacity() != -1) {
|
|
- g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
|
|
|
|
|
|
+ g2.setStroke(new BasicStroke(Math.min(((con.getFlow() / con.getCapacity() * 3)+1), 4)));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
g2.setColor(Color.RED);
|
|
g2.setColor(Color.RED);
|
|
@@ -490,7 +490,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
g2.setColor(Color.BLUE);
|
|
g2.setColor(Color.BLUE);
|
|
for (CpsEdge con : model.getEdgesOnCanvas()) {
|
|
for (CpsEdge con : model.getEdgesOnCanvas()) {
|
|
if (con.getFlow() <= con.getCapacity()) {
|
|
if (con.getFlow() <= con.getCapacity()) {
|
|
- g2.setStroke(new BasicStroke(Math.min((con.getFlow() / con.getCapacity() * 4), 4)));
|
|
|
|
|
|
+ g2.setStroke(new BasicStroke(Math.min(((con.getFlow() / con.getCapacity() * 3)+1), 4)));
|
|
} else {
|
|
} else {
|
|
g2.setStroke(new BasicStroke(2));
|
|
g2.setStroke(new BasicStroke(2));
|
|
}
|
|
}
|
|
@@ -531,7 +531,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
} else if (edgeHighlight != null) {
|
|
} else if (edgeHighlight != null) {
|
|
g2.setColor(Color.BLUE);
|
|
g2.setColor(Color.BLUE);
|
|
if (edgeHighlight.getFlow() <= edgeHighlight.getCapacity()) {
|
|
if (edgeHighlight.getFlow() <= edgeHighlight.getCapacity()) {
|
|
- g2.setStroke(new BasicStroke(Math.min((edgeHighlight.getFlow() / edgeHighlight.getCapacity() * 4), 4)));
|
|
|
|
|
|
+ g2.setStroke(new BasicStroke(Math.min(((edgeHighlight.getFlow() / edgeHighlight.getCapacity() * 3)+1), 4)));
|
|
} else {
|
|
} else {
|
|
g2.setStroke(new BasicStroke(2));
|
|
g2.setStroke(new BasicStroke(2));
|
|
}
|
|
}
|