Search in sources :

Example 1 with ManagingPreferencesPanel

use of jmri.swing.ManagingPreferencesPanel in project JMRI by JMRI.

the class AppConfigBase method registerWithConfigureManager.

private void registerWithConfigureManager(PreferencesPanel panel) {
    if (panel.isPersistant()) {
        ConfigureManager cm = InstanceManager.getNullableDefault(jmri.ConfigureManager.class);
        if (cm != null) {
            cm.registerPref(panel);
        }
    }
    if (panel instanceof ManagingPreferencesPanel) {
        log.debug("Iterating over managed panels within {}/{}", panel.getPreferencesItemText(), panel.getTabbedPreferencesTitle());
        ((ManagingPreferencesPanel) panel).getPreferencesPanels().stream().forEach((managed) -> {
            log.debug("Registering {} with the ConfigureManager", managed.getClass().getName());
            this.registerWithConfigureManager(managed);
        });
    }
}
Also used : ConfigureManager(jmri.ConfigureManager) ManagingPreferencesPanel(jmri.swing.ManagingPreferencesPanel)

Aggregations

ConfigureManager (jmri.ConfigureManager)1 ManagingPreferencesPanel (jmri.swing.ManagingPreferencesPanel)1