public abstract class AbstractImageProvider extends java.lang.Object implements IImageProvider
Constructor and Description |
---|
AbstractImageProvider(boolean useImageSize) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
doIsValid() |
NullImageBehaviour |
getBehaviour()
Returns the behaviour to use when the stream of the image is null.
|
java.lang.Float |
getHeight(java.lang.Float defaultHeight)
Returns the height image with pixel unit.
|
IImageInfo |
getImageInfo()
Returns image info of the current image content.
|
java.lang.Float |
getWidth(java.lang.Float defaultWidth)
Returns the width image with pixel unit.
|
boolean |
isResize()
Returns true if call of
IImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.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.
|
protected abstract IImageInfo |
loadImageInfo()
Load image info.
|
void |
resetImageInfo()
Reset image info.
|
void |
setBehaviour(NullImageBehaviour behaviour)
Set the behaviour to use when the stream of the image is null.
|
void |
setHeight(java.lang.Float height)
Set the height image with pixel unit.
|
void |
setResize(boolean resize)
Set true if call of
IImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.setHeight(Float) must compute image with with ratio and false otherwise. |
void |
setSize(java.lang.Float width,
java.lang.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(java.lang.Float width)
Set the width image with pixel unit.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImageFormat, write
public boolean isUseImageSize()
IImageProvider
isUseImageSize
in interface IImageProvider
public void setUseImageSize(boolean useImageSize)
IImageProvider
setUseImageSize
in interface IImageProvider
public java.lang.Float getWidth(java.lang.Float defaultWidth) throws java.io.IOException
IImageProvider
getWidth
in interface IImageProvider
defaultWidth
- as pixeljava.io.IOException
public java.lang.Float getHeight(java.lang.Float defaultHeight) throws java.io.IOException
IImageProvider
getHeight
in interface IImageProvider
defaultHeight
- as pixeljava.io.IOException
public void setWidth(java.lang.Float width)
IImageProvider
setWidth
in interface IImageProvider
public void setHeight(java.lang.Float height)
IImageProvider
setHeight
in interface IImageProvider
public void setSize(java.lang.Float width, java.lang.Float height)
IImageProvider
setSize
in interface IImageProvider
public IImageInfo getImageInfo() throws java.io.IOException
java.io.IOException
public void resetImageInfo()
public void setResize(boolean resize)
IImageProvider
IImageProvider.setWidth(Float)
must compute image height with ratio or if call of
IImageProvider.setHeight(Float)
must compute image with with ratio and false otherwise.setResize
in interface IImageProvider
public boolean isResize()
IImageProvider
IImageProvider.setWidth(Float)
must compute image height with ratio or if call of
IImageProvider.setHeight(Float)
must compute image with with ratio and false otherwise.isResize
in interface IImageProvider
protected abstract IImageInfo loadImageInfo() throws java.io.IOException
java.io.IOException
public NullImageBehaviour getBehaviour()
IImageProvider
getBehaviour
in interface IImageProvider
public void setBehaviour(NullImageBehaviour behaviour)
IImageProvider
setBehaviour
in interface IImageProvider
public boolean isValid()
IImageProvider
isValid
in interface IImageProvider
protected abstract boolean doIsValid()
Copyright © 2019. All Rights Reserved.