< prev index next >

modules/javafx.graphics/src/main/java/javafx/scene/layout/Pane.java

Print this page




  74  * <td>top plus bottom insets.</td></tr>
  75  * <tr><th scope="row">preferred</th>
  76  * <td>width required to encompass each child at its current x location and preferred width.</td>
  77  * <td>height required to encompass each child at its current y location and preferred height.</td></tr>
  78  * <tr><th scope="row">maximum</th>
  79  * <td>Double.MAX_VALUE</td><td>Double.MAX_VALUE</td></tr>
  80  * </table>
  81  * <p>
  82  * A pane's unbounded maximum width and height are an indication to the parent that
  83  * it may be resized beyond its preferred size to fill whatever space is assigned to it.
  84  * <p>
  85  * Pane provides properties for setting the size range directly.  These
  86  * properties default to the sentinel value Region.USE_COMPUTED_SIZE, however the
  87  * application may set them to other values as needed:
  88  * <pre><code>
  89  *     <b>pane.setPrefSize(500,400);</b>
  90  * </code></pre>
  91  * Applications may restore the computed values by setting these properties back
  92  * to Region.USE_COMPUTED_SIZE.
  93  * <p>
  94  * Pane does not clip its content by default, so it is possible that childrens'
  95  * bounds may extend outside its own bounds, either if children are positioned
  96  * at negative coordinates or the pane is resized smaller than its preferred size.</p>
  97  *
  98  * @since JavaFX 2.0
  99  */
 100 @DefaultProperty("children")
 101 public class Pane extends Region {
 102     static {
 103         PaneHelper.setPaneAccessor(new PaneHelper.PaneAccessor() {
 104         });
 105     }
 106 
 107     static void setConstraint(Node node, Object key, Object value) {
 108         if (value == null) {
 109             node.getProperties().remove(key);
 110         } else {
 111             node.getProperties().put(key, value);
 112         }
 113         if (node.getParent() != null) {
 114             node.getParent().requestLayout();




  74  * <td>top plus bottom insets.</td></tr>
  75  * <tr><th scope="row">preferred</th>
  76  * <td>width required to encompass each child at its current x location and preferred width.</td>
  77  * <td>height required to encompass each child at its current y location and preferred height.</td></tr>
  78  * <tr><th scope="row">maximum</th>
  79  * <td>Double.MAX_VALUE</td><td>Double.MAX_VALUE</td></tr>
  80  * </table>
  81  * <p>
  82  * A pane's unbounded maximum width and height are an indication to the parent that
  83  * it may be resized beyond its preferred size to fill whatever space is assigned to it.
  84  * <p>
  85  * Pane provides properties for setting the size range directly.  These
  86  * properties default to the sentinel value Region.USE_COMPUTED_SIZE, however the
  87  * application may set them to other values as needed:
  88  * <pre><code>
  89  *     <b>pane.setPrefSize(500,400);</b>
  90  * </code></pre>
  91  * Applications may restore the computed values by setting these properties back
  92  * to Region.USE_COMPUTED_SIZE.
  93  * <p>
  94  * Pane does not clip its content by default, so it is possible that children's
  95  * bounds may extend outside its own bounds, either if children are positioned
  96  * at negative coordinates or the pane is resized smaller than its preferred size.</p>
  97  *
  98  * @since JavaFX 2.0
  99  */
 100 @DefaultProperty("children")
 101 public class Pane extends Region {
 102     static {
 103         PaneHelper.setPaneAccessor(new PaneHelper.PaneAccessor() {
 104         });
 105     }
 106 
 107     static void setConstraint(Node node, Object key, Object value) {
 108         if (value == null) {
 109             node.getProperties().remove(key);
 110         } else {
 111             node.getProperties().put(key, value);
 112         }
 113         if (node.getParent() != null) {
 114             node.getParent().requestLayout();


< prev index next >