changeset 6858:82eec770a3b2

RT-36723: [TitlePane] TitledPane's content have wrong alignment
author jgiles
date Wed, 23 Apr 2014 09:18:16 +1200
parents 54b08edc5557
children bb19e2b54285
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java modules/controls/src/main/java/javafx/scene/control/TitledPane.java
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Tue Apr 22 17:01:17 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Wed Apr 23 09:18:16 2014 +1200
@@ -91,11 +91,6 @@
             {
                 getStyleClass().setAll("content");
 
-                // RT-20266: We want to align the content container so the bottom of the content
-                // is at the bottom of the title region.  If we do not do this the
-                // content will be center aligned.
-                setAlignment(Pos.BOTTOM_CENTER);
-
                 if (content != null) {
                     getChildren().setAll(content);
                 }
--- a/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Tue Apr 22 17:01:17 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Wed Apr 23 09:18:16 2014 +1200
@@ -58,6 +58,13 @@
  * for this control.  Unexpected behavior will occur because the
  * TitledPane's height changes when it is opened or closed.</p>
  *
+ * <p>Note that whilst TitledPane extends from Labeled, the inherited properties
+ * are used to manipulate the TitledPane header, not the content area itself. If
+ * the intent is to modify the content area, consider using a layout container
+ * such as {@link javafx.scene.layout.StackPane} and setting your actual content
+ * inside of that. You can then manipulate the StackPane to get the layout
+ * results you are after.</p>
+ *
  * <p>Example:</p>
  * <pre><code>
  *  TitledPane t1 = new TitledPane("T1", new Button("B1"));