Feature #1110

RCP: 0.7.6, manage user defined number formats

Added by Sebastien Jacquot almost 5 years ago. Updated 6 months ago.

Status:New Start date:11/06/2014
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:UI Spent time: -
Target version:TXM X.X

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).

History

#1 Updated by Sebastien Jacquot almost 5 years ago

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 Updated by Sebastien Jacquot almost 5 years ago

  • Description updated (diff)

#3 Updated by Sebastien Jacquot almost 5 years ago

  • Description updated (diff)

#4 Updated by Matthieu Decorde almost 5 years ago

  • Target version changed from TXM 0.7.7 to TXM 0.7.8

#5 Updated by Matthieu Decorde about 4 years ago

  • Target version changed from TXM 0.7.8 to TXM 0.8.0a (split/restructuration)

#6 Updated by Sebastien Jacquot about 1 year ago

  • Target version changed from TXM 0.8.0a (split/restructuration) to TXM 0.8.0

#7 Updated by Matthieu Decorde 6 months ago

  • Target version changed from TXM 0.8.0 to TXM X.X

Also available in: Atom PDF