Class SystemConsolePreferencesManager

    • Method Detail

      • savePreferences

        public void savePreferences​(Profile profile)
        Description copied from interface: PreferencesManager
        Save the preferences that this provider manages for the provided Profile.
        Specified by:
        savePreferences in interface PreferencesManager
        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
      • isInitialized

        public boolean isInitialized​(Profile profile)
        Description copied from interface: PreferencesManager
        Test if the PreferencesManager is initialized without errors for the provided Profile. Note that although both this method and PreferencesManager.isInitializedWithExceptions(jmri.profile.Profile) can be false, if isInitializedWithExceptions(Profile) returns true, this method must return false.
        Specified by:
        isInitialized in interface PreferencesManager
        Parameters:
        profile - the configuration profile to test against; may be null to test for exceptions thrown when initializing for this user regardless of profile
        Returns:
        true if the provider is initialized without exceptions
      • getRequires

        @Nonnull
        public java.util.Collection<java.lang.Class<? extends PreferencesManager>> getRequires()
        Description copied from interface: PreferencesManager
        Get 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.

        Specified by:
        getRequires in interface PreferencesManager
        Returns:
        A set or list of classes. If there are no dependencies, return an empty set instead of null.
      • getProvides

        @Nonnull
        public java.lang.Iterable<java.lang.Class<?>> getProvides()
        Description copied from interface: PreferencesManager
        Get the set of Classes that this PreferencesManager can be registered as a provider of in the InstanceManager.
        Specified by:
        getProvides in interface PreferencesManager
        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.
      • getScheme

        public int getScheme()
        Returns:
        the scheme
      • setScheme

        public void setScheme​(int scheme)
        Parameters:
        scheme - the scheme to set
      • getFontSize

        public int getFontSize()
        Returns:
        the fontSize
      • setFontSize

        public void setFontSize​(int fontSize)
        Sets the fontSize.

        If the parameter is less than 6, the fontSize is set to 6. If the parameter is greater than 24, the fontSize is set to 24.

        Parameters:
        fontSize - the fontSize to set
      • getFontStyle

        public int getFontStyle()
        Returns:
        the fontStyle
      • setFontStyle

        public void setFontStyle​(int fontStyle)
        Parameters:
        fontStyle - one of Font.BOLD, Font.ITALIC, or Font.PLAIN.
      • getWrapStyle

        public int getWrapStyle()
        Returns:
        the wrapStyle
      • getInitializationExceptions

        @Nonnull
        public java.util.List<java.lang.Exception> getInitializationExceptions​(Profile profile)
        Description copied from interface: PreferencesManager
        Get the set of exceptions thrown during initialization for the provided Profile.
        Specified by:
        getInitializationExceptions in interface PreferencesManager
        Parameters:
        profile - the configuration profile to test against; may be null to test for exceptions thrown when initializing for this user regardless of profile
        Returns:
        A list of exceptions. If there are no exceptions, return an empty set instead of null.