org.pilotix.common
Class ResourceLocator
java.lang.Object
org.pilotix.common.ResourceLocator
public class ResourceLocator
- extends java.lang.Object
Cette classe sert à renvoyer l'URL d'un fichier à partir de son type (CONFIG,
TEXTURE, SHAPE, etc), en cherchant d'abord sur le disque, puis dans le Jar.
Method Summary |
java.net.URL |
getResource(int resourceType,
java.lang.String resourceName)
Cette méthode renvoie l'URL de la ressource dont le type et le nom sont
fournis. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG
public static final int CONFIG
- See Also:
- Constant Field Values
TEXTURE
public static final int TEXTURE
- See Also:
- Constant Field Values
SHIP
public static final int SHIP
- See Also:
- Constant Field Values
SHAPE
public static final int SHAPE
- See Also:
- Constant Field Values
AREA
public static final int AREA
- See Also:
- Constant Field Values
PILOT
public static final int PILOT
- See Also:
- Constant Field Values
ResourceLocator
public ResourceLocator(java.lang.String aDataPath)
getResource
public java.net.URL getResource(int resourceType,
java.lang.String resourceName)
- Cette méthode renvoie l'URL de la ressource dont le type et le nom sont
fournis. La recherche est faite prioritairement sur le disque, puis en
cas d'échec, dans le fichier Jar.
- Parameters:
resourceType
- le type du fichierresourceName
- le nom du fichier avec son extension
- Returns:
- l'URL du fichier, ou null s'il est introuvable
Pilotix 2003-2013 - Stilisto : G.C.