aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/handlers/Target.java
diff options
context:
space:
mode:
authorEduardo Pedroni <e.pedroni91@gmail.com>2015-05-27 13:24:23 +0200
committerEduardo Pedroni <e.pedroni91@gmail.com>2015-05-27 13:24:23 +0200
commit72f96333f0dd0bad05f3b5d10cf343cf21aa7e39 (patch)
tree1f138ac604b3d5f703301912d2c3863785a40792 /src/jcgp/gui/handlers/Target.java
parent1e7d7a9b09ca9d24b56cf33a168953ca033d7c53 (diff)
Brought back the old GUI, refactorings are now in dev and will be merged when completeHEADmaster
Diffstat (limited to 'src/jcgp/gui/handlers/Target.java')
-rw-r--r--src/jcgp/gui/handlers/Target.java70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/jcgp/gui/handlers/Target.java b/src/jcgp/gui/handlers/Target.java
deleted file mode 100644
index b050663..0000000
--- a/src/jcgp/gui/handlers/Target.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package jcgp.gui.handlers;
-
-import javafx.scene.shape.Circle;
-import javafx.scene.shape.Line;
-import jcgp.gui.population.GUIConnection;
-import jcgp.gui.population.GUIMutable;
-
-/**
- * @author Eduardo Pedroni
- *
- */
-public final class Target {
-
- /**
- * Private constructor to prevent instantiation.
- */
- private Target() {}
-
- private static GUIConnection targetConnection;
- private static GUIMutable sourceMutable;
- private static int connectionIndex;
- private static Line connectionLine;
- private static Circle sourceSocket;
- private static boolean prospecting = false;
-
- public static void start(Circle newSocket) {
- // store new socket
- sourceSocket = newSocket;
- // derive the rest of the information from it
- connectionIndex = Integer.valueOf(newSocket.getId());
- sourceMutable = (GUIMutable) newSocket.getParent();
- connectionLine = sourceMutable.getLines()[connectionIndex];
- }
-
- public static GUIMutable getSourceMutable() {
- return sourceMutable;
- }
-
- public static int getConnectionIndex() {
- return connectionIndex;
- }
-
- public static Line getConnectionLine() {
- return connectionLine;
- }
-
- public static Circle getSourceSocket() {
- return sourceSocket;
- }
-
- public static GUIConnection getTarget() {
- return targetConnection;
- }
-
- public static GUIConnection getCurrentConnection() {
- return sourceMutable.getConnections()[connectionIndex];
- }
-
- public static void setProspecting(boolean value) {
- prospecting = value;
- }
-
- public static boolean isProspecting() {
- return prospecting;
- }
-
- public static void setTarget(GUIConnection newTarget) {
- targetConnection = newTarget;
- }
-}