I think I noticed something like this some time ago, but related to a TreeCell. I basically used the clip to make a graphic capable of filling up like a progress bar (there was a graphic that showed a standard non-filled display, and an overlayed graphic that showed the filled form, but was clipped depending on how far the bar needed to be filled). This didn't always work as expected, and it looked like a clip change wasn't always picked up.

In case it is useful, this was issue RT-19285 <https://javafx-jira.kenai.com/browse/RT-19285>.

--John

On 5/08/2013 13:55, Tom Schindl wrote:
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


Reply via email to