figure versus uifigure the best way to manage complex gui

47 vues (au cours des 30 derniers jours)
Alain Barraud
Alain Barraud le 6 Juil 2022
Commenté : Alain Barraud le 6 Juil 2022
I am currently writing complex gui for scientific computation app which must be compatible both with figure and uifigure. My experience is that using uifigue the gui is always very time consuming to build and drag and drop is not reactive. Moreovers save gui as a *.fig may take 15 ~ 20 mn and when openfig is executed to come back at the state where user exit the app, does not work except for basic interface tests.
Using figure all is right. My question is the following what is the goal of mathworks in the future. I use matlab since 1984 it was an extraordinary tool. Nice gui is today a necessary step when developping large engineering app. It is always a difficult task, java customization helps very much. Waterloo toolbox is a good exemple. Why to abandon this approach? The beautiful functions inluded within gui layout toolbox should be directly included within matlab. Web oriented figure is a specifig goal, if figure could support the new uifigure facilities it would be perfect!
Is there some subtilities to know to have better experience with uifigure.
Using matlab is very easy, learning java was not trivial and now with uifigure it would be necessary to learn javascript....?
Best regards
  1 commentaire
Bruno Luong
Bruno Luong le 6 Juil 2022
Let me guess : you would never get an answer from TMW folks on their roadmap.
To me the only reason I would use uifigure is if you are interested in embeded the components that are not supported in stadard figure. They look more modern. Personaly I use the uitable with great features.
Otherwise I would stick with figure.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Juil 2022
I do not know why uifigure is so much slower than traditional figures. I know people have been grumbling about that for years, and I know the current situation is better than it used to be.
With regards to "Why?":
One of the reasons is that Mathworks is trying to remove dependency on Java. There are a couple of reasons for this:
  • industry has been finding Java too slow and not flexible enough for modern use
  • Oracle put in a per-desktop end-user license charge to use Java. As a result, a lot of companies are getting out of Java as soon as they can, so that end users do not have to pay Oracle to use products such as MATLAB. Mathworks uses the last no-charge version of Java Development Kit
  1 commentaire
Yair Altman
Yair Altman le 6 Juil 2022
Modifié(e) : Yair Altman le 6 Juil 2022
In addition to the wish to avoid Java, basing the UI on web technologies (HTML, CSS, JavaScript) will enable users to use MathWorks products on any platform that supports a Chrome browser, and this has significant potential benefits. For example, in the future we could use Matlab on smartphones, tablets, and other platforms that do not currently support Matlab (we can use Matlab Online already, with some limitations - over time I expect these limitations will decrease). MathWorks is still not quite there with the conversion (it's an enormous development effort), but the path forward is quite clear. And indeed, performance is indeed a problem (getting better with each new release, though).

Connectez-vous pour commenter.

Plus de réponses (1)

Alain Barraud
Alain Barraud le 6 Juil 2022
yes me too about uitable, althought using java similar result can be obtained. Uitree is also very useful with uifigure. I have not be able to have similar aesthetic results with figure (widget toolbox). Why not uifigure I hope better speed in the future.
  4 commentaires
Yair Altman
Yair Altman le 6 Juil 2022
I'm pretty certain that you can change the Java uitree's background color, separately from each node's color. Just update the Background property of the main tree control.
Alain Barraud
Alain Barraud le 6 Juil 2022
Yes you are right. Adding to your code
mtree.Tree.setBackground(java.awt.Color(0,.8,1))
do the job. The nodes remain white OK. (I don't remember how to access to the Nodes properties)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by