Ticket #2235 (closed bug: obsolete)

Opened 15 years ago

Last modified 13 years ago

book-zoom-regional-settings - Now the zoom field depends on the regional settings of the pc.

Reported by: todor Owned by:
Priority: major Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: todor Design_owners: deni
Imp._owners: deni Test_owners:
Analysis_reviewers: deni Changelog:
Design_reviewers: meddle Imp._reviewers: meddle, todor
Test_reviewers: Analysis_score: 5
Design_score: 4 Imp._score: 4
Test_score: 0

Description

  • On some computers the zoom field is not working correctly, because of the regional settings of the computer.
  • For example the decimal symbol used in Bulgarian and US regional settings is different, this results in invalid bound control.
  • The caret is not displayed properly - when it moves it looks like there are more the one carets.
  • The zoom level must be applied after hitting enter or exiting the zoom field.

Change History

comment:1 Changed 15 years ago by todor

  • Status changed from new to s1b_analysis_finished

comment:2 Changed 15 years ago by deni

  • Design_owners set to deni
  • Status changed from s1b_analysis_finished to s2a_design_started
  • Imp._owners set to deni
  • Analysis_reviewers set to deni

comment:3 Changed 15 years ago by deni

  • Status changed from s2a_design_started to s3b_implementation_finished
  • BoundComboBox changes:
    • Reason: Currently BoundComboBox submits more than once... This causes various problems and it will be easier for this bug to be fixed if comboboxes behave as expected.
    • Replace the ItemListener and DocumentListener by a single ActionListener.
      • I feel that if syncInputToModel(ComboInput) is called in one listener only, it will solve some problems...
      • However, this will change the behavior of editable combo boxes - they will no longer submit every time a new character has been entered or deleted, but only when the user has pressed 'Enter' or the control has lost focus.
      • The actionPerformed(ActionEvent) method of the listener will check whether the selected index is -1 (i.e. the user has entered some text in an editable combo box) or different than -1 in order to create an appropriate ComboInput.
        • There was a problem that if the selected index is -1, two events are delivered - comboBoxChanged and comboBoxEdited. I decided to handle only the comboBoxEdited event.
    • Add a FocusListener to the text field of the combo box. Its focusLost(FocusEvent) method will set the selected item of the combo box to the value in the model.
      • This is necessary in the following situation: The user types something in an editable combo box which does not pass the validation, for example "1000" in the zoom combo box. Then he gives up changing the zoom level. The control should be updated to the value from the model instead of showing "1000" and that it is incorrect.
      • Since the value from the model is always correct, the validation property should be set to SUCCESS.
      • In order not to cause submits, setting the selected item should be enclosed by start/stop synchronization.
  • BoundValidation changes (validation of localized numbers):
    • Add a new public static NumberFormat field that holds a general-purpose number format for the current locale.
    • private static String parseNumber(String input) - helper method to parse a number (eventually localized) from string.
      • It tries to parse the number using Double.valueOf(input) or the localized NumberFormat.
      • This guarantees that it will always parse '100.00' and if the current locale allows it - '100,00'.
    • public static <T extends Number> T parseNumber(String input, Class<T> numberClass) will use the above method instead of Double.valueOf(String).
  • The caret issue:
    • Remove the opaque option from TextFieldComboBox style in lookandfeel_javaN.xml.
  • Ticket #2213:
    • Fix TextFontHud.TextFontSize.validate(ComboInput<Float>) - make sure that the field value is a valid float number.

comment:4 Changed 15 years ago by deni

  • Analysis_score changed from 0 to 5

comment:5 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Design_score changed from 0 to 4
  • Design_reviewers set to meddle
  • Imp._score changed from 0 to 4
  • Imp._reviewers set to meddle, todor

Merged at [8453]...

I think that better readable is something like !(expr
expr) than !expr && !expr
  • Don't know if the static NumberFormat is good idea, but works...

You find the analysis of this bug extremely exceptional and score it with '5', I don't think so...

4p

comment:6 Changed 13 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.