net.aerith.misao.pixy.image_loading
Class DefaultImageLoader

java.lang.Object
  |
  +--net.aerith.misao.util.OperationObservable
        |
        +--net.aerith.misao.util.Operation
              |
              +--net.aerith.misao.pixy.image_loading.DefaultImageLoader

public class DefaultImageLoader
extends Operation

The DefaultImageLoader is a class to load an image file.


Field Summary
protected  java.io.File file
          The image file to load.
protected  Format format
          The format of the image file.
protected  MonoImage image
          The loaded image.
 
Fields inherited from class net.aerith.misao.util.Operation
monitor_set, stopped
 
Fields inherited from class net.aerith.misao.util.OperationObservable
observer_list
 
Constructor Summary
DefaultImageLoader(java.io.File file, Format format)
          Constructs a DefaultImageLoader with a File of the image file.
 
Method Summary
 MonoImage getMonoImage()
          Gets the loaded image.
 void operate()
          Operates.
 boolean ready()
          Returns true if the operation is ready to start.
 
Methods inherited from class net.aerith.misao.util.Operation
addMonitor, isStopped, perform, run, stop
 
Methods inherited from class net.aerith.misao.util.OperationObservable
addObserver, deleteObserver, notifyEnd, notifyFailed, notifyStart, notifySucceeded, notifyWarned
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file
The image file to load.

format

protected Format format
The format of the image file.

image

protected MonoImage image
The loaded image.
Constructor Detail

DefaultImageLoader

public DefaultImageLoader(java.io.File file,
                          Format format)
Constructs a DefaultImageLoader with a File of the image file.
Parameters:
file - the image file to load.
format - the image format. In the case of null, the system automatically selects a proper format based on the file name.
Method Detail

getMonoImage

public MonoImage getMonoImage()
Gets the loaded image.
Returns:
the loaded image.

ready

public boolean ready()
Returns true if the operation is ready to start.
Overrides:
ready in class Operation
Returns:
true if the operation is ready to start.

operate

public void operate()
             throws java.lang.Exception
Operates.
Overrides:
operate in class Operation
Throws:
java.lang.Exception - if an error occurs.