Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Included fxml should can be handled as control. #321

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bdh92123
Copy link

@bdh92123 bdh92123 commented Feb 4, 2021

Issue

#319
Included fxml can't be focused, moved, resized.

Fixes

  • Included fxml also can be handled in scene builder. So it can also be focused, moved or resized like other node.
  • Fixed a bug where the context menu did not appear on included fxml nodes.

@bdh92123 bdh92123 changed the title Included fxml should can be handled as node. Included fxml should can be handled as control. Feb 8, 2021
@johanvos
Copy link
Contributor

Interesting.
It would be good to have a test that fails before and runs after this patch is applied, can you add some test for this?

@bdh92123
Copy link
Author

bdh92123 commented Feb 16, 2021

Hi @johanvos . I uploaded some test in Issue #319 .

However, this fix uses a trick that temporarily treats the FXInstrinsic node as an FXOMInstance node, so it would be correct to fundamentally fix the intrinsic node so that it can also be relocated, resized and focused if it's type is 'fx:include'.

Thanks.

@abhinayagarwal abhinayagarwal force-pushed the master branch 2 times, most recently from 7c0a0f0 to fd0a426 Compare March 30, 2021 03:22
@abhinayagarwal
Copy link
Collaborator

Hi @bdh92123,

Thank you for the PR. How big of an effort is it to properly fix this in the Intrinsic node?

@bdh92123
Copy link
Author

bdh92123 commented Jun 9, 2021

Hi @abhinayagarwal ,
Scene Builder is designed so that only nodes with bounds (FXOMInstance) can be positioned or resized. Intrinsic node is treated as a completely different class (FXIntrinsic), so if you don't use the trick I did, I think it may require quite a bit of effort.
Thanks.

@Oliver-Loeffler Oliver-Loeffler added custom control Custom controls usage in Scene Builder fxml All related to handling (loading/saving/including) of FXML labels Aug 31, 2024
@Oliver-Loeffler Oliver-Loeffler added this to the 23 milestone Aug 31, 2024
@Oliver-Loeffler Oliver-Loeffler modified the milestones: 23, 24 Sep 27, 2024
@Oliver-Loeffler Oliver-Loeffler modified the milestones: 24, 25 Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom control Custom controls usage in Scene Builder fxml All related to handling (loading/saving/including) of FXML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants