Is Node.setClip() expected detect changes to the clip-Node?

Tom Schindl tom.schindl at bestsolution.at
Mon Aug 5 04:55:19 PDT 2013


Hi,

I've been hunting a bug in TitledPaneSkin [1] which makes me wonder if
maybe the control code is using the Clip-Feature in appropriately.

The code in general looks like this:

public class BlaSkin extends Node {
   private Rectangle rect;

   public BlaSki() {
      rect = new Rectangle();
      setClip(rect);
   }

   public void changeSize(double x, double y) {
      rect.setWidth(x);
      rect.setHeight(y);
   }
}

so the clipping node changes its size while the code is running but it
looks like the rendering code does not know about this and never updates
the peer's clipNode (in impl_updatePeer) now I guess this is simply an
optimization introduced in FX8 so my question is is Node expected to
detect its clip node changes or is the developer forced to somehow tell
the Node to do so (my first direct work around was to set the clip to
null and back to the rectangle which fixes the problem)?

Tom

[1]https://javafx-jira.kenai.com/browse/RT-32117


More information about the openjfx-dev mailing list