bound SVG

Richard Bair richard.bair at oracle.com
Tue Oct 30 08:10:20 PDT 2012


> I hoped to be able to switch from a bar to a full rectangle by just using CSS, but I can't set the width in CSS. I could use two rectangles, but I'm also blocked on the fact that the color is set explicitly in the code (setFill), with two rectangles I need to set both fills, but I can't make one of then go away in the CSS - unless scary solitions with translate maybe. BTW, in my agenda (where I need to do something similar) I simply assign a style class and let that handle the presentation. Then I could simply have declared either color "transparent". I feel that the conference example is not using JavaFX's features to the max :-)

That's correct, it was never meant to. The conference app is not a sample, it is an application. We cut corners left, right, and center because we had limited time and were trying to target a device (that wasn't demonstrated) which has no JIT. Ahem. In past years we got beat up for not releasing our demos. But of course we never did because they're usually a mess because, like any schedule driven app, things didn't go according to plan :-)

As far as your use case, why not set the style directly on the node via setStyle? You can construct the string via some computation in that case.

Richard


More information about the openjfx-dev mailing list