Any ideas for a "scene builder" control?
Werner Lehmann
lehmann at media-interactive.de
Fri Apr 5 06:40:29 PDT 2013
Hi,
I am looking for options to create a custom container control or pane
with absolute-position layouting which allows users at runtime to
select, resize, drag, or drag-select children - similar to SceneBuilder.
Absolute layouting would probably be achieved by j.s.layout.Pane. The
hard part is how to display interactive selections with...
- selection border on selected controls,
- resizing-handles in the border corners,
- a drag-selection rectangle,
while still keeping this a private implementation detail...
- cannot change parent hierarchy of contained child nodes,
- cannot add private nodes like a selection rectangle to the public
children property.
So far I am stuck on the prototyping phase because nothing satisfied the
above:
1. Using CSS to draw selection borders: does not work because I could
not display those 8 resizing-handles (on top yes, on bottom no), plus it
may override existing control styles, plus it does not help with a
drag-selection rectangle.
2. Extending Region and implement Skinnable, and the Skin has a
stackpane for the private nodes: skins are intended for Control, not
Region, need to use/copy some com.sun.* and impl and private code, and
the layouting seems off (leaving out details here).
3. Extending Region with a nested substructure of StackPane and Panes,
and returning only part of that substructure as public children. Does
not work well either (not surprisingly because I have different public
and private children lists then), and it violates the "cannot change
parent hierarchy" requirement.
Am I missing something obvious? How is this done in SceneBuilder? Maybe
it extends Control and lays out the children in a Skin?
Rgds
Werner
More information about the openjfx-dev
mailing list