|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.datadosen.jalbum.AlbumBean
public class AlbumBean
JavaBean for creating web based photo albums with thumbnail page and slide pages. Provides the actual album generation functionality of JAlbum. Method comments have only been added where the use isn't obvious.
| Field Summary | |
|---|---|
protected static java.util.Map |
application
|
static java.lang.String |
CUSTOM_ORDER_FILE
|
java.util.HashMap |
evalStats
|
static java.lang.String |
HEADLESS_SETTINGS_NAME
|
static java.lang.String |
LINK_ORIGINALS
|
static java.lang.String |
LINK_ORIGINALS_VIA_SCALED
|
static java.lang.String |
LINK_SCALED
|
static java.lang.String |
ORDER_BY_DATE
|
static java.lang.String |
ORDER_BY_NAME
|
static java.lang.String |
ORDER_BY_SIMPLE_NAME
|
static java.lang.String |
PRODUCT_DISPLAY_VERSION
|
static java.lang.String |
PRODUCT_INTERNAL_VERSION
|
static java.lang.String |
SCALE_FAST
|
static java.lang.String |
SCALE_MEDIUM
|
static java.lang.String |
SCALE_SMOOTH
|
java.io.File |
srcResDir
|
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AlbumBean()
|
|
| Method Summary | |
|---|---|
void |
addAlbumBeanListener(AlbumBeanListener l)
|
void |
addFilter(JAFilter filter)
Add an image filter to the image process chain so it affects both closeups and thumbnails |
boolean |
addFilter(JAFilter filter,
int stage)
Add an image filter to the image process chain at the specified stage |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
AlbumBean |
clone()
Make a shallow copy of this object Note: It is not guaranteed that all member variables are separate or copied, just simple properties |
int |
countFiles(java.io.File dir)
Recursively figure out how many files to process in total v3.5 made public as a convenience |
java.util.Iterator |
filterIterator(int stage)
|
protected void |
fireErrorOccured(java.lang.Throwable t,
java.io.File f)
|
protected void |
fireImageProcessingFinished(AlbumBeanEvent e)
|
protected void |
fireImageProcessingStarted(AlbumBeanEvent e)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Support for reporting bound property changes for Object properties. |
java.lang.String |
getAccountProfileName()
|
java.lang.String |
getCharacterEncoding()
Deprecated. Use getTextEncoding |
java.lang.String |
getCloseupDirectory()
|
java.lang.String |
getCloseupPrefix()
|
int |
getCols()
|
int |
getCpuCores()
Renamed from getNThreads in order to default to max number of cpu cores and ignore previously conservative settings store in Jalbum preferences now that our image scaling is far more memory conservative |
java.util.Comparator |
getCustomImageOrdering()
|
java.lang.String |
getDateFormat()
|
java.text.DateFormat |
getDateFormatAsObject()
|
java.lang.String |
getDirectory()
|
java.lang.String |
getIgnorePattern()
|
java.awt.Color |
getImageBackgroundColor()
Jalbum will use the background color when generating JPEG images from translusent images |
java.lang.String |
getImageLinking()
|
java.lang.String |
getImageOrdering()
|
java.lang.String |
getImageSize()
|
java.lang.String |
getIncludePattern()
|
java.lang.String |
getIndexPageName()
|
java.io.File |
getInterpretedOutputDirectory()
|
java.lang.String |
getOutputDirectory()
|
java.lang.String |
getPageExtension()
|
int |
getQualityPercent()
|
java.lang.String |
getRemoteDirectory()
Might be moved out of AlbumBean |
java.lang.String |
getResourceDirectory()
JAlbum 4.5 additions |
int |
getRows()
|
java.lang.String |
getScalingMethod()
|
int |
getSharpenPercent()
|
java.lang.String |
getSkin()
|
java.util.Map |
getSkinVariables()
|
java.lang.String |
getSlideDirectory()
|
java.lang.String |
getStyle()
|
java.lang.String |
getTextEncoding()
|
java.lang.String |
getThumbnailDirectory()
|
java.lang.String |
getThumbnailPrefix()
|
java.lang.String |
getThumbSize()
|
java.lang.String |
getUserName()
|
java.util.Map |
getUserVariables()
|
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
Ignore. |
void |
init()
|
boolean |
isAppendImages()
|
boolean |
isClassicReaders()
|
boolean |
isCopyOriginals()
|
boolean |
isDirectoriesFirst()
|
boolean |
isExcludeByDefault()
|
boolean |
isExifImageDescription()
|
boolean |
isExifUserComment()
|
boolean |
isHardwareScaling()
Since 8.3.5 |
boolean |
isHighQualityThumbs()
|
boolean |
isIncludeDirectories()
|
boolean |
isIptcCaption()
|
boolean |
isJpegComment()
|
boolean |
isKeepMetaData()
|
boolean |
isMediaRSS()
|
boolean |
isMetaData()
|
boolean |
isProgressiveMode()
|
boolean |
isReverseOrder()
|
boolean |
isSameDirectory()
|
boolean |
isSlides()
|
boolean |
isSubdirs()
|
boolean |
isSuppressIEWarnings()
|
boolean |
isTextFileComment()
|
boolean |
isUpdatedDirsOnly()
|
boolean |
isUrlEncode()
|
boolean |
isUseThumbForFolderIcon()
|
boolean |
isWidgetInjection()
|
boolean |
isWriteUTF8()
|
static java.lang.String |
jpegName(java.lang.String name)
Make sure file name ends with .jpg |
java.io.File[] |
listFiles(java.io.File dir,
boolean includeDirs,
java.io.File outputDir)
List valid albumfiles and subdirectories of a directory The list is ordered according to the project settings |
void |
makeAlbum()
Generate a web album. |
void |
processBeanShellFile(java.io.File f)
|
java.lang.String |
processTemplate(java.lang.String template)
Replace variables and perform template parsing Use the variables that are currently visible for the interpreter. |
void |
processTemplateFile(java.io.File source,
java.io.File dest)
Replace variables and perform template parsing as a file is being copied Use the variables that are currently visible for the interpreter. |
void |
processTemplateFile(java.io.File source,
java.io.File dest,
java.util.Map vars)
Replace variables and perform template parsing as a file is being copied Warning: This method has side effects of affecting the variables available in the current scope. |
void |
registerVariables(java.io.File file,
java.io.File outputDir)
We store a Map of file->Map pairs where the Map contains metadata like imageWidth, imageHeight and EXIF data (if present) |
void |
removeAlbumBeanListener(AlbumBeanListener l)
|
void |
removeAllFilters()
Remove all image filters from the image process chain |
boolean |
removeFilter(JAFilter filter,
int stage)
Remove an image filter from the image process chain at the specified stage |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setAccountProfileName(java.lang.String newAccountProfileName)
|
void |
setAppendImages(boolean newAppendImages)
Control if all image files are to be rescaled or only new files. |
void |
setCharacterEncoding(java.lang.String newCharacterEncoding)
Deprecated. Use setTextEncoding |
void |
setClassicReaders(boolean newClassicReaders)
Use Sun's old, but faster image readers for JPEG, GIF and PNG file types instead of ImageIO readers |
void |
setCols(int newCols)
|
void |
setCopyOriginals(boolean newCopyOriginals)
|
void |
setCpuCores(int cpuCores)
Machines with multiple CPUs can utilize this method to cut down processing time Values higher than number of available processors are ignored. |
void |
setCustomImageOrdering(java.util.Comparator fileComparator)
Select custom image/file ordering by installing a custom Comparator object. |
void |
setDateFormat(java.lang.String newDateFormat)
|
void |
setDirectoriesFirst(boolean newDirectoriesFirst)
|
void |
setDirectory(java.lang.String newDirectory)
Set image directory. |
void |
setExcludeByDefault(boolean newExcludeByDefault)
Automatically exclude images recently added to the image directory |
void |
setExifImageDescription(boolean newexifImageDescription)
|
void |
setExifUserComment(boolean newexifUserComment)
|
void |
setHardwareScaling(boolean hardwareScaling)
Attempt to use hardware accelerated image scaling. |
void |
setHighQualityThumbs(boolean newhighQualityThumbs)
|
void |
setIgnorePattern(java.lang.String ignorePattern)
|
void |
setImageBackgroundColor(java.awt.Color backgroundColor)
Jalbum will use the background color when generating JPEG images from translusent images |
void |
setImageLinking(java.lang.String newImageLinking)
Set image linking to one of the LINK_ string constants defined in this class |
void |
setImageOrdering(java.lang.String newImageOrdering)
Set image ordering to one of the ORDER_ string constants defined in this class Will cancel any custom image ordering set by the setCustomImageOrdering call |
void |
setImageSize(java.lang.String newImageSize)
|
void |
setIncludeDirectories(boolean newIncludeDirectories)
|
void |
setIncludePattern(java.lang.String includePattern)
Include only files matching includePattern |
void |
setIndexPageName(java.lang.String newIndexPageName)
|
void |
setIptcCaption(boolean newiptcCaption)
|
void |
setJpegComment(boolean newjpegComment)
|
void |
setKeepMetaData(boolean newKeepMetaData)
Keep camera metadata in generated files |
void |
setLimit(int limit)
Limit number of album objects that are to be processed 0 = unlimited Use of this method by 3:rd party developers is discouraged |
void |
setMediaRSS(boolean newMediaRSS)
Add media RSS support to published albums |
void |
setMetaData(boolean newMetaData)
|
void |
setOutputDirectory(java.lang.String newOutputDirectory)
|
void |
setPageExtension(java.lang.String newPageExtension)
|
void |
setProgressiveMode(boolean newProgressiveMode)
Write images with progressive encoding |
void |
setProperties(java.util.Properties props)
Convenience method that calls the relevant setter methods on this bean depending on the passed properties. |
void |
setQualityPercent(int newQualityPercent)
|
void |
setRemoteDirectory(java.lang.String newRemoteDirectory)
Might be moved out of AlbumBean |
void |
setReverseOrder(boolean newReverseOrder)
|
void |
setRows(int newRows)
|
void |
setSameDirectory(boolean newSameDirectory)
|
void |
setScalingMethod(java.lang.String scalingMethod)
|
void |
setSharpenPercent(int newSharpenPercent)
|
void |
setSkin(java.lang.String newSkin)
|
void |
setSkinVariables(java.util.Map newSkinVariables)
The new way of passing variables from skin user interfaces to the AlbumBean (Previously the user variables mechanism was used which bloated the user variables) |
void |
setSlides(boolean newSlides)
|
void |
setStyle(java.lang.String newStyle)
|
void |
setSubdirs(boolean newSubdirs)
|
void |
setSuppressIEWarnings(boolean supressIEWarnings)
Makes Jalbum inject a small comment before of generated pages. |
void |
setTextEncoding(java.lang.String newTextEncoding)
|
void |
setTextFileComment(boolean newtextFileComment)
JAlbum 4.6 additions |
void |
setThumbSize(java.lang.String newThumbSize)
|
void |
setUpdatedDirsOnly(boolean newUpdatedDirsOnly)
|
void |
setUrlEncode(boolean newUrlEncode)
|
void |
setUserName(java.lang.String userName)
|
void |
setUserVariables(java.util.Map newUserVariables)
|
void |
setUseThumbForFolderIcon(boolean newUseThumbForFolderIcon)
Replace standard folder icon with a thumbnail from one of the files in the image directory |
void |
setUsing(java.lang.Object using)
|
void |
setWidgetInjection(boolean newWidgetInjection)
Include widget injection to published albums |
void |
setWriteUTF8(boolean newWriteUTF8)
|
void |
smartMakeAlbum()
Make album but let Jalbum decide whether to make all or changes |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PRODUCT_DISPLAY_VERSION
public static final java.lang.String PRODUCT_INTERNAL_VERSION
public static final java.lang.String HEADLESS_SETTINGS_NAME
public static final java.lang.String ORDER_BY_DATE
public static final java.lang.String ORDER_BY_NAME
public static final java.lang.String ORDER_BY_SIMPLE_NAME
public static final java.lang.String CUSTOM_ORDER_FILE
public static final java.lang.String LINK_ORIGINALS
public static final java.lang.String LINK_ORIGINALS_VIA_SCALED
public static final java.lang.String LINK_SCALED
public static final java.lang.String SCALE_SMOOTH
public static final java.lang.String SCALE_MEDIUM
public static final java.lang.String SCALE_FAST
protected static final java.util.Map application
public java.util.HashMap evalStats
public java.io.File srcResDir
| Constructor Detail |
|---|
public AlbumBean()
| Method Detail |
|---|
public AlbumBean clone()
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void setDirectory(java.lang.String newDirectory)
setDirectory in interface AlbumEnginenewDirectory - public java.lang.String getDirectory()
getDirectory in interface AlbumEngine
public void setThumbSize(java.lang.String newThumbSize)
throws ParameterException
ParameterExceptionpublic java.lang.String getThumbSize()
public void setImageSize(java.lang.String newImageSize)
throws ParameterException
ParameterExceptionpublic java.lang.String getImageSize()
public void setCols(int newCols)
public int getCols()
public void setQualityPercent(int newQualityPercent)
public int getQualityPercent()
public void setSharpenPercent(int newSharpenPercent)
public int getSharpenPercent()
public void setProgressiveMode(boolean newProgressiveMode)
public boolean isProgressiveMode()
public void setClassicReaders(boolean newClassicReaders)
public boolean isClassicReaders()
public void setUseThumbForFolderIcon(boolean newUseThumbForFolderIcon)
public boolean isUseThumbForFolderIcon()
public void setCpuCores(int cpuCores)
public int getCpuCores()
public void setSlides(boolean newSlides)
public boolean isSlides()
public void setDateFormat(java.lang.String newDateFormat)
public java.lang.String getDateFormat()
public java.text.DateFormat getDateFormatAsObject()
public java.awt.Color getImageBackgroundColor()
public void setImageBackgroundColor(java.awt.Color backgroundColor)
public void processTemplateFile(java.io.File source,
java.io.File dest)
throws java.io.IOException,
ElementException
java.io.IOException
ElementException
public java.lang.String processTemplate(java.lang.String template)
throws ElementException
ElementException
public void processTemplateFile(java.io.File source,
java.io.File dest,
java.util.Map vars)
throws java.io.IOException,
ElementException
java.io.IOException
ElementException
public java.io.File[] listFiles(java.io.File dir,
boolean includeDirs,
java.io.File outputDir)
throws java.io.IOException
includeDirs - Include directories?outputDir - Output directory or null if not include directories
java.io.IOException
public void registerVariables(java.io.File file,
java.io.File outputDir)
throws java.io.IOException
java.io.IOException
public void processBeanShellFile(java.io.File f)
throws ElementException,
java.io.IOException
ElementException
java.io.IOException
public int countFiles(java.io.File dir)
throws java.io.IOException
java.io.IOException
public void init()
throws ParameterException,
java.io.IOException,
OperationAbortedException,
ElementException
ParameterException
java.io.IOException
OperationAbortedException
ElementException
public void makeAlbum()
throws java.lang.IllegalArgumentException,
java.io.IOException,
OperationAbortedException,
ElementException
makeAlbum in interface AlbumEnginejava.lang.IllegalArgumentException
java.io.IOException
OperationAbortedException
ElementException
public void smartMakeAlbum()
throws java.lang.IllegalArgumentException,
java.io.IOException,
OperationAbortedException,
ElementException
smartMakeAlbum in interface AlbumEnginejava.lang.IllegalArgumentException
java.io.IOException
OperationAbortedException
ElementException
public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
imageUpdate in interface java.awt.image.ImageObserverpublic static java.lang.String jpegName(java.lang.String name)
public void removeAlbumBeanListener(AlbumBeanListener l)
removeAlbumBeanListener in interface AlbumEnginepublic void addAlbumBeanListener(AlbumBeanListener l)
addAlbumBeanListener in interface AlbumEnginepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
If listener is null, no exception is thrown and no action is performed.
listener - the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener),
#getPropertyChangeListeners,
#removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
protected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
propertyName - the property whose value has changedoldValue - the property's previous valuenewValue - the property's new valuepublic void addFilter(JAFilter filter)
public java.util.Iterator filterIterator(int stage)
public boolean addFilter(JAFilter filter,
int stage)
public boolean removeFilter(JAFilter filter,
int stage)
public void removeAllFilters()
protected void fireImageProcessingStarted(AlbumBeanEvent e)
protected void fireImageProcessingFinished(AlbumBeanEvent e)
protected void fireErrorOccured(java.lang.Throwable t,
java.io.File f)
public void setSubdirs(boolean newSubdirs)
public boolean isSubdirs()
public void setAppendImages(boolean newAppendImages)
setAppendImages in interface AlbumEnginepublic boolean isAppendImages()
isAppendImages in interface AlbumEnginepublic void setUpdatedDirsOnly(boolean newUpdatedDirsOnly)
public boolean isUpdatedDirsOnly()
public void setExcludeByDefault(boolean newExcludeByDefault)
public boolean isExcludeByDefault()
public void setKeepMetaData(boolean newKeepMetaData)
public boolean isKeepMetaData()
public void setStyle(java.lang.String newStyle)
setStyle in interface AlbumEnginepublic java.lang.String getStyle()
getStyle in interface AlbumEnginepublic void setIndexPageName(java.lang.String newIndexPageName)
public java.lang.String getIndexPageName()
public void setUrlEncode(boolean newUrlEncode)
public boolean isUrlEncode()
public void setImageOrdering(java.lang.String newImageOrdering)
public java.lang.String getImageOrdering()
public void setCustomImageOrdering(java.util.Comparator fileComparator)
fileComparator - Comparator object that is passed two File objectspublic java.util.Comparator getCustomImageOrdering()
public void setMediaRSS(boolean newMediaRSS)
newMediaRSS - booleanpublic boolean isMediaRSS()
public void setWidgetInjection(boolean newWidgetInjection)
newWidgetInjection - public boolean isWidgetInjection()
public boolean isSuppressIEWarnings()
public void setSuppressIEWarnings(boolean supressIEWarnings)
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
public void setMetaData(boolean newMetaData)
public boolean isMetaData()
public void setSameDirectory(boolean newSameDirectory)
public boolean isSameDirectory()
public void setOutputDirectory(java.lang.String newOutputDirectory)
setOutputDirectory in interface AlbumEnginepublic java.lang.String getOutputDirectory()
getOutputDirectory in interface AlbumEnginepublic java.io.File getInterpretedOutputDirectory()
public void setRows(int newRows)
public int getRows()
public void setLimit(int limit)
setLimit in interface AlbumEnginepublic void setImageLinking(java.lang.String newImageLinking)
public java.lang.String getImageLinking()
public void setCopyOriginals(boolean newCopyOriginals)
public boolean isCopyOriginals()
public void setSkin(java.lang.String newSkin)
setSkin in interface AlbumEnginepublic java.lang.String getSkin()
getSkin in interface AlbumEnginepublic void setPageExtension(java.lang.String newPageExtension)
public java.lang.String getPageExtension()
public java.lang.String getResourceDirectory()
public java.lang.String getThumbnailDirectory()
public java.lang.String getCloseupDirectory()
public java.lang.String getSlideDirectory()
public java.lang.String getThumbnailPrefix()
public java.lang.String getCloseupPrefix()
public void setTextFileComment(boolean newtextFileComment)
public boolean isTextFileComment()
public void setJpegComment(boolean newjpegComment)
public boolean isJpegComment()
public void setIptcCaption(boolean newiptcCaption)
public boolean isIptcCaption()
public void setExifUserComment(boolean newexifUserComment)
public boolean isExifUserComment()
public void setHighQualityThumbs(boolean newhighQualityThumbs)
public boolean isHighQualityThumbs()
public void setExifImageDescription(boolean newexifImageDescription)
public boolean isExifImageDescription()
public void setIncludeDirectories(boolean newIncludeDirectories)
public boolean isIncludeDirectories()
public void setUserVariables(java.util.Map newUserVariables)
setUserVariables in interface AlbumEnginepublic void setSkinVariables(java.util.Map newSkinVariables)
setSkinVariables in interface AlbumEnginepublic void setProperties(java.util.Properties props)
setProperties in interface AlbumEnginepublic java.util.Map getUserVariables()
getUserVariables in interface AlbumEnginepublic java.util.Map getSkinVariables()
getSkinVariables in interface AlbumEnginepublic void setRemoteDirectory(java.lang.String newRemoteDirectory)
public java.lang.String getRemoteDirectory()
public void setAccountProfileName(java.lang.String newAccountProfileName)
public java.lang.String getAccountProfileName()
public void setReverseOrder(boolean newReverseOrder)
public boolean isReverseOrder()
public void setCharacterEncoding(java.lang.String newCharacterEncoding)
public java.lang.String getCharacterEncoding()
public void setTextEncoding(java.lang.String newTextEncoding)
public java.lang.String getTextEncoding()
public void setWriteUTF8(boolean newWriteUTF8)
public boolean isWriteUTF8()
public void setDirectoriesFirst(boolean newDirectoriesFirst)
public boolean isDirectoriesFirst()
public void setIgnorePattern(java.lang.String ignorePattern)
public java.lang.String getIgnorePattern()
public void setIncludePattern(java.lang.String includePattern)
public java.lang.String getIncludePattern()
public void setUsing(java.lang.Object using)
public java.lang.String getScalingMethod()
public void setScalingMethod(java.lang.String scalingMethod)
public boolean isHardwareScaling()
public void setHardwareScaling(boolean hardwareScaling)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||