com.smartgwt.client.util

## Class FileLoader

- java.lang.Object
- - com.smartgwt.client.util.FileLoader

-     public class FileLoader
      extends java.lang.Object

  Helper class to preload skin images.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileLoader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `cacheEdgeImages(java.lang.String skinImgDir, java.lang.String baseURL)` Caches a set of edge images derived from a base image.
    `static void` | `cacheEdgeImages(java.lang.String skinImgDir, java.lang.String[] baseURLs, java.lang.String[] edges)` Caches a set of edge images derived from a base image.
    `static void` | `cacheEdgeImages(java.lang.String skinImgDir, java.lang.String baseURL, java.lang.String edges)` Caches a set of edge images derived from a base image.
    `static void` | `cacheEdgeImages(java.lang.String skinImgDir, java.lang.String baseURL, java.lang.String[] edges)` Caches a set of edge images derived from a base image.
    `static void` | `cacheImg(java.lang.String skinImgDir, java.lang.String baseImageURL)` Cache a list of images
    `static void` | `cacheImgs(java.lang.String skinImgDir, java.util.List<java.lang.String> baseImageURLs)` Cache a list of images
    `static void` | `cacheImgStates(java.lang.String skinImgDir, java.lang.String[] baseImageURLs, java.lang.String[] states)` Caches a set of state images derived from a base image.
    `static void` | `cacheImgStates(java.lang.String skinImgDir, java.lang.String baseImageURL, java.lang.String states)` Caches a set of state images derived from a base image.
    `static void` | `cacheStretchImgStates(java.lang.String skinImgDir, java.lang.String[] baseURLs, java.lang.String[] states)` Caches a set of state stretch images derived from a base image.
    `static void` | `cacheStretchImgStates(java.lang.String skinImgDir, java.lang.String baseURL, java.lang.String states)` Caches a set of state stretch images derived from a base image.
    `static void` | `cacheStretchImgStates(java.lang.String skinImgDir, java.lang.String baseURL, java.lang.String[] states)` Caches a set of state stretch images derived from a base image.
    `static java.lang.String` | `getSkinDir()` Return the skin dir.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileLoader

          public FileLoader()

  - ### Method Detail

    - #### getSkinDir

          public static java.lang.String getSkinDir()

      Return the skin dir.
      Returns:
        the skin dir

    - #### cacheImgs

          public static void cacheImgs(java.lang.String skinImgDir,
                       java.util.List<java.lang.String> baseImageURLs)

      Cache a list of images
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseImageURLs` - a list of base urls

    - #### cacheImg

          public static void cacheImg(java.lang.String skinImgDir,
                      java.lang.String baseImageURL)

      Cache a list of images
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseImageURL` - the base urls

    - #### cacheImgStates

          public static void cacheImgStates(java.lang.String skinImgDir,
                            java.lang.String baseImageURL,
                            java.lang.String states)

      Caches a set of state images derived from a base image. This is useful for caching a set of images for a single component. For example this code:
      FileLoader.cacheImgStates("TreeGrid/opener.png","closed,opening,opened");

      Will cause the following images to be cached:

      /isomorphic/skins/[skin]/images/TreeGrid/opener_closed.png /isomorphic/skins/[skin]/images/TreeGrid/opener_opening.png /isomorphic/skins/[skin]/images/TreeGrid/opener_opened.png
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseImageURL` - the base image path
        `states` - a list of states to load.

    - #### cacheImgStates

          public static void cacheImgStates(java.lang.String skinImgDir,
                            java.lang.String[] baseImageURLs,
                            java.lang.String[] states)

      Caches a set of state images derived from a base image. This is useful for caching a set of images for a single component. For example this code:
      FileLoader.cacheImgStates("TreeGrid/opener.png","closed,opening,opened");

      Will cause the following images to be cached:

      /isomorphic/skins/[skin]/images/TreeGrid/opener_closed.png /isomorphic/skins/[skin]/images/TreeGrid/opener_opening.png /isomorphic/skins/[skin]/images/TreeGrid/opener_opened.png
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseImageURLs` - the base image paths
        `states` - a list of states to load.

    - #### cacheEdgeImages

          public static void cacheEdgeImages(java.lang.String skinImgDir,
                             java.lang.String baseURL)

      Caches a set of edge images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURL` - the base url

    - #### cacheEdgeImages

          public static void cacheEdgeImages(java.lang.String skinImgDir,
                             java.lang.String baseURL,
                             java.lang.String edges)

      Caches a set of edge images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURL` - the base url
        `edges` - List of edges to load.

    - #### cacheEdgeImages

          public static void cacheEdgeImages(java.lang.String skinImgDir,
                             java.lang.String baseURL,
                             java.lang.String[] edges)

      Caches a set of edge images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURL` - the base url
        `edges` - List of edges to load.

    - #### cacheEdgeImages

          public static void cacheEdgeImages(java.lang.String skinImgDir,
                             java.lang.String[] baseURLs,
                             java.lang.String[] edges)

      Caches a set of edge images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURLs` - list of base urls
        `edges` - List of edges to load.

    - #### cacheStretchImgStates

          public static void cacheStretchImgStates(java.lang.String skinImgDir,
                                   java.lang.String baseURL,
                                   java.lang.String states)

      Caches a set of state stretch images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURL` - base image URL from which stateful names are to be derived
        `states` - List of states to load.

    - #### cacheStretchImgStates

          public static void cacheStretchImgStates(java.lang.String skinImgDir,
                                   java.lang.String baseURL,
                                   java.lang.String[] states)

      Caches a set of state stretch images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURL` - base image URL from which stateful names are to be derived
        `states` - List of states to load.

    - #### cacheStretchImgStates

          public static void cacheStretchImgStates(java.lang.String skinImgDir,
                                   java.lang.String[] baseURLs,
                                   java.lang.String[] states)

      Caches a set of state stretch images derived from a base image.
      Parameters:
        `skinImgDir` - the skinImgDir
        `baseURLs` - List of base image URLs from which stateful names are to be derived
        `states` - List of states to load.