Class ProgrammerConfigManager
- All Implemented Interfaces:
BeanInterface,PropertyChangeFirer,PropertyChangeProvider,JmriServiceProviderInterface,PreferencesManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class jmri.beans.Bean
propertyChangeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the set of Classes that this PreferencesManager can be registered as a provider of in theInstanceManager.Set<Class<? extends PreferencesManager>>Get the set of PreferencesManagers that must be initialized prior to initializing this PreferencesManager.voidinitialize(Profile profile) Initialize the PreferencesManager with preferences associated with the provided Profile.booleanbooleanbooleanbooleanbooleanbooleanvoidsavePreferences(Profile profile) Save the preferences that this provider manages for the provided Profile.voidsetCanCacheDefault(boolean canCacheDefault) voidsetDefaultFile(String defaultFile) voidsetDisableProgrammingOnMain(boolean disableProgrammingOnMain) voidsetDisableProgrammingTrack(boolean disableProgrammingTrack) voidsetDoConfirmRead(boolean doConfirmRead) voidsetShowCvNumbers(boolean showCvNumbers) voidsetShowEmptyPanes(boolean showEmptyPanes) Methods inherited from class jmri.util.prefs.AbstractPreferencesManager
addInitializationException, getInitializationExceptions, isInitialized, isInitializedWithExceptions, isInitializing, requireAllOther, requiresNoInitializedWithExceptions, requiresNoInitializedWithExceptions, setInitialized, setInitializingMethods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
Field Details
-
DEFAULT_FILE
- See Also:
-
SHOW_EMPTY_PANES
- See Also:
-
SHOW_CV_NUMBERS
- See Also:
-
CAN_CACHE_DEFAULT
- See Also:
-
DO_CONFIRM_READ
- See Also:
-
DISABLE_PROGRAMMING_TRACK
- See Also:
-
DISABLE_PROGRAMMING_ON_MAIN
- See Also:
-
-
Constructor Details
-
ProgrammerConfigManager
public ProgrammerConfigManager()
-
-
Method Details
-
initialize
Description copied from interface:PreferencesManagerInitialize the PreferencesManager with preferences associated with the provided Profile.Implementing classes should throw an InitializationException with a user readable localized message, since it most likely be displayed to the user. Implementing classes will still want to ensure that
PreferencesManager.isInitialized(jmri.profile.Profile)orPreferencesManager.isInitializedWithExceptions(jmri.profile.Profile)return true if throwing an InitializationException to ensure that the provider is not repeatedly initialized.- Parameters:
profile- the configuration profile used for this initialization; may be null to initialize for this user regardless of profile- Throws:
InitializationException- if the user needs to be notified of an issue that prevents regular use of the application
-
getRequires
Description copied from class:AbstractPreferencesManagerGet the set of PreferencesManagers that must be initialized prior to initializing this PreferencesManager. It is generally preferable to require an Interface or an abstract Class instead of a concrete Class, since that allows all (or any) concrete implementations of the required class to be initialized to provide required services for the requiring PreferencesManager instance.Note that for any set of PreferencesManagers with the same requirements, or with a circular dependency between each other, the order in which the PreferencesManagers in that set are initialized should be considered non-deterministic.
This implementation includes a default dependency on the
ConnectionConfigManager.- Specified by:
getRequiresin interfacePreferencesManager- Overrides:
getRequiresin classAbstractPreferencesManager- Returns:
- An set of classes; if there are no dependencies, return an empty set instead of null; overriding implementations may add to this set directly
-
getProvides
Description copied from class:AbstractPreferencesManagerGet the set of Classes that this PreferencesManager can be registered as a provider of in theInstanceManager.This implementation returns the class of the object against which this method is called.
- Specified by:
getProvidesin interfacePreferencesManager- Overrides:
getProvidesin classAbstractPreferencesManager- Returns:
- A set or list of classes. If this PreferencesManager provides an instance of no other Interfaces or abstract Classes than PreferencesManager, return an empty set instead of null.
-
savePreferences
Description copied from interface:PreferencesManagerSave the preferences that this provider manages for the provided Profile.- Parameters:
profile- the profile associated with the preferences to save; may be null to save preferences that apply to the current user regardless of profile
-
getDefaultFile
- Returns:
- the defaultFile
-
setDefaultFile
- Parameters:
defaultFile- the defaultFile to set
-
isShowEmptyPanes
- Returns:
- the showEmptyPanes
-
setShowEmptyPanes
- Parameters:
showEmptyPanes- the showEmptyPanes to set
-
isShowCvNumbers
- Returns:
- the showCvNumbers
-
setShowCvNumbers
- Parameters:
showCvNumbers- the showCvNumbers to set
-
isCanCacheDefault
- Returns:
- the canCacheDefault
-
setCanCacheDefault
- Parameters:
canCacheDefault- new value
-
isDoConfirmRead
- Returns:
- the doConfirmRead
-
isDisableProgrammingTrack
- Returns:
- the disableProgrammingTrack
-
isDisableProgrammingOnMain
- Returns:
- the disableProgrammingOnMain
-
setDoConfirmRead
- Parameters:
doConfirmRead- new value
-
setDisableProgrammingTrack
- Parameters:
disableProgrammingTrack- new value
-
setDisableProgrammingOnMain
- Parameters:
disableProgrammingOnMain- new value
-