Module org.jpo

Class Settings

java.lang.Object
org.jpo.datamodel.Settings

public class Settings extends Object
This class defines all the settings for the JPO application. In order for it to be valid for all objects its components are all static as is the Settings object itself when created.

The SettingsDialog is the editor for these settings.

  • Field Details

    • DEFAULT_MAX_THUMBNAILS

      public static final int DEFAULT_MAX_THUMBNAILS
      the default value for maxThumbnails
      See Also:
    • miniThumbnailSize

      public static final Dimension miniThumbnailSize
      the dimension of mini thumbnails in the group folders
    • LEFT_PANEL_MINIMUM_WIDTH

      public static final int LEFT_PANEL_MINIMUM_WIDTH
      The minimum width for the left panels
      See Also:
    • INFO_PANEL_MINIMUM_DIMENSION

      public static final Dimension INFO_PANEL_MINIMUM_DIMENSION
      the minimum Dimension for the InfoPanel
    • INFO_PANEL_PREFERRED_SIZE

      public static final Dimension INFO_PANEL_PREFERRED_SIZE
      the preferred Dimension for the InfoPanel
    • JPO_NAVIGATOR_JTABBEDPANE_MINIMUM_SIZE

      public static final Dimension JPO_NAVIGATOR_JTABBEDPANE_MINIMUM_SIZE
      the minimum Dimension for the Navigator Panel
    • THUMBNAIL_CREATION_THREAD_POLLING_TIME

      public static final int THUMBNAIL_CREATION_THREAD_POLLING_TIME
      The polling interval in milliseconds for the ThumbnailCreationThreads to check Whether there is something new to render.
      See Also:
    • NUMBER_OF_THUMBNAIL_CREATION_THREADS

      public static final int NUMBER_OF_THUMBNAIL_CREATION_THREADS
      The number of thumbnail creation threads to spawn.
      See Also:
    • MAX_MEMORISE

      public static final int MAX_MEMORISE
      number of recent files shown in the file menu
      See Also:
    • COLLECTION_DTD

      public static final String COLLECTION_DTD
      URL of the document type definition in the xml file.
      See Also:
    • THREE_DOT_BUTTON_DIMENSION

      public static final Dimension THREE_DOT_BUTTON_DIMENSION
      Default size for buttons such as OK, cancel etc.
    • ADD_FROM_CAMERA_DATE_FORMAT

      public static final String ADD_FROM_CAMERA_DATE_FORMAT
      date format for adding new pictures from the camera
      See Also:
    • prefs

      public static final Preferences prefs
      handle to the user Preferences
    • MAX_USER_FUNCTIONS

      public static final int MAX_USER_FUNCTIONS
      number of user Functions
      See Also:
    • JPO_VERSION

      public static final String JPO_VERSION
      Global constant for the current build version of JPO
      See Also:
    • JPO_URL

      public static final String JPO_URL
      The URL of the JPO homepage
      See Also:
    • JPO_DOWNLOAD_URL

      public static final String JPO_DOWNLOAD_URL
      The download url for JPO
      See Also:
    • JPO_VERSION_URL

      public static final String JPO_VERSION_URL
      The download url for JPO
      See Also:
    • DEFAULT_THUMBNAIL_CREATION_THREADS

      public static final int DEFAULT_THUMBNAIL_CREATION_THREADS
      See Also:
    • jpoNavigatorJTabbedPanePreferredSize

      public static final Dimension jpoNavigatorJTabbedPanePreferredSize
      the preferred Dimension for the Navigator Panel
    • THUMBNAIL_JSCROLLPANE_MINIMUM_SIZE

      public static final Dimension THUMBNAIL_JSCROLLPANE_MINIMUM_SIZE
      the minimum Dimension for the Thumbnail Panel
    • thumbnailJScrollPanePreferredSize

      public static final Dimension thumbnailJScrollPanePreferredSize
      the preferred Dimension for the Thumbnail Panel
    • jpoJFrameMinimumSize

      public static final Dimension jpoJFrameMinimumSize
      the minimum Dimension for the JPO Window
    • jpoJFramePreferredSize

      public static final Dimension jpoJFramePreferredSize
      the preferred Dimension for the JPO Window
  • Constructor Details

    • Settings

      public Settings()
  • Method Details

    • getUiScale

      public static double getUiScale()
    • setUiScale

      public static void setUiScale(double uiScale)
    • getPictureCollection

      public static PictureCollection getPictureCollection()
      Returns:
      the main pictureCollection
    • setPictureCollection

      public static void setPictureCollection(PictureCollection pictureCollection)
      Parameters:
      pictureCollection - the pictureCollection to set
    • isWriteLog

      public static boolean isWriteLog()
      Returns whether a log should be written
      Returns:
      true if a log should be written.
    • setWriteLog

      public static void setWriteLog(boolean writeLog)
      Sets the writeLog flag
      Parameters:
      writeLog - the value to set the writelog flag to.
    • getStartupSizeChoice

      public static int getStartupSizeChoice()
      Returns the choice the user made about the application window start up size. 0 = Maximise 1 = Primary Screen 2 = Secondary Screen 3 = Last Size
      Returns:
      true if the window should be maxunused on JPO startup
    • setStartupSizeChoice

      public static void setStartupSizeChoice(int startupSizeChoice)
      Remembers if the choice for the startup size
      Parameters:
      startupSizeChoice - The choice value to remember
    • getLastMainFrameCoordinates

      public static Rectangle getLastMainFrameCoordinates()
      Returns the position and size of the last main window
      Returns:
      the position and size of the last main window
    • setLastMainFrameCoordinates

      public static void setLastMainFrameCoordinates(Rectangle mainFrameCoordinates)
      Remembers the position and size of the last Main Window
      Parameters:
      mainFrameCoordinates - The position and size of the last main window
    • getNewViewerSizeChoice

      public static int getNewViewerSizeChoice()
      Returns the size choice for a new Picture Viewer window 0 = Maximise 1 = Primary Screen 2 = Secondary Screen 3 = Last Size
      Returns:
      the size choice for a new Picture Viewer window
    • setNewViewerSizeChoice

      public static void setNewViewerSizeChoice(int newViewerSizeChoice)
      Remembers the choice for new Picture Viewer windows
      Parameters:
      newViewerSizeChoice - The choice to remember
    • getLastViewerCoordinates

      public static Rectangle getLastViewerCoordinates()
      Returns the Last saved position and size of the Picture Viewer
      Returns:
      the last saved position and size of the Picture Viewer
    • setLastViewerCoordinates

      public static void setLastViewerCoordinates(Rectangle lastViewerCoordinates)
      Remembers the last saved position and size of the Picture Viewer
      Parameters:
      lastViewerCoordinates - the last position and size of the Picture Viewer
    • getMaxThumbnails

      public static int getMaxThumbnails()
      Returns the maximum number of thumbnails to show on the Thumbnail Panel
      Returns:
      the maximum number of thumbnails to show on the Thumbnail Panel
    • setMaxThumbnails

      public static void setMaxThumbnails(int maxThumbnails)
      Remembers the maximum number of thumbnails to show on the Thumbnail Panel
      Parameters:
      maxThumbnails - The number to remember
    • getThumbnailSize

      public static int getThumbnailSize()
    • setThumbnailSize

      public static void setThumbnailSize(int thumbnailSize)
    • getAutoLoad

      public static String getAutoLoad()
      Returns the file to load automatically on startup
      Returns:
      the file to load on startup
    • setAutoLoad

      public static void setAutoLoad(String autoLoad)
    • clearAutoLoad

      public static void clearAutoLoad()
      Method to clear the autoload collection.
    • getRecentCollections

      public static String[] getRecentCollections()
      Returns an array of recently used collections
      Returns:
      the array of recently used collections
    • isDontEnlargeSmallImages

      public static boolean isDontEnlargeSmallImages()
      Returns whether to enlarge small images to screen size or not
      Returns:
      whether to enlarge images that are smaller than the screen
    • setDontEnlargeSmallImages

      public static void setDontEnlargeSmallImages(boolean dontEnlargeSmallImages)
    • isUnsavedSettingChanges

      public static boolean isUnsavedSettingChanges()
    • setUnsavedSettingChanges

      public static void setUnsavedSettingChanges(boolean unsavedSettingChanges)
    • getAnchorFrame

      public static JFrame getAnchorFrame()
      returns the main frame of the application so that other windows can position themselves relative to it.
      Returns:
      the positon of the main frame
    • setAnchorFrame

      public static void setAnchorFrame(JFrame anchorFrame)
    • getThumbnailCacheDirectory

      public static String getThumbnailCacheDirectory()
    • getMaximumPictureSize

      public static int getMaximumPictureSize()
      Rtruns the maximum width or height the pictures may be scaled to. Intended to prevent the JVM blowing out of memory
      Returns:
      The maximum number of pixels an image may become wide or high
    • setMaximumPictureSize

      public static void setMaximumPictureSize(int maximumPictureSize)
    • getFilenameFieldPreferredSize

      public static Dimension getFilenameFieldPreferredSize()
    • getFilenameFieldMinimumSize

      public static Dimension getFilenameFieldMinimumSize()
    • getFilenameFieldMaximumSize

      public static Dimension getFilenameFieldMaximumSize()
    • getShortFieldPreferredSize

      public static Dimension getShortFieldPreferredSize()
    • getShortFieldMinimumSize

      public static Dimension getShortFieldMinimumSize()
      Gets the minimum size for short fields
      Returns:
      the minimum size for short fields
    • getShortFieldMaximumSize

      public static Dimension getShortFieldMaximumSize()
    • getTextfieldPreferredSize

      public static Dimension getTextfieldPreferredSize()
    • getTextfieldMinimumSize

      public static Dimension getTextfieldMinimumSize()
    • getTextfieldMaximumSize

      public static Dimension getTextfieldMaximumSize()
    • getShortNumberPreferredSize

      public static Dimension getShortNumberPreferredSize()
    • getShortNumberMinimumSize

      public static Dimension getShortNumberMinimumSize()
    • getShortNumberMaximumSize

      public static Dimension getShortNumberMaximumSize()
    • getThreeDotButtonSize

      public static Dimension getThreeDotButtonSize()
    • getTitleFont

      public static Font getTitleFont()
    • getDefaultHtmlPicsPerRow

      public static int getDefaultHtmlPicsPerRow()
      Returns the default number of html pictures per row
      Returns:
      the default number of html pictures per row
    • setDefaultHtmlPicsPerRow

      public static void setDefaultHtmlPicsPerRow(int defaultHtmlPicsPerRow)
    • getDefaultHtmlThumbnailWidth

      public static int getDefaultHtmlThumbnailWidth()
    • setDefaultHtmlThumbnailWidth

      public static void setDefaultHtmlThumbnailWidth(int defaultHtmlThumbnailWidth)
    • getDefaultHtmlThumbnailHeight

      public static int getDefaultHtmlThumbnailHeight()
    • setDefaultHtmlThumbnailHeight

      public static void setDefaultHtmlThumbnailHeight(int defaultHtmlThumbnailHeight)
    • isDefaultGenerateMidresHtml

      public static boolean isDefaultGenerateMidresHtml()
    • setDefaultGenerateMidresHtml

      public static void setDefaultGenerateMidresHtml(boolean defaultGenerateMidresHtml)
    • isDefaultGenerateMap

      public static boolean isDefaultGenerateMap()
    • setDefaultGenerateMap

      public static void setDefaultGenerateMap(boolean defaultGenerateMap)
      Remembers if generate map should be ticked.
      Parameters:
      defaultGenerateMap - whether generate map should be ticked
    • isDefaultGenerateDHTML

      public static boolean isDefaultGenerateDHTML()
    • setDefaultGenerateDHTML

      public static void setDefaultGenerateDHTML(boolean defaultGenerateDHTML)
    • isDefaultGenerateZipfile

      public static boolean isDefaultGenerateZipfile()
    • setDefaultGenerateZipfile

      public static void setDefaultGenerateZipfile(boolean defaultGenerateZipfile)
      Remembers if generate Zip file was ticked
      Parameters:
      defaultGenerateZipfile - the value to remember
    • isDefaultLinkToHighres

      public static boolean isDefaultLinkToHighres()
    • setDefaultLinkToHighres

      public static void setDefaultLinkToHighres(boolean defaultLinkToHighres)
    • isDefaultExportHighres

      public static boolean isDefaultExportHighres()
    • setDefaultExportHighres

      public static void setDefaultExportHighres(boolean defaultExportHighres)
    • isDefaultRotateHighres

      public static boolean isDefaultRotateHighres()
    • setDefaultRotateHighres

      public static void setDefaultRotateHighres(boolean defaultRotateHighres)
    • getDefaultHtmlMidresWidth

      public static int getDefaultHtmlMidresWidth()
      Returns the default width for a midres picture
      Returns:
      the default width
    • setDefaultHtmlMidresWidth

      public static void setDefaultHtmlMidresWidth(int defaultHtmlMidresWidth)
      Remembers the default width for a midred picture
      Parameters:
      defaultHtmlMidresWidth - the widthto remember
    • getDefaultHtmlMidresHeight

      public static int getDefaultHtmlMidresHeight()
      Returns the default height for a midres picture
      Returns:
      the default height
    • setDefaultHtmlMidresHeight

      public static void setDefaultHtmlMidresHeight(int defaultHtmlMidresHeight)
      Remembers the default height for a midres picture
      Parameters:
      defaultHtmlMidresHeight - the height to remember
    • getDefaultHtmlPictureNaming

      public static GenerateWebsiteRequest.PictureNamingType getDefaultHtmlPictureNaming()
      Default Html Picture naming
      Returns:
      the default
    • setDefaultHtmlPictureNaming

      public static void setDefaultHtmlPictureNaming(GenerateWebsiteRequest.PictureNamingType defaultHtmlPictureNaming)
      Remembers Default Html Picture naming
      Parameters:
      defaultHtmlPictureNaming - the new default
    • getDefaultHtmlOutputTarget

      public static GenerateWebsiteRequest.OutputTarget getDefaultHtmlOutputTarget()
      returns the html ouput target that was last used
      Returns:
      the html output target
    • setDefaultHtmlOutputTarget

      public static void setDefaultHtmlOutputTarget(GenerateWebsiteRequest.OutputTarget defaultHtmlOutputTarget)
    • getHtmlBackgroundColor

      public static Color getHtmlBackgroundColor()
      returns the default html background color
      Returns:
      the default background color
    • setHtmlBackgroundColor

      public static void setHtmlBackgroundColor(Color htmlBackgroundColor)
      Remembers the default html background color
      Parameters:
      htmlBackgroundColor - the color to remember
    • getHtmlFontColor

      public static Color getHtmlFontColor()
    • setHtmlFontColor

      public static void setHtmlFontColor(Color htmlFontColor)
    • getDefaultHtmlLowresQuality

      public static float getDefaultHtmlLowresQuality()
      Returns the default quality for html lowres
      Returns:
      the default quality setting
    • setDefaultHtmlLowresQuality

      public static void setDefaultHtmlLowresQuality(float defaultHtmlLowresQuality)
    • getDefaultHtmlMidresQuality

      public static float getDefaultHtmlMidresQuality()
      Returns the default midres quality for html
      Returns:
      the default midres quality
    • setDefaultHtmlMidresQuality

      public static void setDefaultHtmlMidresQuality(float defaultHtmlMidresQuality)
    • isWriteRobotsTxt

      public static boolean isWriteRobotsTxt()
      Whether to write a Robots.txt file
      Returns:
      whether to write a Robots.txt file
    • setWriteRobotsTxt

      public static void setWriteRobotsTxt(boolean writeRobotsTxt)
      Remembers whether to write a robots.txt file
      Parameters:
      writeRobotsTxt - Remembers whether to write a robots.txt file
    • getDefaultHtmlFtpServer

      public static String getDefaultHtmlFtpServer()
      Returns the default ftp server for the html upload
      Returns:
      the default ftp server
    • setDefaultHtmlFtpServer

      public static void setDefaultHtmlFtpServer(String defaultHtmlFtpServer)
      Remembers the default ftp server for the html upload
      Parameters:
      defaultHtmlFtpServer - the ftp server to remember
    • getDefaultHtmlFtpPort

      public static int getDefaultHtmlFtpPort()
      Returns the default html ftp port
      Returns:
      the default html ftp port
    • setDefaultHtmlFtpPort

      public static void setDefaultHtmlFtpPort(int defaultHtmlFtpPort)
      Remembers the default html ftp port
      Parameters:
      defaultHtmlFtpPort - the port to remember
    • getDefaultHtmlFtpUser

      public static String getDefaultHtmlFtpUser()
      Returns the ftp port for Html export
      Returns:
      the default ftp port for the Html export
    • setDefaultHtmlFtpUser

      public static void setDefaultHtmlFtpUser(String defaultHtmlFtpUser)
      Remembers the default ftp user account
      Parameters:
      defaultHtmlFtpUser - the new ftp user to remember
    • getDefaultHtmlFtpPassword

      public static String getDefaultHtmlFtpPassword()
      Returns the default ftp password for Html export
      Returns:
      the default ftp password
    • setDefaultHtmlFtpPassword

      public static void setDefaultHtmlFtpPassword(String defaultHtmlFtpPassword)
      Remebers the default ftp password for Html export
      Parameters:
      defaultHtmlFtpPassword - The default password for the ftp export
    • getDefaultHtmlFtpTargetDir

      public static String getDefaultHtmlFtpTargetDir()
      Returns the default directory for the ftp export
      Returns:
      The default directory for the ftp target
    • setDefaultHtmlFtpTargetDir

      public static void setDefaultHtmlFtpTargetDir(String defaultHtmlFtpTargetDir)
      Remembers the default ftp target directory for Html export
      Parameters:
      defaultHtmlFtpTargetDir - The default ftp target directory
    • getDefaultHtmlSshServer

      public static String getDefaultHtmlSshServer()
      Returns the default ssh server for the Html export
      Returns:
      the default ssh server for the Html export
    • setDefaultHtmlSshServer

      public static void setDefaultHtmlSshServer(String defaultHtmlSshServer)
      Remembers the default ssh server for Html export
      Parameters:
      defaultHtmlSshServer - The default ssh server for Html export
    • getDefaultHtmlSshPort

      public static int getDefaultHtmlSshPort()
    • setDefaultHtmlSshPort

      public static void setDefaultHtmlSshPort(int defaultHtmlSshPort)
    • getDefaultHtmlSshUser

      public static String getDefaultHtmlSshUser()
      Returns the default user for ssh in the webpage publisher
      Returns:
      the default ssh user
    • setDefaultHtmlSshUser

      public static void setDefaultHtmlSshUser(String defaultHtmlSshUser)
      Remembers the default ssh user
      Parameters:
      defaultHtmlSshUser - the ssh user to remember
    • getDefaultHtmlSshAuthType

      public static GenerateWebsiteRequest.SshAuthType getDefaultHtmlSshAuthType()
      Remembers the ssh authentication type
      Returns:
      the authentication type
    • setDefaultHtmlSshAuthType

      public static void setDefaultHtmlSshAuthType(GenerateWebsiteRequest.SshAuthType defaultHtmlSshAuthType)
      Remembers the ssh authentication type
      Parameters:
      defaultHtmlSshAuthType - the ssh authentication type to remember
    • getDefaultHtmlSshPassword

      public static String getDefaultHtmlSshPassword()
    • setDefaultHtmlSshPassword

      public static void setDefaultHtmlSshPassword(String defaultHtmlSshPassword)
    • getDefaultHtmlSshTargetDir

      public static String getDefaultHtmlSshTargetDir()
    • setDefaultHtmlSshTargetDir

      public static void setDefaultHtmlSshTargetDir(String defaultHtmlSshTargetDir)
    • getDefaultHtmlSshKeyFile

      public static String getDefaultHtmlSshKeyFile()
      Retruns the default ssh key file
      Returns:
      the default ssh key file
    • setDefaultHtmlSshKeyFile

      public static void setDefaultHtmlSshKeyFile(String defaultHtmlSshKeyFile)
    • isThumbnailFastScale

      public static boolean isThumbnailFastScale()
      returns if thumbnails should be rendered faster instead of better quality
      Returns:
      true if speed is desired
    • setThumbnailFastScale

      public static void setThumbnailFastScale(boolean thumbnailFastScale)
      Stores the default choice for fast scaling
      Parameters:
      thumbnailFastScale - true is fast scaling should be used false if not.
    • isShowFilenamesOnThumbnailPanel

      public static boolean isShowFilenamesOnThumbnailPanel()
      returns if filenames should be shown on the Thumbnail Pane
      Returns:
      true if filenames should be shown
    • setShowFilenamesOnThumbnailPanel

      public static void setShowFilenamesOnThumbnailPanel(boolean showFilenamesOnThumbnailPanel)
      Stores whether filenames should be shown on the Thumbnail pane
      Parameters:
      showFilenamesOnThumbnailPanel - the new value
    • isShowTimestampsOnThumbnailPanel

      public static boolean isShowTimestampsOnThumbnailPanel()
      returns if timestamps should be shown on the Thumbails in the Thumbnails Panel
      Returns:
      true if timestamps should be shown
    • setShowTimestampsOnThumbnailPanel

      public static void setShowTimestampsOnThumbnailPanel(boolean showTimestampsOnThumbnailPanel)
      Stores the default choice for fast scaling
      Parameters:
      showTimestampsOnThumbnailPanel - the new value
    • isPictureViewerFastScale

      public static boolean isPictureViewerFastScale()
    • setPictureViewerFastScale

      public static void setPictureViewerFastScale(boolean pictureViewerFastScale)
    • isShowThumbOnFileChooser

      public static boolean isShowThumbOnFileChooser()
    • setShowThumbOnFileChooser

      public static void setShowThumbOnFileChooser(boolean showThumbOnFileChooser)
    • getDefaultButtonDimension

      public static Dimension getDefaultButtonDimension()
      Returns the default dimension for a button
      Returns:
      the default dimension for a button
    • getDefaultGoogleMapsApiKey

      public static String getDefaultGoogleMapsApiKey()
      Returns the Google Maps API key that was remembered
      Returns:
      the remembered Google Maps API key
    • setDefaultGoogleMapsApiKey

      public static void setDefaultGoogleMapsApiKey(String defaultGoogleMapsApiKey)
      Remembers the Google Maps API key
      Parameters:
      defaultGoogleMapsApiKey - the key to remember
    • getSortOptions

      public static List<SortOption> getSortOptions()
      returns a List of SortOptions
      Returns:
      the List of sort options
    • getSelectedColor

      public static Color getSelectedColor()
      Returns the selected color
      Returns:
      the selected color
    • getSelectedColorText

      public static Color getSelectedColorText()
      Returns the color to use for selected text
      Returns:
      the color to use for selected text
    • getUnselectedColor

      public static Color getUnselectedColor()
      Returns the color to use for unselected text
      Returns:
      the color to use for unselected text
    • getCameras

      public static List<Camera> getCameras()
      Returns a list of the registered cameras
      Returns:
      the lsit of cameras
    • setCameras

      public static void setCameras(List<Camera> cameras)
      Remembers the cameras
      Parameters:
      cameras - the cameras to remember
    • getEmailSenders

      public static SortedSet<Object> getEmailSenders()
    • getLogfile

      public static File getLogfile()
    • setLogfile

      public static void setLogfile(File logfile)
    • getEmailRecipients

      public static SortedSet<Object> getEmailRecipients()
      Returns the remembered email recipients
      Returns:
      the email recipients
    • getEmailServer

      public static String getEmailServer()
    • setEmailServer

      public static void setEmailServer(String emailServer)
    • getLOGGER

      public static Logger getLOGGER()
    • getPreferredMasterDividerSpot

      public static int getPreferredMasterDividerSpot()
    • setPreferredMasterDividerSpot

      public static void setPreferredMasterDividerSpot(int preferredMasterDividerSpot)
    • getPreferredLeftDividerSpot

      public static int getPreferredLeftDividerSpot()
    • setPreferredLeftDividerSpot

      public static void setPreferredLeftDividerSpot(int preferredLeftDividerSpot)
    • getDividerWidth

      public static int getDividerWidth()
    • setDividerWidth

      public static void setDividerWidth(int dividerWidth)
    • getDefaultMaxThumbnails

      public static int getDefaultMaxThumbnails()
    • getEmailPort

      public static String getEmailPort()
    • setEmailPort

      public static void setEmailPort(String emailPort)
    • getEmailAuthentication

      public static int getEmailAuthentication()
    • setEmailAuthentication

      public static void setEmailAuthentication(int emailAuthentication)
    • getEmailUser

      public static String getEmailUser()
    • setEmailUser

      public static void setEmailUser(String emailUser)
    • getEmailPassword

      public static String getEmailPassword()
    • setEmailPassword

      public static void setEmailPassword(String emailPassword)
      sets the emailPassword setting
      Parameters:
      emailPassword - the email password to remember
    • isEmailScaleImages

      public static boolean isEmailScaleImages()
      returns if images should be scaled in emails sent by JPO
      Returns:
      true if images should be scaled in emails sent by JPO
    • setEmailScaleImages

      public static void setEmailScaleImages(boolean emailScaleImages)
      remember if email images should be scaled
      Parameters:
      emailScaleImages - whether email images should be scaled
    • getEmailDimensions

      public static Dimension getEmailDimensions()
      returns the maximum dimension of images being sent in an email
      Returns:
      the maximum dimension of an image being sent in an email
    • setEmailDimensions

      public static void setEmailDimensions(Dimension emailDimensions)
    • isEmailSendOriginal

      public static boolean isEmailSendOriginal()
    • setEmailSendOriginal

      public static void setEmailSendOriginal(boolean emailSendOriginal)
    • getJpoBackgroundColor

      public static Color getJpoBackgroundColor()
    • getPictureviewerBackgroundColor

      public static Color getPictureviewerBackgroundColor()
    • getPictureviewerTextColor

      public static Color getPictureviewerTextColor()
    • getPictureviewerMinimumSize

      public static Dimension getPictureviewerMinimumSize()
    • getTagCloudWords

      public static int getTagCloudWords()
    • setTagCloudWords

      public static void setTagCloudWords(int tagCloudWords)
    • getLastSortChoice

      public static Settings.FieldCodes getLastSortChoice()
    • setLastSortChoice

      public static void setLastSortChoice(Settings.FieldCodes lastSortChoice)
    • isLastCameraWizardCopyMode

      public static boolean isLastCameraWizardCopyMode()
    • setLastCameraWizardCopyMode

      public static void setLastCameraWizardCopyMode(boolean lastCameraWizardCopyMode)
    • isRememberGoogleCredentials

      public static boolean isRememberGoogleCredentials()
    • setRememberGoogleCredentials

      public static void setRememberGoogleCredentials(boolean rememberGoogleCredentials)
    • getGoogleUsername

      public static String getGoogleUsername()
    • setGoogleUsername

      public static void setGoogleUsername(String googleUsername)
    • getGooglePassword

      public static String getGooglePassword()
      Retruns the last used google password
      Returns:
      the last used google password
    • setGooglePassword

      public static void setGooglePassword(String googlePassword)
      Remembers the Google password
      Parameters:
      googlePassword - the Google password
    • isDebugMode

      public static boolean isDebugMode()
      Returns if JPO is running in debug mode
      Returns:
      true if we are in debug mode
    • setDebugMode

      public static void setDebugMode(boolean newMode)
      Sets to whether JPO runs in Debug mode or not
      Parameters:
      newMode - the new mode.
    • setDefaults

      public static void setDefaults()
      method that set the default parameters
    • loadSettings

      public static void loadSettings()
      This method reads the settings from the preferences.
    • validateSettings

      public static void validateSettings()
      method that validates the settings & brings up the Settings dialog if not ok
    • writeSettings

      public static void writeSettings()
      This method writes the settings to the Preferences object which was added to Java with 1.4
    • writeCameraSettings

      public static void writeCameraSettings()
      Writes the cameras collection to the preferences. Uses an idea presented by Greg Travis on this IBM website: ...
    • loadCameraSettings

      public static void loadCameraSettings()
      this method attempts to load the cameras
    • pushRecentCollection

      public static void pushRecentCollection(String recentFile)
      This method memorises a collection file name for the Open > Recent menu.

      The caller should notify any listeners that the recentCollections changed by sending a JpoEventBus.getInstance().post( new RecentCollectionsChangedEvent() );

      Parameters:
      recentFile - The collection file name to be memorised
    • clearRecentCollection

      public static void clearRecentCollection()
      This method clears all the recent collection file names.

      The caller should notify any listeners that the recentCollections changed by sending a JpoEventBus.getInstance().post( new RecentCollectionsChangedEvent() );

    • getCurrentLocale

      public static Locale getCurrentLocale()
      returns the Locale the application is running in.
      Returns:
      The locale set by environment, default, user or persistent settings.
    • getCurrentLanguage

      public static String getCurrentLanguage()
      returns the Language the application is running in.
      Returns:
      The Language
    • getSupportedLanguages

      public static String[] getSupportedLanguages()
    • getSupportedLocale

      public static Locale[] getSupportedLocale()
    • setLocale

      public static boolean setLocale(Locale newLocale)
      Sets the new locale. As of 3 Apr 2014 this doesn't send a LocaleChangeEvent anymore. Instead, the widget changing the locale is expected to send a LocaledChangedEvent
      Parameters:
      newLocale - the new locale
      Returns:
      true if the locale was changed, false if not.
    • getJpoResources

      public static ResourceBundle getJpoResources()
    • setJpoResources

      public static void setJpoResources(ResourceBundle jpoResources)
    • getMaxDropnodes

      public static int getMaxDropnodes()
    • getRecentDropNodes

      public static Queue<SortableDefaultMutableTreeNode> getRecentDropNodes()
    • memorizeGroupOfDropLocation

      public static void memorizeGroupOfDropLocation(SortableDefaultMutableTreeNode recentNode)
      This method memorizes the recent drop targets so that they can be accessed more quickly in subsequent move operations. After calling this method send a RecentDropNodesChangedEvent onto the EventBus so that GUI widgets can update themselves. Nodes are only added once.

      JpoEventBus.getInstance().post( new RecentDropNodesChangedEvent() );

      Parameters:
      recentNode - The recent drop target to add
    • getCopyLocations

      public static Queue<String> getCopyLocations()
      Returns the list of copy locations
      Returns:
      the list of copy locations
    • getMemorizedZipFiles

      public static Queue<String> getMemorizedZipFiles()
    • memorizeCopyLocation

      public static void memorizeCopyLocation(String location)
      This method memorises the directories used in copy operations so that they can be offered as options in drop down lists.

      The callers of this method need to make sure they notify interested listeners of a change by calling:

      JpoEventBus.getInstance().post( new CopyLocationsChangedEvent() );

      Parameters:
      location - The new location to memorise
    • memorizeDefaultSourceLocation

      public static void memorizeDefaultSourceLocation(String newLocation)
      This method memorises the directory used in the most recent Add Pictures operation. The location is only memorised if it points to a valid directory.
      Parameters:
      newLocation - The new location to memorise
    • memorizeZipFile

      public static void memorizeZipFile(String location)
      This method memorises the zip files used in copy operations so that they can be offered as options in drop down lists.
      Parameters:
      location - The new zip file to memorise
    • validateCopyLocations

      public static void validateCopyLocations()
      This method validates that the copy locations are valid directories and removes those that don't exist
    • clearCopyLocations

      public static void clearCopyLocations()
      This method clears the copy locations and saves the settings
    • getDefaultSourceLocation

      public static File getDefaultSourceLocation()
      This method returns the most recently used source location. If there is no most recent sourceLocation then the user's home directory is returned.
      Returns:
      Returns the most recent source location directory or the user's home directory
    • getMostRecentCopyLocation

      public static File getMostRecentCopyLocation()
      This method returns the most recently used copy location. If there is no most recent copyLocation then the user's home directory is returned.
      Returns:
      Returns the most recent copy location directory or the user's home directory
    • getUserFunctionNames

      public static String[] getUserFunctionNames()
    • getUserFunctionCmd

      public static String[] getUserFunctionCmd()
    • getMainWindow

      public static MainWindow getMainWindow()
    • setMainWindow

      public static void setMainWindow(MainWindow newMainWindow)
    • isIgnoreVersionAlerts

      public static boolean isIgnoreVersionAlerts()
      Returns if version alerts are supposed to be suppressed
      Returns:
      true if version alerts are supposed to be suppressed
    • setIgnoreVersionAlerts

      public static void setIgnoreVersionAlerts(boolean ignore)
      Remembers the user choice about prompting version alerts
      Parameters:
      ignore - send true to turn off version alerting
    • setSnoozeVersionAlertsExpiryDateTime

      public static void setSnoozeVersionAlertsExpiryDateTime(LocalDateTime expiryDateTime)
      Records the expiry DateTime before which the version alerts shall not be shown.
      Parameters:
      expiryDateTime - the expiry DateTime for the snooze
    • getSnoozeVersionAlertsExpiryDateTime

      public static LocalDateTime getSnoozeVersionAlertsExpiryDateTime()
      Returns the expiry DateTime before which the version alerts shall not be shown.
      Returns:
      The timestamp before which alerts shall not be shown
    • getDefaultThumbnailCreationThreads

      public static int getDefaultThumbnailCreationThreads()
      Returns the number of threads JPO should spawn to create thumbnails concurrently
      Returns:
      The number of threads to spawn