net.sf.jmp3renamer
Class Main

java.lang.Object
  extended by net.sf.jmp3renamer.Main

public class Main
extends Object

The backbone of JMP3Renamer.


Field Summary
private  String CONFIG_FILE
           
private static Properties english
           
private static Properties lang
          Properties hashtable, which holds all used Strings according to the selected language.
private static Logger logger
           
private static MainGUI mainGUI
          The GUI of JMP3Renamer.
private  String PLUGINMANAGER_URL
           
private static Properties props
          Properties hashtable, which holds all configuration settings concerning the core of jmp3renamer (without plugins, they have thier own conf).
private  SplashScreen splash
           
private static ArrayList supportedLanguages
          ArrayList, which defines the supported languages.
static String VERSION
           
 
Constructor Summary
Main(String[] args)
           
 
Method Summary
 void exit()
          Called, if the user wants to exit JMP3Renamer.
static MainGUI getGUI()
          Returns the GUI of JMP3Renamer.
static Properties getLanguageTable(String locale)
           
static String getProperty(String key)
          Gets a configuration setting.
static ArrayList getSupportedLanguages()
          Returns an ArrayList with all supported languages.
private  void initGUI()
          Initliazes the GUI.
 void initLogger()
          Initializes the logging of JMP3Renamer.
private  void loadConfig()
          Sets default settings and tries to load the configuration from a file.
private  void loadLanguage()
          Loads the language.
static void loadLanguageFromJar(Properties lang, String locale)
          Loads the translations for the given locale in the lang table
static void loadlLanguageFromFile(Properties lang, String locale)
           
private  void loadPlugIns()
          Tries to load the plugins.
static void main(String[] args)
          Returns a list of all loaded plugins.
 void saveConfig()
          Saves the current configuration.
static void setLookAndFeel()
           
static void setProperty(String key, String value)
          Sets a configuration setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
See Also:
Constant Field Values

PLUGINMANAGER_URL

private final String PLUGINMANAGER_URL
See Also:
Constant Field Values

CONFIG_FILE

private final String CONFIG_FILE

logger

private static Logger logger

splash

private SplashScreen splash

lang

private static Properties lang
Properties hashtable, which holds all used Strings according to the selected language.

See Also:
Main#getTranslation(String word)., loadLanguage().

english

private static Properties english

supportedLanguages

private static ArrayList supportedLanguages
ArrayList, which defines the supported languages.

See Also:
loadLanguage().

props

private static Properties props
Properties hashtable, which holds all configuration settings concerning the core of jmp3renamer (without plugins, they have thier own conf).


mainGUI

private static MainGUI mainGUI
The GUI of JMP3Renamer.

Constructor Detail

Main

Main(String[] args)
Method Detail

setLookAndFeel

public static void setLookAndFeel()

exit

public void exit()
Called, if the user wants to exit JMP3Renamer. If "save on exit" is selected, the last configuration and window state will be saved.


loadConfig

private void loadConfig()
Sets default settings and tries to load the configuration from a file. This is the first thing jmp3renamer does after startup.

See Also:
props

saveConfig

public void saveConfig()
Saves the current configuration.

See Also:
props

loadLanguage

private void loadLanguage()
Loads the language. First, this method will initialize the language hashtable with english. Then we try to load a language file according to Locale.getDefault();

See Also:
lang, Locale.getDefault()

initLogger

public void initLogger()
Initializes the logging of JMP3Renamer.

See Also:
Logger

initGUI

private void initGUI()
Initliazes the GUI.

See Also:
MainGUI

loadPlugIns

private void loadPlugIns()
Tries to load the plugins.


getSupportedLanguages

public static ArrayList getSupportedLanguages()
Returns an ArrayList with all supported languages.

Returns:
an ArrayList with all supported languages
See Also:
supportedLanguages

setProperty

public static void setProperty(String key,
                               String value)
Sets a configuration setting. This method only sets settings of the core, not settings of plugins.

Parameters:
key - the name of the setting
value - the value of the setting
See Also:
props, getProperty(String key)

getProperty

public static String getProperty(String key)
Gets a configuration setting. This method only returns settings of the core, not settings of plugins.

Parameters:
key - the name of the setting
Returns:
the value of the setting

getGUI

public static MainGUI getGUI()
Returns the GUI of JMP3Renamer.

Returns:
the GUI of JMP3Renamer

main

public static void main(String[] args)
Returns a list of all loaded plugins.


getLanguageTable

public static Properties getLanguageTable(String locale)
                                   throws IOException
Throws:
IOException
See Also:
Translatable.getLanguageTable(String)

loadLanguageFromJar

public static void loadLanguageFromJar(Properties lang,
                                       String locale)
                                throws IOException
Loads the translations for the given locale in the lang table

Parameters:
locale -
Throws:
IOException
See Also:
lang

loadlLanguageFromFile

public static void loadlLanguageFromFile(Properties lang,
                                         String locale)
                                  throws IOException
Throws:
IOException