use of com.canoo.dp.impl.platform.projector.view.View in project dolphin-platform by canoo.
the class ViewFactory method updateContentWrapper.
private Pane updateContentWrapper(StackPane mainPane, View projectable) {
List<Node> children = new ArrayList<>();
if (!mainPane.getChildren().isEmpty()) {
Pane internalPane = (Pane) mainPane.getChildren().get(0);
children.addAll(internalPane.getChildren());
mainPane.getChildren().clear();
}
Pane internalPane = Optional.of(projectable).map(p -> {
if (ViewMetadata.isOrientationVertical(p)) {
return new HBox();
} else {
return new VBox();
}
}).orElse(new HBox());
internalPane.getChildren().addAll(children);
mainPane.getChildren().add(internalPane);
return internalPane;
}
Aggregations