Community
Participate
Working Groups
We should generalize org.eclipse.gef4.mvc.fx.example.FXCreationMenuOnClickPolicy into an org.eclipse.gef4.mvc.fx.FXCreateOnClickPolicy, which infers the to be created elements via an adapter.
Besides, the creation position does not seem to be calculated precisely. In normal zoom a small offset is visible. If zooming is enabled that offset is enlarged. We need to fix that as well.
I generalized the FXCreationMenuOnClickPolicy by introducing an IFXCreationMenuItem interface and querying the menu items via a Provider<List<IFXCreationMenuItem>>>. Moreover, I fixed the creation position (always at the center of the item in the menu) and placed the menu inside of the scrolled region, i.e. it is not a JavaFX Popup anymore. The code is published on the master branch, therefore I resolve this ticket as fixed for 3.10.0M7.
The mechanism should be refactored and the code should be moved to MVC.FX.
As the
A context menu should be opened when the user presses the right mouse button. Therefore, showing the creation menu when the right mouse button is pressed is confusing and against the expectations of the user. The creation menu functionality should instead be demonstrated in an FX example snippet. It can probably be included in the Logo example if the creation menu can be accessed via a context menu that is opened when pressing the right mouse button.
Moved CreationMenuOnClickPolicy to logo example, so it is no longer considered official API of MVC.FX.