001package jmri.jmrit.logixng; 002 003import java.util.HashMap; 004 005/** 006 * This class is used for user preferences, like checkboxes for SystemNameAuto. 007 * UserPreferencesManager uses reflection to access this class. 008 * 009 * @author Daniel Bergqvist Copyright (C) 2021 010 */ 011public class LogixNG_UserPreferences { 012 013 // A default constructor is required for JmriUserPreferencesManager 014 public LogixNG_UserPreferences() { 015 } 016 017 public String getClassDescription() { 018 return Bundle.getMessage("LogixNGReminderMessages"); 019 } 020 021 public void setMessagePreferencesDetails() { 022 HashMap<Integer, String> options = new HashMap<>(3); 023 options.put(0x00, Bundle.getMessage("DeleteAsk")); 024 options.put(0x01, Bundle.getMessage("DeleteNever")); 025 options.put(0x02, Bundle.getMessage("DeleteAlways")); 026 jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class).setMessageItemDetails(LogixNG_UserPreferences.class.getName(), 027 "deleteLogixNG", Bundle.getMessage("DeleteItemInUse"), options, 0x00); 028 029 jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class).setPreferenceItemDetails( 030 "jmri.jmrit.logixng.LogixNG_UserPreferences", "remindSaveLogixNG", Bundle.getMessage("HideSaveReminder")); 031 032 jmri.InstanceManager.getDefault(jmri.UserPreferencesManager.class).setPreferenceItemDetails( 033 "jmri.jmrit.logixng.LogixNG_UserPreferences", "remindSaveReLoad", Bundle.getMessage("HideMoveUserReminder")); 034 } 035}