I'm experimenting with JavaFX Scene Builder 1.1.

I've just placed a CubicCurve onto the canvas, resulting in this:

Screen capture showing default CubicCurve in Java FX Scene Builder

I'm able to drag the nodes and handles around, but I'm unable to find any documentation on how to add/remove nodes, create additional handles, etc. I've experimented with right-clicking and clicking on various parts of the shape while holding down Shift, Ctrl, or Alt, but this seems to have no effect.

Is it possible to visually manipulate CubicCurves in Scene Builder, and if so, how?

Also, is there any documentation for Scene Builder? I can seem to find only a few miscellaneous videos and guides, but nothing comprehensive.

有帮助吗?

解决方案

Update

The final release of SceneBuilder 2.0 dropped the cubic curve manipulation capabilities which were available (but somewhat broken) in the SceneBuilder 2.0 preview and discussed in this answer.

The related issue tracker request for this facility is:


I'm unable to find any documentation on how to add/remove nodes, create additional handles

I think what you are actually trying to do is create a Path with multiple cubic curves between points on the path. To do that you would add CubicCurveTo path elements to a path. You could create such fxml by hand and SceneBuilder would display it, but SceneBuilder 1.1 does not have the ability to visually create paths. I just tried SceneBuilder 2.0 early release and it did allow you to visually create paths, but it didn't seem to work quite right, so I think that particular functionality is still a work in progress.

The rest of this answer relates to plain CubicCurves in SceneBuilder 1.1 (as opposed to CubicCurveTos).

Is it possible to visually manipulate CubicCurves in Scene Builder? I'm able to drag the nodes and handles around.

That's how you edit the curve. You click on the little square handles and drag them around to modify the curve start/end and control points. You click on the curve itself and drag it around to move the whole curve. The Layout section of the inspector panel also has StartX, StartY, ControlX1, ControlY1, etc. text fields that you can manually edit data in.

If you want to add more control points, you add a new curve (by dragging it from the shape library into the scene), then (here is the yucky bit) manually line up the curve endpoints and control points to smoothly join the two curve end points.

Here is a sample with the control points of two different curves highlighted.

pic1 pic2

Advice on Using SceneBuilder

SceneBuilder isn't really a drawing tool, its more a component assembly and layout tool. It is a tool that is designed to work with other tools rather than a comprehensive design and development tool in it's own right. It doesn't try to be an IDE to write code in, as there are many good Java IDEs for that. Nor does it try to be a vector drawing tool as there are many good tools for that.

If you have a lot of drawing to do, IMO, you are best off using a specialized tool such as Inkscape to create the raw vector graphic data and then use another tool to convert that to FXML (which you can load directly into either SceneBuilder or a JavaFX application).

JavaFX 1.x used to provided with a tool where you could directly export SVG data from Inkscape and it would output a JavaFX 1.x FXD based scene definition. But JavaFX 2.x unfortunately doesn't yet have such tools.

A similar drawing conversion tool for JavaFX would be an FXG to FXML converter which takes an Adobe Illustrator file and produces an FXML file usable in SceneBuilder.

If your input data is 3D models, then InteractiveMesh supplies 3D model to FXML converters you can use to import your models into FXML (which can then be utilized in SceneBuilder 2.0).

is there any documentation for Scene Builder?

If you find any more feedback on SceneBuilder documentation, email the JavaFX documentation team at:

jfx-docs-feedback_ww@oracle.com
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top