Class GeneralPreferences

    • Constructor Detail

      • GeneralPreferences

        public GeneralPreferences​(BeaTunes application)
        Parameters:
        application - beaTunes
    • Method Detail

      • isSynchronizeOnActivation

        public boolean isSynchronizeOnActivation()
        Indicates whether beaTunes should sync on Window activation.
        Returns:
        sync on window activation
      • setSynchronizeOnActivation

        public void setSynchronizeOnActivation​(boolean synchronizeOnActivation)
        Determines whether beaTunes synchronizes with iTunes every time the beaTunes window receives the focus, i.e. runs in the foreground.
        Parameters:
        synchronizeOnActivation - true or false
      • setEnableSynchronizeOnActivation

        public void setEnableSynchronizeOnActivation​(boolean enable)
        Determines whether the option to sync everytime beaTunes receives the focus is offered at all.
        Parameters:
        enable - true or false
      • getCoverPanelDelay

        public int getCoverPanelDelay()
        Returns the current cover panel delay.
        Returns:
        Numbers of seconds until artwork is shown. Values <=0 indicate that the artwork is never shown
      • setCoverPanelDelay

        public void setCoverPanelDelay​(int seconds)
        Adjusts the preferences UI and then stores the new values.
        Parameters:
        seconds - cover panel delay
      • isAutomaticallyExportPlaylists

        public boolean isAutomaticallyExportPlaylists()
      • getKeyExportFormat

        public KeyFormat getKeyExportFormat()
      • getApplication

        public BeaTunes getApplication()
      • isSubmitManuallyEnteredValuesCheckBox

        public boolean isSubmitManuallyEnteredValuesCheckBox()
      • getLibraryDescriptor

        public LibraryDescriptor getLibraryDescriptor()
        Currently selected LibraryDescriptor.
        Returns:
        library descriptor or null, if no descriptor is selected
      • selectLibrary

        public boolean selectLibrary​(Long id)
        Selects a library in this dialog without actually causing the library to be loaded by the application. If there are multiple libraries with the same id (because some old files are still lying around), the newest one is selected.
        Parameters:
        id - persistent id of the library's source
        Returns:
        true, if a corresponding library was already configured, false, if the library id is unknown
      • store

        public void store​(nu.xom.Element parent)
        Description copied from interface: ConfigurableComponent
        Will be called by the application when it thinks that configurable components should store their configuration.
        Specified by:
        store in interface ConfigurableComponent
        Parameters:
        parent - empty parent element should contain all configuration children for this component once this method returns
      • load

        public void load​(nu.xom.Element parent)
        Description copied from interface: ConfigurableComponent
        Is called by the application when preferences are loaded. The component is responsible for interpreting the parent element.
        Specified by:
        load in interface ConfigurableComponent
        Parameters:
        parent - configuration
      • addITunesLibraryDescriptors

        public void addITunesLibraryDescriptors​(Path... files)
      • addLibraryDescriptor

        public void addLibraryDescriptor​(LibraryDescriptor libraryDescriptor)
      • $$$getRootComponent$$$

        public JComponent $$$getRootComponent$$$()