Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dma.ihm.controller
Class Resources  view Resources download Resources.java

java.lang.Object
  extended byorg.dma.ihm.controller.Resources

public class Resources
extends java.lang.Object

Resources returns Translations, gui elements like images, html etc.


Field Summary
private  java.io.File homeDirectory
          User ihm directory
private  java.io.File ihmDirectory
          Ihm root directory
private  java.lang.String language
          Current language
private  java.lang.String skin
          Current (gui) skin
private  java.util.Properties translations
          Translations
 
Constructor Summary
Resources(java.lang.String ihmDirectoryStr, java.lang.String homeDirectoryStr, java.lang.String language, java.lang.String skin)
          Constructs the Resources, loads translations ito cache.
 
Method Summary
 java.net.URL getGuiResource(java.lang.String file, java.lang.String extension)
          Returns a gui resource (jpg, html etc.) for the current language and skin.
 java.util.Properties getTranslationsProperties()
          Returns the translations as a Properties class
 void loadTranslations()
          Load translations
 void setLanguage(java.lang.String language)
          Sets language, and reloads translations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

translations

private java.util.Properties translations
Translations


language

private java.lang.String language
Current language


ihmDirectory

private java.io.File ihmDirectory
Ihm root directory


homeDirectory

private java.io.File homeDirectory
User ihm directory


skin

private java.lang.String skin
Current (gui) skin

Constructor Detail

Resources

public Resources(java.lang.String ihmDirectoryStr,
                 java.lang.String homeDirectoryStr,
                 java.lang.String language,
                 java.lang.String skin)
          throws java.lang.Exception
Constructs the Resources, loads translations ito cache.

Method Detail

setLanguage

public void setLanguage(java.lang.String language)
                 throws java.lang.Exception
Sets language, and reloads translations


loadTranslations

public void loadTranslations()
                      throws java.lang.Exception
Load translations


getTranslationsProperties

public java.util.Properties getTranslationsProperties()
Returns the translations as a Properties class


getGuiResource

public java.net.URL getGuiResource(java.lang.String file,
                                   java.lang.String extension)
                            throws java.lang.Exception
Returns a gui resource (jpg, html etc.) for the current language and skin.