package nl.utwente.group10.ui.components;

import javafx.beans.property.StringProperty;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.shape.Circle;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

/**
 * Represent an Anchor point on either a Block or a Line
 * Integers are currently the only supported data type.
 * 
 * Other data types will be supported in the future
 */
public class ConnectionAnchor extends Circle implements Initializable {

    /** Indication of what dataType this Anchor supports.*/
    public StringProperty dataType;

    /** The fxmlLoader responsible for loading the fxml of this Block.*/
    private FXMLLoader fxmlLoader;

    public ConnectionAnchor() throws IOException {
        fxmlLoader = new FXMLLoader(getClass().getResource("/ui/ConnectionAnchor.fxml"));
        fxmlLoader.setRoot(this);
        fxmlLoader.setController(this);			

        fxmlLoader.load();
    }
    
    @Override
    public void initialize(URL location, ResourceBundle resources) {
    }
    
    public FXMLLoader getLoader(){
        return fxmlLoader;
    }

     /**
     * @param the type of data accepted by this Anchor.
     */
    public void setDataType(String dataType) {
        this.dataType.set(dataType);
    }

    /**
     * @return the type of data accepted by this Anchor.
     */
    public String getDataType() {
        return dataType.get();
    }
    
    /**
     * the StringProperty for the data type of this Anchor.
     * @return value
     */
    public StringProperty dataTypeProperty() {
        return dataType;
    }
}

@@ -40,53 +40,8 @@
 s;%0A%0A
-import javafx.beans.property.StringProperty;%0A
 impo
@@ -67,16 +67,16 @@
 Loader;%0A
+
 import j
@@ -472,106 +472,8 @@
 e %7B%0A
-%0A    /** Indication of what dataType this Anchor supports.*/%0A    public StringProperty dataType;%0A%0A
     
@@ -963,16 +963,16 @@
 ader()%7B%0A
+
         
@@ -999,496 +999,7 @@
    %7D
-%0A%0A     /**%0A     * @param the type of data accepted by this Anchor.%0A     */%0A    public void setDataType(String dataType) %7B%0A        this.dataType.set(dataType);%0A    %7D%0A%0A    /**%0A     * @return the type of data accepted by this Anchor.%0A     */%0A    public String getDataType() %7B%0A        return dataType.get();%0A    %7D%0A    %0A    /**%0A     * the StringProperty for the data type of this Anchor.%0A     * @return value%0A     */%0A    public StringProperty dataTypeProperty() %7B%0A        return dataType;%0A    %7D
 %0A%7D%0A

Remove dataType StringProperty from ConnectionAnchor