Package jmri

Class Application

java.lang.Object
jmri.Application

public class Application extends Object
A lightweight class that provides a methods to retrieve the current JMRI application name and icon.

The current name is set when a given JMRI application is launched.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  • Constructor Details

  • Method Details

    • getApplicationName

      public static String getApplicationName()
      Return the current JMRI application name.
      Returns:
      String containing JMRI application name or "JMRI" if name has not been set.
    • setApplicationName

      public static void setApplicationName(String applicationName) throws IllegalAccessException, IllegalArgumentException
      Set the current JMRI application name.
      Parameters:
      applicationName - String containing the JMRI application name
      Throws:
      IllegalAccessException - if attempting to modify once set
      IllegalArgumentException - if a null name passed
    • getLogo

      public static String getLogo()
      Return the current JMRI application logo path. This path is relative to the JMRI application installation path. If the application does not have its own icon, return the JMRI default icon.
      Returns:
      String containing the application icon path
    • setLogo

      public static void setLogo(String logo)
      Set the current JMRI application logo path.
      Parameters:
      logo - String with the relative path to the JMRI application icon
    • getURL

      public static String getURL()
      Returns:
      the URL
    • setURL

      public static void setURL(String URL)
      Parameters:
      URL - the URL to set