About: creating rows in a render....
#1
I need to go to my real job soon so I might as well just ask...

It seems, looking at the renderers, that every element in the row is instanced and values applied later. It seems a bit ridiculous to be instancing both a MovieSet row & Movie row every time any row is created within MovieSetTreeCellRenderer. Are these instances being copied somewhere in getTreeCellRendererComponent() before values are applied?

(Note: I'm not looking to rewrite the backend, lol. Wink Just like to understand what my code will do before writing it. )

THX Big Grin
#2
no, the MovieSetTreeCellRenderer is only created once and is being used for every Movie/MovieSet in the JTree. For the JTree the components used in the getTreeCellRendererComponent can be re-used; just filled with the new content

hth
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
No, it's just "JTrees" are vary helper-object heavy...

Ok, so the components (or more accurately their "state") do not persist after they are drawn to the panel -because-, once they are drawn, the components are no longer needed for the UI.

If true, then I've been working in PHP/HTM for too long Tongue. ...Gosh, then how can the listeners work? (Or can't listeners work on these re-usable components?)

Logout Mark Read Team Forum Stats Members Help
About: creating rows in a render....0