Component to connect 2 Node objects.
For this component it was created some other classes to permits some extensibility.
Line used with Connector should be child of Pane because it is added to Parent the init and end tips of line.
public Connectable(Connector connector, IConnection> initPoint, IConnection> endPoint)
There are more constructors with different parameters, but all will internally call this first one.
Variations :
Line line will use it to instantiate Connector.IComponent<Line> component will obtain Line from component.getNode().Node initNode and Node endNode will use them to instantiate Connection.IComponent<?> initComponent and IComponent<?> endComponent will obtain initNode and endNode from initComponent.getNode() and endComponent.getNode() respectively.
public Connectable(Connector connector, Node initNode, Node endNode)
public Connectable(Connector connector, IComponent> initComponent, IComponent> endComponent)
public Connectable(Line line, IConnection> initPoint, IConnection> endPoint)
public Connectable(Line line, Node initNode, Node endNode)
public Connectable(Line line, IComponent> initComponent, IComponent> endComponent)
public Connectable(IComponent component, IConnection> initPoint, IConnection> endPoint)
public Connectable(IComponent component, Node initNode, Node endNode)
public Connectable(IComponent component, IComponent> initComponent, IComponent> endComponent)
public Connectable(IConnection> initPoint, IConnection> endPoint)
public Connectable(Node initNode, Node endNode)
public Connectable(IComponent> initComponent, IComponent> endComponent)
Pane pane;
Button buttonA;
Button buttonB;
Connectable connectable = new Connectable(buttonA, buttonB);
connectable.connect();
pane.getChildren().add(connectable.getNode());