fr.opensagres.xdocreport.document.images
Interface IImageProvider

All Known Implementing Classes:
AbstractImageProvider, AbstractInputStreamImageProvider, ByteArrayImageProvider, ClassPathImageProvider, FileImageProvider, JSONImage

public interface IImageProvider

Image provider is used as "context" to manage dynamic images in the document source (odt, docx...).


Method Summary
 NullImageBehaviour getBehaviour()
          Returns the behaviour to use when the stream of the image is null.
 Float getHeight()
          Returns the height image with pixel unit.
 ImageFormat getImageFormat()
          Returns the image format.
 Float getWidth()
          Returns the width image with pixel unit.
 boolean isResize()
          Returns true if call of setWidth(Float) must compute image height with ratio or if call of setHeight(Float) must compute image with with ratio and false otherwise.
 boolean isUseImageSize()
          Returns true if image size comes from the image and false otherwise.
 boolean isValid()
          Returns true if the image provider is valid (ex : input stream not null) and false otherwise.
 void setBehaviour(NullImageBehaviour behaviour)
          Set the behaviour to use when the stream of the image is null.
 void setHeight(Float height)
          Set the height image with pixel unit.
 void setResize(boolean resize)
          Set true if call of setWidth(Float) must compute image height with ratio or if call of setHeight(Float) must compute image with with ratio and false otherwise.
 void setSize(Float width, Float height)
          Set the width and height image with pixel unit.
 void setUseImageSize(boolean useImageSize)
          Set true if image size comes from the image and false otherwise.
 void setWidth(Float width)
          Set the width image with pixel unit.
 void write(OutputStream outputStream)
          Write the binary data of the image in the given output stream.
 

Method Detail

write

void write(OutputStream outputStream)
           throws IOException
Write the binary data of the image in the given output stream.

Parameters:
outputStream -
Throws:
IOException

getImageFormat

ImageFormat getImageFormat()
Returns the image format.

Returns:

getWidth

Float getWidth()
               throws IOException
Returns the width image with pixel unit.

Returns:
Throws:
IOException

setWidth

void setWidth(Float width)
Set the width image with pixel unit.

Parameters:
width -

getHeight

Float getHeight()
                throws IOException
Returns the height image with pixel unit.

Returns:
Throws:
IOException

setHeight

void setHeight(Float height)
Set the height image with pixel unit.

Parameters:
height -

setSize

void setSize(Float width,
             Float height)
Set the width and height image with pixel unit.

Parameters:
width -
height -

isUseImageSize

boolean isUseImageSize()
Returns true if image size comes from the image and false otherwise.

Returns:

setUseImageSize

void setUseImageSize(boolean useImageSize)
Set true if image size comes from the image and false otherwise.

Parameters:
useImageSize -

setResize

void setResize(boolean resize)
Set true if call of setWidth(Float) must compute image height with ratio or if call of setHeight(Float) must compute image with with ratio and false otherwise.

Parameters:
resize -

isResize

boolean isResize()
Returns true if call of setWidth(Float) must compute image height with ratio or if call of setHeight(Float) must compute image with with ratio and false otherwise.

Returns:

getBehaviour

NullImageBehaviour getBehaviour()
Returns the behaviour to use when the stream of the image is null.

Returns:

setBehaviour

void setBehaviour(NullImageBehaviour behaviour)
Set the behaviour to use when the stream of the image is null.

Parameters:
behaviour -

isValid

boolean isValid()
Returns true if the image provider is valid (ex : input stream not null) and false otherwise.

Returns:


Copyright © 2013. All rights reserved.