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);
});
}
}
Aggregations