import java.util.Collection; public interface PhotoLoader { /** Load image data from the named text file. Throws an exception if there * was a problem opening the file (does not exist, etc), or if it's badly * formatted (lines which are different length). Each line in the file * represents one row of pixels, and each character represents a single * pixel. Specifically, a ' ' (blank space) represents a white pixel, * a '.' (period) represents a gray pixel, and any other character * (for example a 'x') represents a black pixel. * @param photoname the filename of the photo, which is also the name used to identify the photo. * @return the loaded photo object. */ public Photo getPhoto(String photoname) throws Exception; /** Load all of the background photos which are listed in the specified file. * @param filename the file to use for the list of background photos. */ public void loadBGManifest(String filename) throws Exception; /** Load all of the foreground photos which are listed in the specified file. * @param filename the file to use for the list of foreground photos. */ public void loadFGManifest(String filename) throws Exception; /** Get a list of all background photos which have been loaded. * @return a list of photos. */ public Collection getBGPhotos(); /** Get a list of all foreground photos which have been loaded. * @return a list of photos. */ public Collection getFGPhotos(); }