diff options
Diffstat (limited to 'src/jcgp/gui/population/GUIInput.java')
-rw-r--r-- | src/jcgp/gui/population/GUIInput.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/jcgp/gui/population/GUIInput.java b/src/jcgp/gui/population/GUIInput.java index d29851e..0fdf841 100644 --- a/src/jcgp/gui/population/GUIInput.java +++ b/src/jcgp/gui/population/GUIInput.java @@ -1,6 +1,7 @@ package jcgp.gui.population; import javafx.scene.paint.Paint; +import javafx.scene.shape.Circle; import jcgp.backend.population.Input; import jcgp.gui.constants.Constants; @@ -10,23 +11,34 @@ import jcgp.gui.constants.Constants; * @author Eduardo Pedroni * */ -public class GUIInput extends GUIGene { +public class GUIInput extends GUIConnection { /** * @param input */ public GUIInput(final Input input) { super(); + + Circle outputSocket = new Circle(Constants.NODE_RADIUS, 0, Constants.SOCKET_RADIUS, Paint.valueOf("white")); + outputSocket.setId(String.valueOf(0)); + outputSocket.setStroke(Paint.valueOf("black")); + + getChildren().addAll(outputSocket); } @Override public void mouseEnter() { - mainCircle.setFill(Paint.valueOf(Constants.SOFT_HIGHLIGHT_COLOUR)); + setState(GUIGeneState.HOVER); } @Override public void mouseExit() { - mainCircle.setFill(Paint.valueOf(Constants.NEUTRAL_COLOUR)); + setState(GUIGeneState.NEUTRAL); + } + + @Override + public void activeHover(boolean value) { + setState(value ? GUIGeneState.EXTENDED_HOVER : GUIGeneState.NEUTRAL); } } |