DateTime ribbon should react to changes in TimeOptions

Issue #59 resolved
Bruce Schubert created an issue

It would be nice if the DateTime band would reflect changes made in the TimeOptions without restarting the application.

The DateTime band could add a listener to the TimeOptions preferences.

Comments (3)

  1. Bruce Schubert reporter

    Consider adding this code block to the DatetimeBand constructor. I added this code to Emxsys Terramenta fork to resolve this issue.

    DatetimeBand() {
            ...
            // Recreate the DatePicker scene if the prefernces change
            prefs.addPreferenceChangeListener(new PreferenceChangeListener() {
    
                @Override
                public void preferenceChange(PreferenceChangeEvent evt) {
                    Platform.runLater(new Runnable() {
    
                        @Override
                        public void run() {
                            jfxPanel.setScene(createScene());
                        }
                    });
                }
            });
        }
    
  2. Log in to comment