org.pilotix.common
Class ResourceLocator

java.lang.Object
  extended by 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.


Field Summary
static int AREA
           
static int CONFIG
           
static int PILOT
           
static int SHAPE
           
static int SHIP
           
static int TEXTURE
           
 
Constructor Summary
ResourceLocator(java.lang.String aDataPath)
           
 
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
 

Field Detail

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
Constructor Detail

ResourceLocator

public ResourceLocator(java.lang.String aDataPath)
Method Detail

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 fichier
resourceName - le nom du fichier avec son extension
Returns:
l'URL du fichier, ou null s'il est introuvable


artefarita.com/pilotix Pilotix 2003-2013 - Stilisto : G.C.