Package jmri
Class Application
java.lang.Object
jmri.Application
A lightweight class that provides a methods to retrieve the current JMRI
application name and icon.
This file is part of JMRI.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn the current JMRI application name.static StringgetLogo()Return the current JMRI application logo path.static StringgetURL()static voidsetApplicationName(String applicationName) Set the current JMRI application name.static voidSet the current JMRI application logo path.static void
-
Constructor Details
-
Application
public Application()
-
-
Method Details
-
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 setIllegalArgumentException- if a null name passed
-
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
Set the current JMRI application logo path.- Parameters:
logo- String with the relative path to the JMRI application icon
-
getURL
- Returns:
- the URL
-
setURL
- Parameters:
URL- the URL to set
-