--- old/apps/toys/Hello/src/main/java/hello/HelloTitledPane.java 2014-05-29 16:06:57.000000000 -0400 +++ new/apps/toys/Hello/src/main/java/hello/HelloTitledPane.java 2014-05-29 16:06:57.000000000 -0400 @@ -31,8 +31,11 @@ import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; import javafx.scene.control.TextField; import javafx.scene.control.TitledPane; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.StackPane; @@ -95,9 +98,22 @@ bf.setPrefSize(75, 50); uncollapsible.setContent(bf); + // -- Content is a ScrollPane + Image image = new Image("hello/duke.jpg", 200f, 200f, true, true, false); + ImageView imageView = new ImageView(); + imageView.setImage(image); + + ScrollPane scrollPane = new ScrollPane(imageView); + scrollPane.setPannable(true); + + TitledPane scrollableImage = new TitledPane(); + scrollableImage.setPrefHeight(100); + scrollableImage.setText("ScrollPane content"); + scrollableImage.setContent(scrollPane); + VBox hbox = new VBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); - hbox.getChildren().setAll(normal, gridTitlePane, normalText, unanimated, uncollapsible); + hbox.getChildren().setAll(normal, gridTitlePane, normalText, unanimated, uncollapsible, scrollableImage); Scene scene = new Scene(hbox); scene.setFill(Color.GHOSTWHITE); --- old/modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css 2014-05-29 16:06:58.000000000 -0400 +++ new/modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css 2014-05-29 16:06:58.000000000 -0400 @@ -1103,7 +1103,7 @@ } .scroll-pane.edge-to-edge > .scroll-bar, .tab-pane > * > .scroll-pane > .scroll-bar, -.titled-pane > * > * > .scroll-pane > .scroll-bar { +.titled-pane > .content > .scroll-pane > .scroll-bar { -fx-background-insets: 0; -fx-padding: 0; } @@ -1111,8 +1111,8 @@ .scroll-pane.edge-to-edge > .scroll-bar > .decrement-button, .tab-pane > * > .scroll-pane > .scroll-bar > .increment-button, .tab-pane > * > .scroll-pane > .scroll-bar > .decrement-button, -.titled-pane > * > * > .scroll-pane > .scroll-bar > .increment-button, -.titled-pane > * > * > .scroll-pane > .scroll-bar > .decrement-button { +.titled-pane > .content > .scroll-pane > .scroll-bar > .increment-button, +.titled-pane > .content > .scroll-pane > .scroll-bar > .decrement-button { -fx-padding: 0.25em; /* 3px */ } @@ -2938,27 +2938,28 @@ .split-pane > * > .accordion > .first-titled-pane:collapsed > .title { -fx-background-insets: 0,0 0 0 0, 1 1 1 1; } -.titled-pane > * > * > .split-pane, -.titled-pane > * > * > .text-area, -.titled-pane > * > * > .html-editor, -.titled-pane > * > * > .list-view, -.titled-pane > * > * > .tree-view, -.titled-pane > * > * > .table-view, -.titled-pane > * > * > .tree-table-view, -.titled-pane > * > * > .scroll-pane { +.titled-pane > .content > .split-pane, +.titled-pane > .content > .text-area, +.titled-pane > .content > .html-editor, +.titled-pane > .content > .list-view, +.titled-pane > .content > .tree-view, +.titled-pane > .content > .table-view, +.titled-pane > .content > .tree-table-view, +.titled-pane > .content > .scroll-pane { -fx-background-color: null; -fx-background-insets: 0, 0; -fx-padding: 0; } -.titled-pane > * > * > AnchorPane, -.titled-pane > * > * > BorderPane, -.titled-pane > * > * > FlowPane, -.titled-pane > * > * > GridPane, -.titled-pane > * > * > HBox, -.titled-pane > * > * > Pane, -.titled-pane > * > * > StackPane, -.titled-pane > * > * > TilePane, -.titled-pane > * > * > VBox { + +.titled-pane > .content > AnchorPane, +.titled-pane > .content > BorderPane, +.titled-pane > .content > FlowPane, +.titled-pane > .content > GridPane, +.titled-pane > .content > HBox, +.titled-pane > .content > Pane, +.titled-pane > .content > StackPane, +.titled-pane > .content > TilePane, +.titled-pane > .content > VBox { -fx-padding: 0.8em; }