JaneliaSciComp / G4_Display_Tools

Collection of tools for the G4 LED arena displays.
Creative Commons Attribution 4.0 International
2 stars 2 forks source link

Java objects in Designer #26

Closed taylorlm88 closed 2 months ago

taylorlm88 commented 2 years ago

Accessing underlying java objects will soon be deprecated. Update these sections.

taylorlm88 commented 5 months ago

Right now there is a scroll bar bug in the table of block trials. Basically, anytime you update information in the table, the scroll bar jumps back to the top of the table, which is very annoying when you're trying to edit conditions further down. We get around this by accessing the scroll bar's java object, getting its position, then manually resetting it each time the table updates.

According to mathworks documentation here this bug can only be avoided by using their newer uifigure tools. It has instructions on how to convert figure based GUI applications to uifigure based applications. I will start working on making this conversion, but it'll be a longer term thing, as it will take a while, and I'm sure there are functionalities we use now that will be different or unavailble with uifigure. I think uifigure was available when I started this application, though it had less functionality than it does now in the current release. I remember that we specificially decided against using it but I don't remember why. Sooner or later it will have to be done though, as javaframe and other java properties will be deprecated.

taylorlm88 commented 2 months ago

Completed pending testing. I'm afraid with the new UIFigure based application, the tables render more slowly and might be frustrating for the user, but I'm not sure. This issue is noticeable on my laptop, but not as noticeable on the PC. Laura is going to do some testing with it and let me know how it does. Researching ways to speed up the table rendering in the meantime.

taylorlm88 commented 2 months ago

Not moved to master branch yet, going to use it for a while first and make sure no more bugs pop up, but it is finished and working.