Feature #1110

RCP: 0.7.6, manage user defined number formats

Ajouté par Sebastien Jacquot il y a presque 3 ans. Mis à jour il y a environ 2 ans.

Statut:New Début:06/11/2014
Priorité:Normal Echéance:
Assigné à:- % réalisé:

0%

Catégorie:UI Temps passé: -
Version cible:TXM 0.7.9

Description

1) Use the printf specifiers syntax to manage the number formats of the results in the TXM UI.
See: [[http://www.cplusplus.com/reference/cstdio/printf/]]

2) Add a global preference page for common shared formats by type, e.g. "percent", TBD: others types. Page name could be "User/Number formats" or FR: "Format d'affichage des résultats / formats numériques"

3) In the results preference page, as CA, empty by default all the column formats and inherit them from the global common shared formats by type when they are empty. When they are filled, use them instead of the inherited global formats.

For the point #2. There is a potential problem to display user friendly very small values. For example, eigenvalues are currently displayed in 2 different ways according to theirs values (if < 0.0001 => scientific notation (to avoid 0.0000 display) else => X.XXXX)
This behavior may not be possible by defining only one format preference (e.g. with printf it means "%.4f" and "%.4e").
But we may define 3 user preferences as "float", "small float", "very small float" then user could be define something as:

  • float = "%.2f"
  • small float = "%.2f"
  • very small float = "%.4e"

Other solution, more complex but maybe more clean, is to centralize all the numeric outputs in a custom number formatter.

NOTE: the actual (DecimalFormat) and future (printf, String.format()) systems round numbers up (numbers are not truncated but rounded).

Historique

#1 Mis à jour par Sebastien Jacquot il y a presque 3 ans

NOTE: for these changes (point number 1) we have to pay attention that on an already installed TXM, the UI will load the old preferences formats (e.g. "#.0000" syntax), then try to fill and use the value with this old syntax.

#2 Mis à jour par Sebastien Jacquot il y a presque 3 ans

  • Description mis à jour (diff)

#3 Mis à jour par Sebastien Jacquot il y a presque 3 ans

  • Description mis à jour (diff)

#4 Mis à jour par Matthieu Decorde il y a presque 3 ans

  • Version cible changé de TXM 0.7.7 à TXM 0.7.8

#5 Mis à jour par Matthieu Decorde il y a environ 2 ans

  • Version cible changé de TXM 0.7.8 à TXM 0.7.9

Formats disponibles : Atom PDF