|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary java.util.Hashtable java.util.Properties net.sf.jomic.tools.BasicSettings net.sf.jomic.comic.Conversion
public class Conversion
Conversion describing how to convert a comic and/or images in it. To actually convert something,
you need a ConvertComicTask
.
ConversionBean
,
ConvertComicTask
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
COMIC_FORMAT_CBZ
|
static java.lang.String |
COMIC_FORMAT_PDF
|
static java.lang.String |
IMAGE_FORMAT_JFIF
|
static java.lang.String |
IMAGE_FORMAT_PNG
|
static java.lang.String |
IMAGE_FORMAT_PRESERVE
|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
Conversion()
|
|
Conversion(java.lang.String newComicFormat)
|
Method Summary | |
---|---|
void |
checkValidComicFileFormat(java.lang.String supposedFileFormat)
|
void |
checkValidImageFileFormat(java.lang.String supposedFileFormat)
|
java.lang.String |
getComicFormat()
|
java.lang.String |
getComicFormatSuffix()
Get the preferred file suffix for a comic according to getComicFormat()
(without a leading "."). |
java.lang.String |
getImageFormat()
|
java.lang.String |
getImageFormatName(java.lang.String sourceImageFormatName)
Get target image format name taking in account the original format of the source image (in case getImageFormat() is IMAGE_FORMAT_PRESERVE ) or the format
selected by the user. |
int |
getMaxImageHeight()
|
int |
getMaxImageWidth()
|
int |
getMaxThumbHeight()
|
int |
getMaxThumbWidth()
|
java.awt.image.RenderedImage |
getTrimmed(java.awt.image.RenderedImage image)
Yield image trimmed to maximum size. |
boolean |
isAddable(ImageInfo imageInfo)
|
boolean |
isAddable(java.lang.String imageFormat,
java.awt.Dimension imageSize)
Yield true if file should be added to comic archives. |
boolean |
isAddOnlyImages()
|
boolean |
isExcludeThumbPages()
|
boolean |
isLimitImageSize()
|
boolean |
needsTrim(java.awt.Dimension imageSize)
Yield true if the image with size imageSize is bigger than the
conversion allows (provided that isLimitImageSize actually is enabled). |
boolean |
needsTrim(java.io.File imageFile)
Yield true if the image in imageFile is bigger than the conversion
allows (provided that isLimitImageSize actually is enabled). |
void |
setAddOnlyImages(boolean newValue)
|
void |
setComicFormat(java.lang.String newFileFormat)
Set the format of the target comic. |
void |
setExcludeThumbPages(boolean newValue)
|
void |
setImageFormat(java.lang.String newImageFormat)
Set the fomat of the images in the target comic. |
void |
setLimitImageSize(boolean newValue)
|
void |
setMaxImageHeight(int maxImageHeight)
|
void |
setMaxImageWidth(int maxImageWidth)
|
void |
setMaxThumbHeight(int maxThumbPageHeight)
|
void |
setMaxThumbWidth(int maxThumbPageWidth)
|
Methods inherited from class java.util.Properties |
---|
list, list, load, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMIC_FORMAT_CBZ
public static final java.lang.String COMIC_FORMAT_PDF
public static final java.lang.String IMAGE_FORMAT_JFIF
public static final java.lang.String IMAGE_FORMAT_PNG
public static final java.lang.String IMAGE_FORMAT_PRESERVE
Constructor Detail |
---|
public Conversion()
public Conversion(java.lang.String newComicFormat)
Method Detail |
---|
public void setAddOnlyImages(boolean newValue)
public void setComicFormat(java.lang.String newFileFormat)
newFileFormat
- COMIC_FORMAT_CBZ or COMIC_FORMAT_PDFpublic void setExcludeThumbPages(boolean newValue)
public void setImageFormat(java.lang.String newImageFormat)
newImageFormat
- IMAGE_FORMAT_JFIF, IMAGE_FORMAT_PNG, or IMAGE_FORMAT_PRESERVEpublic void setLimitImageSize(boolean newValue)
public void setMaxImageHeight(int maxImageHeight)
public void setMaxImageWidth(int maxImageWidth)
public void setMaxThumbHeight(int maxThumbPageHeight)
public void setMaxThumbWidth(int maxThumbPageWidth)
public java.lang.String getComicFormat()
public java.lang.String getComicFormatSuffix()
getComicFormat()
(without a leading ".").
getComicFormat()
public java.lang.String getImageFormat()
public java.lang.String getImageFormatName(java.lang.String sourceImageFormatName)
getImageFormat()
is IMAGE_FORMAT_PRESERVE
) or the format
selected by the user.
public int getMaxImageHeight()
public int getMaxImageWidth()
public int getMaxThumbHeight()
public int getMaxThumbWidth()
public java.awt.image.RenderedImage getTrimmed(java.awt.image.RenderedImage image)
getMaxImageHeight()
,
getMaxImageWidth()
,
ImageTools.isLandscape(RenderedImage)
public boolean isAddOnlyImages()
public boolean isAddable(java.lang.String imageFormat, java.awt.Dimension imageSize)
true
if file should be added to comic archives.
public boolean isAddable(ImageInfo imageInfo)
public boolean isExcludeThumbPages()
public boolean isLimitImageSize()
public void checkValidComicFileFormat(java.lang.String supposedFileFormat)
public void checkValidImageFileFormat(java.lang.String supposedFileFormat)
public boolean needsTrim(java.io.File imageFile) throws java.io.IOException
true
if the image in imageFile
is bigger than the conversion
allows (provided that isLimitImageSize
actually is enabled).
java.io.IOException
isLimitImageSize()
public boolean needsTrim(java.awt.Dimension imageSize)
true
if the image with size imageSize
is bigger than the
conversion allows (provided that isLimitImageSize
actually is enabled).
isLimitImageSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |