org.virion.jam.app
Class Utils
java.lang.Object
org.virion.jam.app.Utils
public class Utils
- extends Object
- Author:
- Alexei Drummond, Andrew Rambaut
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
getLoadFileName
public static String getLoadFileName(String message)
getSaveFileName
public static String getSaveFileName(String message)
getLoadFile
public static File getLoadFile(String message)
getSaveFile
public static File getSaveFile(String message)
trimExtensions
public static String trimExtensions(String fileName,
String[] extensions)
- This function takes a file name and an array of extensions (specified
without the leading '.'). If the file name ends with one of the extensions
then it is returned with this trimmed off. Otherwise the file name is
return as it is.
- Returns:
- the trimmed filename
getImage
public static Image getImage(Object caller,
String name)
- Returns:
- a named image from file or resource bundle.