# LoadingList (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.loading
Class LoadingList

    java.lang.Object
      org.newdawn.slick.loading.LoadingList

    public class LoadingList

extends java.lang.Object

A central list where all deferred loading resoures end up when deferred loading is in use. Each texture and sound loaded will be put in this list and can be loaded in one by one

Author:
  kevin

Method Summary
`void` `add(DeferredResource resource)` Add a resource to be loaded at some later date
`static LoadingList` `get()` Get the single global loading list
`DeferredResource` `getNext()` Get the next resource that requries loading
`int` `getRemainingResources()` Get the number of remaining resources
`int` `getTotalResources()` Get the total number of resources that were in the list originally
`static boolean` `isDeferredLoading()` Check if we're using deferred loading
`void` `remove(DeferredResource resource)` Remove a resource from the list that has been loaded for other reasons.
`static void` `setDeferredLoading(boolean loading)` Indicate if we're going to use deferred loading.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### get

    public static LoadingList get()

  Get the single global loading list

  Returns:
    The single global loading list

### setDeferredLoading

    public static void setDeferredLoading(boolean loading)

  Indicate if we're going to use deferred loading. (Also clears the current list)

  Parameters:
    `loading` - True if we should use deferred loading

### isDeferredLoading

    public static boolean isDeferredLoading()

  Check if we're using deferred loading

  Returns:
    True if we're using deferred loading

### add

    public void add(DeferredResource resource)

  Add a resource to be loaded at some later date

  Parameters:
    `resource` - The resource to be added

### remove

    public void remove(DeferredResource resource)

  Remove a resource from the list that has been loaded for other reasons.

  Parameters:
    `resource` - The resource to remove

### getTotalResources

    public int getTotalResources()

  Get the total number of resources that were in the list originally

  Returns:
    The total number of resources that were in the list originally

### getRemainingResources

    public int getRemainingResources()

  Get the number of remaining resources

  Returns:
    The number of resources that still need to be loaded

### getNext

    public DeferredResource getNext()

  Get the next resource that requries loading

  Returns:
    The next resource to load or null if there are no more remaining

Copyright © 2006 New Dawn Software. All Rights Reserved.