|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.image.loader.ImageInfo
public class ImageInfo
Represents an image that may not have been fully loaded. Usually, the loading only goes as far as necessary to know the intrinsic size of the image. The image will only fully loaded later when the image needs to be presented in a particular format so the consuming component can actually process it. The "preloading" is done so a layout engine can work with the image without having to fully load it (in memory).
Field Summary | |
---|---|
static java.lang.Object |
HAS_MORE_IMAGES
Key to register information about additional (sub-)images in the image file after the selected one. |
static java.lang.Object |
ORIGINAL_IMAGE
Key to register the "original object" among the custom objects of an ImageInfo instance. |
Constructor Summary | |
---|---|
ImageInfo(java.lang.String originalURI,
java.lang.String mimeType)
Main constructor. |
Method Summary | |
---|---|
java.util.Map |
getCustomObjects()
Returns a Map of custom objects associated with this instance. |
java.lang.String |
getMimeType()
Returns the image's MIME type. |
Image |
getOriginalImage()
Returns the original Image instance if such an Image instance is created while building this ImageInfo object. |
java.lang.String |
getOriginalURI()
Returns the original URI of the image. |
ImageSize |
getSize()
Returns the image's intrinsic size. |
void |
setSize(ImageSize size)
Sets the image's intrinsic size. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object ORIGINAL_IMAGE
getOriginalImage()
public static final java.lang.Object HAS_MORE_IMAGES
Boolean.TRUE
or Boolean.FALSE
. A value of TRUE indicates that there are
more subimages available but the exact number of additional images has not been determined
for performance reasons.
Constructor Detail |
---|
public ImageInfo(java.lang.String originalURI, java.lang.String mimeType)
originalURI
- the original URI that was specified by the user (not the resolved URI!)mimeType
- the MIME type of the imageMethod Detail |
---|
public java.lang.String getOriginalURI()
public java.lang.String getMimeType()
public ImageSize getSize()
public void setSize(ImageSize size)
size
- the sizepublic java.util.Map getCustomObjects()
public Image getOriginalImage()
This method is short for: (Image)this.customObjects.get(ORIGINAL_IMAGE);
ORIGINAL_IMAGE
public java.lang.String toString()
toString
in class java.lang.Object
|
xmlgraphics-commons 1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |