package bugs; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; import javafx.scene.control.ScrollPane; import javafx.scene.control.Separator; import javafx.scene.layout.GridPane; import javafx.scene.text.Text; import javafx.stage.Stage; /** * * @author kwwong */ public class RT13783 extends Application { @Override public void start(Stage stage) throws Exception { String[] apiClasspaths = new String[] {"java.lang.String"}; GridPane sidebar = new GridPane(); sidebar.getStyleClass().add("right-sidebar"); sidebar.setMaxWidth(Double.MAX_VALUE); sidebar.setMaxHeight(Double.MAX_VALUE); int sideRow = 0; Label discTitle = new Label("Description"); discTitle.getStyleClass().add("right-sidebar-title"); GridPane.setConstraints(discTitle, 0, sideRow++); sidebar.getChildren().add(discTitle); Text disc = new Text("The description area of Ensemble does not render properly at first. It shows only part of description no api links shown. There are some small artifacts of links above the label \"Description\". If you mouse over this area then the api links show."); disc.setWrappingWidth(200); disc.getStyleClass().add("right-sidebar-body"); GridPane.setConstraints(disc, 0, sideRow++); sidebar.getChildren().add(disc); // docs if (apiClasspaths!=null && apiClasspaths.length>0) { Separator separator = new Separator(); GridPane.setConstraints(separator, 0, sideRow++); sidebar.getChildren().add(separator); Label docsTitle = new Label("API Documentation"); docsTitle.getStyleClass().add("right-sidebar-title"); GridPane.setConstraints(docsTitle, 0, sideRow++); sidebar.getChildren().add(docsTitle); for (String docPath:apiClasspaths) { Hyperlink link = new Hyperlink(docPath); GridPane.setConstraints(link, 0, sideRow++); sidebar.getChildren().add(link); break; } }; ScrollPane scrollPane = new ScrollPane(); scrollPane.getStyleClass().add("noborder-scroll-pane"); scrollPane.setNode(sidebar); scrollPane.setFitToWidth(true); Scene scene = new Scene(scrollPane, 500, 500); stage.setScene(scene); stage.setVisible(true); } public static void main(String[] args) { Application.launch(args); } }