blob: ebc23d05689879fad91ec72e8ca2a6cb13868d06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package jcgp.gui.population;
import javafx.scene.control.Label;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import jcgp.backend.population.Output;
import jcgp.gui.constants.Constants;
public class GUIOutput extends GUIGene implements GUIMutable {
private Output output;
private Line line;
public GUIOutput(final Output output, Line line) {
super();
this.output = output;
this.line = line;
Circle socket = new Circle(-Constants.NODE_RADIUS, 0, Constants.SOCKET_RADIUS, Paint.valueOf("white"));
socket.setId(String.valueOf(0));
socket.setStroke(Paint.valueOf("black"));
Label connectionLabel = new Label("S");
connectionLabel.setStyle("-fx-background-color:rgb(255, 255, 255); -fx-border-color:rgba(0, 0, 0, 0.5);");
connectionLabel.relocate(socket.getCenterX() + 5, socket.getCenterY() - 10);
connectionLabel.setVisible(false);
getChildren().addAll(socket, connectionLabel);
}
void setOutput(Output output2) {
}
public Output getOutput() {
return output;
}
public Line getLine() {
return line;
}
@Override
protected void setLinesVisible(boolean value) {
line.setVisible(true);
}
}
|