0 Replies Latest reply: Feb 4, 2013 8:28 AM by ciruman RSS

    Diffrerence between setNeedsLayout(boolean) & requestLayout()

    ciruman
      There are two methods in the Parent class that I can't diferenciate:

      [http://docs.oracle.com/javafx/2/api/javafx/scene/Parent.html#setNeedsLayout(boolean)]
      "Sets the value of the property needsLayout. Indicates that this Node and its subnodes requires a layout pass on the next pulse."

      and

      [http://docs.oracle.com/javafx/2/api/javafx/scene/Parent.html#requestLayout()]
      "Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation.
      If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestLayout will be invoked on its parent."

      What's the difference?

      Thanks.

      diego

      Edited by: ciruman on 04.02.2013 06:27