Skip to content

Conversation

@abhinayagarwal
Copy link
Member

Fixes #1321

hyperlink.setPadding(new Insets(0, 0, 0, 0));
hyperlink.setOnAction(eventHandler);
hyperlink.focusTraversableProperty().bind(control.focusTraversableProperty());
control.focusedProperty().addListener((o, ov, nv) -> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor concern whether this should be inside a WeakListener or not. I had so many memory leaks in applications because of listener added directly.
Don't know if this one can cause a memory leak or not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point. I have overridden dispose method to unbind bindings and remove listeners.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now use SkinBase#registerChangeListener which is called and gc'd during dispose automatically. Another round of review is appreciated.

@abhinayagarwal abhinayagarwal requested a review from Maxoudela May 3, 2022 21:58
@abhinayagarwal abhinayagarwal merged commit 6fa8df9 into controlsfx:master May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HyperlinkLabel setFocusTraversable() not working as expected

2 participants