例如,
fLine.setStartX(aNode.getLayoutX());
fLine.setStartY(aNode.getLayoutY());
fLine.endXProperty().bind(bNode.layoutXProperty());
fLine.endYProperty().bind(bNode.layoutYProperty());
我想,
fLine.setStartX(aNode.getLayoutX());
fLine.setStartY(aNode.getLayoutY());
fLine.endXProperty().bind(bNode.layoutXProperty()+10);
fLine.endYProperty().bind(bNode.layoutYProperty()+10);
我该怎么做?
答案 0 :(得分:2)
你可以
fLine.endXProperty().bind(bNode.layoutXProperty().add(10));
fLine.endYProperty().bind(bNode.layoutYProperty().add(10));