package org.opendolphin.binding;

import javafx.scene.Node;
import org.opendolphin.core.PresentationModel;
import org.opendolphin.core.Tag;
import org.opendolphin.core.client.ClientAttribute;
import org.opendolphin.core.client.ClientPresentationModel;

public class JFXBindOfAble {
    public JFXBindToAble of(Node source) {
        return new JFXBindToAble(source, sourcePropertyName);
    }

    public BindToAble of(PresentationModel source) {
        return Binder.bind(sourcePropertyName, tag).of(source);
    }

    public BindClientToAble of(ClientPresentationModel source) {
        return new BindClientToAble((ClientAttribute) source.findAttributeByPropertyNameAndTag(sourcePropertyName, tag));
    }

    public BindPojoToAble of(Object source) {
        return Binder.bind(sourcePropertyName, tag).of(source);
    }

    public final String getSourcePropertyName() {
        return sourcePropertyName;
    }

    public final Tag getTag() {
        return tag;
    }

    public JFXBindOfAble(String sourcePropertyName, Tag tag) {
        this.sourcePropertyName = sourcePropertyName;
        this.tag = tag;
    }

    private final String sourcePropertyName;
    private final Tag tag;
}

@@ -826,159 +826,8 @@
  %7D%0A%0A
-    public final String getSourcePropertyName() %7B%0A        return sourcePropertyName;%0A    %7D%0A%0A    public final Tag getTag() %7B%0A        return tag;%0A    %7D%0A%0A
     

clean code for test coverage