com.threerings.getdown.launcher
Class RotatingBackgrounds

java.lang.Object
  extended by com.threerings.getdown.launcher.RotatingBackgrounds

public class RotatingBackgrounds
extends Object


Constructor Summary
RotatingBackgrounds()
          Creates a placeholder if there are no images.
RotatingBackgrounds(Image background)
          Creates a single image background.
RotatingBackgrounds(String[] backgrounds, String errorBackground, ImageLoader loader)
          Create a sequence of images to be rotated through from backgrounds.
 
Method Summary
 Image getErrorImage()
          Returns the image to display if an error has caused getdown to fail.
 Image getImage(int progress)
           
 int getNumImages()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotatingBackgrounds

public RotatingBackgrounds()
Creates a placeholder if there are no images. Just returns null from getImage every time.


RotatingBackgrounds

public RotatingBackgrounds(Image background)
Creates a single image background.


RotatingBackgrounds

public RotatingBackgrounds(String[] backgrounds,
                           String errorBackground,
                           ImageLoader loader)
Create a sequence of images to be rotated through from backgrounds. Each String in backgrounds should be the path to the image, a semicolon, and the minimum amount of time to display the image in seconds. Each image will be active for an equal percentage of the download process, unless one hasn't been active for its minimum display time when the next should be shown. In that case, it's left up until its been there for its minimum display time and then the next one gets to come up.

Method Detail

getImage

public Image getImage(int progress)
Returns:
the image to display at the given progress or null if there aren't any.

getErrorImage

public Image getErrorImage()
Returns the image to display if an error has caused getdown to fail.


getNumImages

public int getNumImages()
Returns:
the number of images in this RotatingBackgrounds


Copyright © 2013. All Rights Reserved.