Package se.datadosen.jalbum
Class AlbumBean
java.lang.Object
se.datadosen.jalbum.AlbumBean
- All Implemented Interfaces:
ImageObserver
,Cloneable
,AlbumEngine
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map
boolean
static final String
static final String
static final String
static final String
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAlbumBeanListener
(AlbumBeanListener listener) void
Add an image filter to the image process chain so it affects both closeups and thumbnailsboolean
Add an image filter to the image process chain at the specified stagevoid
addGlobals
(Map vars, boolean fullPreparation) void
void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) clone()
Make a shallow copy of this object Note: It is not guaranteed that all member variables are separate or copied, just simple propertiesint
countFiles
(File dir) Deprecated.Use JAlbumUtilities.countCategories instead for speed (less disk access) and flexibilityfilterIterator
(int stage) protected void
fireAlbumMakingDone
(boolean success) protected void
fireAlbumMakingStarted
(boolean changes) protected void
fireErrorOccured
(Throwable t, File f) protected void
protected void
protected void
protected void
protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Support for reporting bound property changes for Object properties.void
fireStatus
(String message) Fire status messages during album buildint
int
Internal use onlyint
getCols()
int
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 conservativeKey for text to use for credit linksstatic String
jAlbum will use the background color when generating JPEG images from translusent imagesint
static String
For version handling project filesint
getLimit()
getNotes()
Image format for generated typical images (not the variants)int
int
net.jalbum.jlibraw.RAWImageReadParam
Get default RAW image read parameters used for controlling RAW processingMight be moved out of AlbumBeanJAlbum 4.5 additionsint
getRows()
static Dimension
getScaledDim
(Dimension dim, double scale) int
getScaleForStage
(int stage) int
getSizeForStage
(int stage) getSkin()
getStyle()
getTargetName
(File file) Figure out what should be the final file name for closeup images.getTargetThumbName
(File file) Figure out what should be the final file name for thumbnails images.getTargetThumbName
(File file, String defExt) Get dimension of theme imageint
int
Upload privacy relatedgetWidgetInjectionCode
(String pageType, String rootPath) boolean
imageUpdate
(Image img, int infoflags, int x, int y, int width, int height) Ignore.void
init()
boolean
Since 8.3.5boolean
boolean
boolean
boolean
boolean
boolean
isDirty()
Tell if settings have changed since last album buildboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Force image processing even if source image is smaller than destination and no filters are appliedboolean
boolean
Tell whether closeup images are generated for HiDPI screens (i.e.boolean
Tell whether thumbnails are generated for HiDPI screens (i.e.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSlides()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Upload privacy relatedboolean
boolean
boolean
File[]
Deprecated.Use the new AlbumObject object model instead (currentObject, currentFolder and rootFolder variables).Generate a web album.void
Deprecated.Use processScript(File) insteadvoid
processImage
(AlbumObject ao, File outputDir, Set<String> outputNames, Map<String, CachedFile> thumbsContents, Map<String, CachedFile> slidesContents, AlbumBeanEvent eventObject) void
Process BeanShell or JavaScript filesvoid
processScript
(File f, Bindings vars) Process BeanShell or JavaScript filesprocessSection
(Section sec, Map<String, Object> vars) processSection
(Section sec, Scope vars) Replace variables and perform template parsing using the passed variables.Replace variables and perform template parsing Use the variables that are currently visible for the interpreter.void
processTemplateFile
(File source, File dest) Replace variables and perform template parsing as a file is being copied.void
processTemplateFile
(File source, File dest, 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
processTemplateFile
(File source, Writer writer) Made public in v22.0.4void
registerVariables
(File file, 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 listener) void
void
Remove all image filters from the image process chainboolean
removeFilter
(JAFilter filter, int stage) Remove an image filter from the image process chain at the specified stagevoid
Removes a PropertyChangeListener from the listener list.void
setAcceleratedScaling
(boolean hardwareScaling) Attempt to use hardware accelerated image scaling.void
setAccountProfileName
(String newAccountProfileName) void
setAlbumAddress
(String albumAddress) void
setAlbumHeight
(int albumHeight) void
setAlbumWidth
(int albumWidth) void
setAppendImages
(boolean newAppendImages) Control if all image files are to be rescaled or only new files.void
setChainDirectories
(boolean chain) Deprecated.Use setDictoryChaining() insteadvoid
setClassicReaders
(boolean newClassicReaders) Use Sun's old, but faster image readers for JPEG, GIF and PNG file types instead of ImageIO readersvoid
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
setCreator
(String creator) void
setCreditText
(AlbumBean.CreditText creditText) Set key for text to use for credit linksvoid
setCurrentProject
(AlbumProject currentProject) void
setCustomImageOrdering
(Comparator fileComparator) Select custom image/file ordering by installing a custom Comparator object.void
setDateFormat
(String newDateFormat) void
setDirectoriesFirst
(boolean newDirectoriesFirst) void
setDirectory
(String newDirectory) Set image directory.void
setDirectoryChaining
(DirectoryChaining directoryChaining) Enable sequential traversal of an album tree via nextPage, previousPage, nextIndexPage and previousIndexPagevoid
setDisableColorSubsampling
(boolean disableColorSubsampling) Disable chroma/color subsampling.void
setExcludeBacklinks
(boolean newExcludeBacklinks) void
setExcludeByDefault
(boolean newExcludeByDefault) Automatically exclude images recently added to the image directoryvoid
setExifImageDescription
(boolean newexifImageDescription) void
setExifUserComment
(boolean newexifUserComment) void
setFileNamer
(FileNamer fileNamer) Allows skins with special naming requirements to control how files are namedvoid
setFolderThumbSize
(String folderThumbSize) void
setForceJPEGImages
(boolean forceJPEGImages) Force closeup images to JPEG formatvoid
setForceJPEGThumbs
(boolean forceJPEGThumbs) Force thumbnails to JPEG formatvoid
setForceJPEGWriting
(boolean force) Deprecated.void
setForceProcessing
(boolean forceProcessing) Force image processing even if source image is smaller than destination and no filters are appliedvoid
setGenerateJSON
(boolean generateJSON) Tell whether JSON formatted metadata should be added to albumvoid
setHiDPIImages
(boolean hiDPI) Set whether closeup images are generated for HiDPI screens (i.e.void
setHiDPIThumbs
(boolean hiDPI) Set whether thumbnails are generated for HiDPI screens (i.e.void
setHighQualityThumbs
(boolean newhighQualityThumbs) Control whether to force smooth scaling for thumbnails or rely on the general scaling quality settingvoid
setHomepageAddress
(String homepageAddress) void
setHomepageLinkText
(String homepageLinkText) void
setIgnorePattern
(String ignorePattern) void
setImageBackgroundColor
(Color backgroundColor) jAlbum will use the background color when generating JPEG images from translucent imagesvoid
setImageLinking
(String newImageLinking) Set image linking to one of the LINK_ string constants defined in this classvoid
setImageOrdering
(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 callvoid
setImageSize
(String newImageSize) void
setImageVariants
(String imageVariants) void
setIncludeDirectories
(boolean newIncludeDirectories) void
setIncludePattern
(String includePattern) Include only files matching includePatternvoid
setIndexPageName
(String newIndexPageName) void
setIptcCaption
(boolean newiptcCaption) void
setJpegComment
(boolean newjpegComment) void
setKeepMetaData
(boolean newKeepMetaData) Keep camera metadata in generated filesvoid
setKeepXmpData
(boolean newKeepXmpData) Keep xmp metadata in generated filesvoid
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 discouragedvoid
setMakeThumbs
(boolean makeThumbs) void
setMediaRSS
(boolean newMediaRSS) Add media RSS support to published albumsvoid
setMetaData
(boolean newMetaData) void
Set pProject notes (notes to user of project.void
setNotifyNotes
(boolean notifyNotes) void
setOnMakeStarted
(Runnable onMakeStarted) void
setOutputDirectory
(String newOutputDirectory) void
setOutputFormat
(OutputFormat outputFormat) Set image format for generated typical images (not the variants)void
setOverrideExistingCopyright
(boolean overrideExistingCopyright) void
setPageExtension
(String newPageExtension) void
setPageNamer
(PageNamer pageNamer) Allows skins with special naming requirements to control how index pages and slide pages are namedvoid
setProcessFolderThumbs
(boolean processFolderThumbs) void
setProperties
(Properties props) Convenience method that calls the relevant setter methods on this bean depending on the passed properties.void
setQualityPercent
(int newQualityPercent) void
setQualityPercentWebP
(int qualityPercentWebP) void
setRawParam
(net.jalbum.jlibraw.RAWImageReadParam rawParam) Set default RAW image read parameters used for controlling RAW processingvoid
setReadXmp
(boolean readXmp) When reading comments, give priority to XMP metadata over other metadata sourcesvoid
setRemoteDirectory
(String newRemoteDirectory) Might be moved out of AlbumBeanvoid
setReverseOrder
(boolean newReverseOrder) void
void
setRightsURL
(String rightsURL) void
setRows
(int newRows) void
setScalingMethod
(String scalingMethod) void
setSearchEngineFriendlyNames
(boolean searchEngineFriendlyNames) void
setSharpenPercent
(int newSharpenPercent) void
void
setSkinVariables
(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
setSmoothScalingType
(CustomScaler.Type smoothScalingType) void
void
setSubdirs
(boolean newSubdirs) void
setSuperimposeFilmIcon
(boolean superimposeFilmIcon) Tell if to superimpose a film icon onto the thumbnails of movie filesvoid
setTextEncoding
(String newTextEncoding) void
setTextFileComment
(boolean newtextFileComment) JAlbum 4.6 additionsvoid
setThemeImageDim
(Dimension themeImageDim) Set dimension of theme imagevoid
setThemeImageProcessor
(ThemeImageProcessor themeImageProcessor) Control whether jAlbum should generate folder specific theme images.void
setThemeImageSize
(String themeImageSize) void
setThumbSize
(String newThumbSize) void
setThumbVariants
(String thumbVariants) void
setTitleSource
(TitleSource titleSource) void
setUpdatedDirsOnly
(boolean newUpdatedDirsOnly) void
setUrlEncode
(boolean b) Deprecated.void
setUseCustomVideoSettings
(boolean useCustomVideoSettings) void
setUserName
(String userName) void
setUserVariables
(Map newUserVariables) void
setUseThumbForFolderIcon
(boolean newUseThumbForFolderIcon) Replace standard folder icon with a thumbnail from one of the files in the image directoryvoid
static void
Deprecated.Use setVars(Map variables, ScriptEngine engine)static void
setVars
(Map<String, Object> variables, ScriptEngine engine) Called from JConsoleFrame only.void
setVideoParameters
(Parameters videoParameters) void
setVideoQuality
(int videoQuality) void
setVideoResolution
(VideoResolution videoResolution) void
setVisibleOnProfilePage
(boolean visibleOnProfilePage) Upload privacy relatedvoid
setWebPassword
(String webPassword) Upload privacy relatedvoid
setWidgetInjection
(boolean newWidgetInjection) Include widget injection to published albumsvoid
setWriteUTF8
(boolean newWriteUTF8) Make album but let jAlbum decide whether to make all or changesvoid
Experimental.void
useScaledImagesAsOriginals
(boolean use) Internal use only.
-
Field Details
-
compile
public boolean compile -
PRODUCT_DISPLAY_VERSION
- See Also:
-
PRODUCT_INTERNAL_VERSION
- See Also:
-
HEADLESS_SETTINGS_NAME
- See Also:
-
ORDER_BY_DATE
- See Also:
-
ORDER_BY_ADDED_DATE
- See Also:
-
ORDER_BY_CAMERA_DATE
- See Also:
-
ORDER_BY_NAME
- See Also:
-
ORDER_BY_SIMPLE_NAME
- See Also:
-
LINK_ORIGINALS
- See Also:
-
LINK_ORIGINALS_VIA_SCALED
- See Also:
-
LINK_SCALED
- See Also:
-
SCALE_SMOOTH
- See Also:
-
SCALE_MEDIUM
- See Also:
-
SCALE_FAST
- See Also:
-
MAX_ROWS
public static final int MAX_ROWS- See Also:
-
application
-
evalStats
-
indexAST
-
slideAST
-
skinDir
-
srcResDir
-
-
Constructor Details
-
AlbumBean
public AlbumBean() -
AlbumBean
-
-
Method Details
-
getStopwatch
- Returns:
- Time for last album make
- Since:
- 25
-
setOnMakeStarted
-
getAlbumHeight
public int getAlbumHeight() -
setAlbumHeight
public void setAlbumHeight(int albumHeight) -
getAlbumWidth
public int getAlbumWidth() -
setAlbumWidth
public void setAlbumWidth(int albumWidth) -
isMakeThumbs
public boolean isMakeThumbs() -
setMakeThumbs
public void setMakeThumbs(boolean makeThumbs) -
getThemeImageProcessor
- Returns:
- Currently installed theme image processor or null
- Since:
- 15
-
setThemeImageProcessor
Control whether jAlbum should generate folder specific theme images. Cleared at the start of each album build (before init). Skins wanting theme images generated can pass new ThemeImageProcessor(engine) as argument- Since:
- 15
-
getOutputFormat
Image format for generated typical images (not the variants)- Returns:
- Since:
- 24
-
setOutputFormat
Set image format for generated typical images (not the variants)- Parameters:
outputFormat
-- Since:
- 24
-
getJSONMaker
- Returns:
- JSONMaker instance or null if JSON making is disabled
- Since:
- 18.3
-
getCreator
-
setCreator
-
getRights
-
setRights
-
getRightsURL
-
setRightsURL
-
isOverrideExistingCopyright
public boolean isOverrideExistingCopyright() -
setOverrideExistingCopyright
public void setOverrideExistingCopyright(boolean overrideExistingCopyright) -
getLicenseManager
-
getPageNamer
- Returns:
- the currently installed PageNamer
-
setPageNamer
Allows skins with special naming requirements to control how index pages and slide pages are named- Parameters:
pageNamer
-
-
getFileNamer
- Returns:
- the currently installed FileNamer
-
setFileNamer
Allows skins with special naming requirements to control how files are named- Since:
- 10.3
-
getDisplayVersion
-
getInternalVersion
-
getSkinProperties
- Since:
- 8.7
-
getChainedObjects
- Returns:
- Since:
- 12.2
-
getRawParam
public net.jalbum.jlibraw.RAWImageReadParam getRawParam()Get default RAW image read parameters used for controlling RAW processing- Returns:
- Since:
- 13.1
-
setRawParam
public void setRawParam(net.jalbum.jlibraw.RAWImageReadParam rawParam) Set default RAW image read parameters used for controlling RAW processing- Since:
- 13.1
-
unloadCurrentSkin
Experimental. Don't call- Throws:
IOException
-
clone
Make a shallow copy of this object Note: It is not guaranteed that all member variables are separate or copied, just simple properties -
setDirectory
Set image directory. Mandatory to call before calling makeAlbum() Fires directory PropertyChangeEvent since 8.4- Specified by:
setDirectory
in interfaceAlbumEngine
- Parameters:
newDirectory
-
-
getDirectory
- Specified by:
getDirectory
in interfaceAlbumEngine
- Returns:
-
getCurrentProject
-
setCurrentProject
-
setThumbSize
- Throws:
ParameterException
-
getThumbSize
-
isProcessFolderThumbs
public boolean isProcessFolderThumbs() -
setProcessFolderThumbs
public void setProcessFolderThumbs(boolean processFolderThumbs) -
setFolderThumbSize
- Throws:
ParameterException
-
getFolderThumbSize
-
setImageSize
- Throws:
ParameterException
-
getImageSize
-
getImageVariants
- Returns:
- Additional generated image sizes and types (JSON formatted)
- Since:
- 24
-
setImageVariants
- Parameters:
imageVariants
- json string describing image variants- Since:
- 24
-
getThumbVariants
- Returns:
- Additional generated image sizes and types (JSON formatted)
- Since:
- 24
-
setThumbVariants
- Parameters:
thumbVariants
- Additional generated image sizes and types (JSON formatted)- Since:
- 24
-
getThemeImageDim
Get dimension of theme image- Returns:
- Theme image dimension or null if no theme image used
- Since:
- 15
-
setThemeImageDim
Set dimension of theme image- Parameters:
themeImageDim
- Dimension or null if no theme image to be used- Since:
- 15
-
setThemeImageSize
- Parameters:
themeImageSize
-- Since:
- 16
-
getThemeImageSize
- Returns:
- Since:
- 16
-
getImageDim
- Returns:
- Image bounds as a Dimension
- Since:
- 13.8
-
getThumbDim
- Returns:
- Thumbnail bounds as a Dimension
- Since:
- 13.8
-
setCols
public void setCols(int newCols) -
getCols
public int getCols() -
setQualityPercent
public void setQualityPercent(int newQualityPercent) -
getQualityPercent
public int getQualityPercent() -
getQualityPercentWebP
public int getQualityPercentWebP()- Since:
- 24
-
setQualityPercentWebP
public void setQualityPercentWebP(int qualityPercentWebP) - Parameters:
qualityPercentWebP
-- Since:
- 24
-
isHiDPIThumbs
public boolean isHiDPIThumbs()Tell whether thumbnails are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Returns:
- whether HiDPI thumbnails are used or not
- Since:
- 13.7
-
setHiDPIThumbs
public void setHiDPIThumbs(boolean hiDPI) Set whether thumbnails are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Since:
- 13.7
-
getImageScale
public int getImageScale()- Returns:
- Number of pixels per dot (1/72") (1 for ordinary images, 2 for HiDPI images)
- Since:
- 13.7
-
getScaleForStage
public int getScaleForStage(int stage) -
getSizeForStage
- Parameters:
stage
-- Returns:
- The bounding Dimension for this stage
- Since:
- 26.3
-
getThumbScale
public int getThumbScale()- Returns:
- Number of pixels per dot (1/72") (1 for ordinary images, 2 for HiDPI images)
- Since:
- 13.7
-
setSharpenPercent
public void setSharpenPercent(int newSharpenPercent) -
getSharpenPercent
public int getSharpenPercent() -
isDisableColorSubsampling
public boolean isDisableColorSubsampling() -
setDisableColorSubsampling
public void setDisableColorSubsampling(boolean disableColorSubsampling) Disable chroma/color subsampling. Applies to images written with 90% or higher compression quality- Parameters:
disableColorSubsampling
-- Since:
- 16.3
-
isHiDPIImages
public boolean isHiDPIImages()Tell whether closeup images are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Returns:
- whether HiDPI closeup images are used or not
- Since:
- 13.7
-
setHiDPIImages
public void setHiDPIImages(boolean hiDPI) Set whether closeup images are generated for HiDPI screens (i.e. being delivered twice the size as their stated thumbWidth and thumbHeight dimensions)- Since:
- 13.7
-
useScaledImagesAsOriginals
public void useScaledImagesAsOriginals(boolean use) Internal use only. Don't call -
setClassicReaders
public void setClassicReaders(boolean newClassicReaders) Use Sun's old, but faster image readers for JPEG, GIF and PNG file types instead of ImageIO readers -
isClassicReaders
public boolean isClassicReaders() -
setUseThumbForFolderIcon
public void setUseThumbForFolderIcon(boolean newUseThumbForFolderIcon) Replace standard folder icon with a thumbnail from one of the files in the image directory- Since:
- v6.1
-
isUseThumbForFolderIcon
public boolean isUseThumbForFolderIcon() -
setCpuCores
public 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. Renamed from setNThreads in order to ignore previously set conservative setting in jAlbum preferences. -
getCpuCores
public 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- Returns:
-
setSlides
public void setSlides(boolean newSlides) -
isSlides
public boolean isSlides() -
setDateFormat
-
getDateFormat
-
getDateFormatAsObject
-
getImageInfoFormatter
-
getImageBackgroundColor
jAlbum will use the background color when generating JPEG images from translusent images- Since:
- 8.3.4
-
setImageBackgroundColor
jAlbum will use the background color when generating JPEG images from translucent images- Since:
- 8.3.4
-
processTemplateFile
public void processTemplateFile(File source, File dest) throws IOException, ElementException, ScriptException Replace variables and perform template parsing as a file is being copied. Use the variables that are currently visible for the interpreter.- Throws:
IOException
ElementException
ScriptException
- Since:
- 4.7
-
processTemplateFile
public void processTemplateFile(File source, Writer writer) throws IOException, ElementException, ScriptException Made public in v22.0.4- Parameters:
source
-writer
-- Throws:
IOException
ElementException
ScriptException
-
getASTCache
Internal use only- Returns:
- Since:
- 17.1
-
processTemplate
Replace variables and perform template parsing Use the variables that are currently visible for the interpreter.- Throws:
ElementException
ScriptException
- Since:
- 6.1
-
processSection
Replace variables and perform template parsing using the passed variables.- Parameters:
sec
- Section to processvars
- Variables to process- Throws:
ElementException
ScriptException
- Since:
- 14
-
processSection
public String processSection(Section sec, Map<String, Object> vars) throws ElementException, ScriptException- Throws:
ElementException
ScriptException
-
processTemplateFile
public void processTemplateFile(File source, File dest, Map vars) throws IOException, ElementException, ScriptException 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. Try using the version that doesn't take a Map as parameter -
listFiles
@Deprecated public File[] listFiles(File dir, boolean includeDirs, File outputDir) throws IOException Deprecated.Use the new AlbumObject object model instead (currentObject, currentFolder and rootFolder variables). Doesn't support renamed filesList valid albumfiles and subdirectories of a directory. The list is NO LONGER ordered according to the project settings- Parameters:
includeDirs
- Include directories?outputDir
- Output directory or null if not include directories- Throws:
IOException
-
processImage
public void processImage(AlbumObject ao, File outputDir, Set<String> outputNames, Map<String, CachedFile> thumbsContents, Map<String, CachedFile> slidesContents, AlbumBeanEvent eventObject) -
getJAlbumVersion
For version handling project files- Returns:
- Since:
- 25
-
addGlobals
-
registerVariables
We store a Map of file->Map pairs where the Map contains metadata like imageWidth, imageHeight and EXIF data (if present)- Throws:
IOException
ScriptException
-
processScript
Process BeanShell or JavaScript files- Throws:
IOException
ScriptException
-
processScript
Process BeanShell or JavaScript files- Throws:
IOException
ScriptException
-
processBeanShellFile
Deprecated.Use processScript(File) instead- Throws:
ElementException
IOException
-
countFiles
Deprecated.Use JAlbumUtilities.countCategories instead for speed (less disk access) and flexibilityRecursively figure out how many files to process in total v3.5 made public as a convenience- Throws:
IOException
-
init
-
isDirty
public boolean isDirty()Tell if settings have changed since last album build- Returns:
- Since:
- v12
-
makeAlbum
public MakeResult makeAlbum() throws IllegalArgumentException, IOException, OperationAbortedException, ElementException, ScriptExceptionGenerate a web album. Before calling makeAlbum() you must always call setDirectory() and setOutputDirectory() to set an output- Specified by:
makeAlbum
in interfaceAlbumEngine
- Returns:
- Throws:
IOException
ElementException
IllegalArgumentException
OperationAbortedException
ScriptException
-
smartMakeAlbum
public MakeResult smartMakeAlbum() throws IllegalArgumentException, IOException, OperationAbortedException, ElementException, ScriptExceptionMake album but let jAlbum decide whether to make all or changes- Specified by:
smartMakeAlbum
in interfaceAlbumEngine
- Returns:
- Throws:
IOException
ElementException
IllegalArgumentException
OperationAbortedException
ScriptException
-
isMakingAlbum
public boolean isMakingAlbum()- Returns:
- Since:
- v12
-
imageUpdate
Ignore. Will be moved out of AlbumBean Implements ImageObserver- Specified by:
imageUpdate
in interfaceImageObserver
-
getWidgetInjectionCode
- Parameters:
pageType
-rootPath
-- Returns:
- Since:
- jAlbum 17.1
-
getTargetThumbName
Figure out what should be the final file name for thumbnails images. Unless forced, maps most file types to jpg but png and gif to png- Parameters:
file
-- Returns:
- Since:
- 18.3
-
getTargetThumbName
- Parameters:
file
-defExt
-- Returns:
- Since:
- 23.3
-
getTargetName
Figure out what should be the final file name for closeup images. Unless forced, maps most file types to jpg but png and gif to png- Parameters:
file
-- Returns:
-
getScaledDim
-
removeAlbumBeanListener
- Specified by:
removeAlbumBeanListener
in interfaceAlbumEngine
-
removeAllAlbumBeanListeners
public void removeAllAlbumBeanListeners()- Since:
- 25 For handover to background processing
-
addAlbumBeanListener
- Specified by:
addAlbumBeanListener
in interfaceAlbumEngine
-
addPropertyChangeListener
-
removePropertyChangeListener
Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.If listener is null, no exception is thrown and no action is performed.
- Parameters:
listener
- the PropertyChangeListener to be removed- See Also:
-
addPropertyChangeListener
-
firePropertyChange
Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.- Parameters:
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new value
-
addFilter
Add an image filter to the image process chain so it affects both closeups and thumbnails -
filterIterator
-
addFilter
Add an image filter to the image process chain at the specified stage -
removeFilter
Remove an image filter from the image process chain at the specified stage -
removeAllFilters
public void removeAllFilters()Remove all image filters from the image process chain -
fireStatus
Fire status messages during album build- Parameters:
message
-- Since:
- 27
-
fireFolderProcessingStarted
-
fireFolderProcessingFinished
-
fireImageProcessingStarted
-
fireImageProcessingFinished
-
fireErrorOccured
-
fireAlbumMakingStarted
protected void fireAlbumMakingStarted(boolean changes) -
fireAlbumMakingDone
protected void fireAlbumMakingDone(boolean success) -
setSubdirs
public void setSubdirs(boolean newSubdirs) -
isSubdirs
public boolean isSubdirs() -
setAppendImages
public void setAppendImages(boolean newAppendImages) Control if all image files are to be rescaled or only new files. Setting appendImages to true corresponds to "Make changes" Setting appendImages to false corresponds to "Make all" button.- Specified by:
setAppendImages
in interfaceAlbumEngine
-
isAppendImages
public boolean isAppendImages()- Specified by:
isAppendImages
in interfaceAlbumEngine
-
setUpdatedDirsOnly
public void setUpdatedDirsOnly(boolean newUpdatedDirsOnly) -
isUpdatedDirsOnly
public boolean isUpdatedDirsOnly() -
setExcludeByDefault
public void setExcludeByDefault(boolean newExcludeByDefault) Automatically exclude images recently added to the image directory- Since:
- 6.3
-
isExcludeByDefault
public boolean isExcludeByDefault() -
setKeepMetaData
public void setKeepMetaData(boolean newKeepMetaData) Keep camera metadata in generated files- Since:
- 6.5
-
isKeepMetaData
public boolean isKeepMetaData() -
setKeepXmpData
public void setKeepXmpData(boolean newKeepXmpData) Keep xmp metadata in generated files- Since:
- 10.8
-
isKeepXmpData
public boolean isKeepXmpData() -
getHomepageAddress
- Since:
- 10.8
-
setHomepageAddress
- Since:
- 10.8
-
getHomepageLinkText
- Since:
- 10.8
-
setHomepageLinkText
- Since:
- 10.8
-
setStyle
- Specified by:
setStyle
in interfaceAlbumEngine
-
getStyle
- Specified by:
getStyle
in interfaceAlbumEngine
-
setIndexPageName
-
getIndexPageName
-
isUrlEncode
public boolean isUrlEncode() -
setUrlEncode
Deprecated.Ignored from v17.2. URL encoding is now always on- Parameters:
b
-
-
setImageOrdering
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 -
getImageOrdering
-
setCustomImageOrdering
Select custom image/file ordering by installing a custom Comparator object. It is recommended that this method is called from the init.bsh file of a skin as the JAlbum user interface automatically resets this setting at the start of each album generation, before calling init.bsh. The resetting is done when the ordinary setImageOrdering method is called as the engine is synchronized with the UI.- Parameters:
fileComparator
- Comparator object that is passed two File objects
-
getCustomImageOrdering
-
setMediaRSS
public void setMediaRSS(boolean newMediaRSS) Add media RSS support to published albums- Parameters:
newMediaRSS
- boolean
-
isMediaRSS
public boolean isMediaRSS() -
isGenerateJSON
public boolean isGenerateJSON()- Since:
- 15.4 Tell whether JSON formatted metadata should be added to album
-
setGenerateJSON
public void setGenerateJSON(boolean generateJSON) Tell whether JSON formatted metadata should be added to album- Parameters:
generateJSON
-- Since:
- 15.4
-
getNotes
- Returns:
- Project notes (notes to user of project. Not shown in album)
- Since:
- 16
-
setNotes
Set pProject notes (notes to user of project. Not shown in album)- Parameters:
notes
-- Since:
- 16
-
isNotifyNotes
public boolean isNotifyNotes() -
setNotifyNotes
public void setNotifyNotes(boolean notifyNotes) -
setWidgetInjection
public void setWidgetInjection(boolean newWidgetInjection) Include widget injection to published albums- Parameters:
newWidgetInjection
-
-
isWidgetInjection
public boolean isWidgetInjection() -
setExcludeBacklinks
public void setExcludeBacklinks(boolean newExcludeBacklinks) - Since:
- 8.7
-
isExcludeBacklinks
public boolean isExcludeBacklinks() -
getUserName
-
setUserName
-
setMetaData
public void setMetaData(boolean newMetaData) -
isMetaData
public boolean isMetaData() -
setOutputDirectory
- Specified by:
setOutputDirectory
in interfaceAlbumEngine
-
getOutputDirectory
- Specified by:
getOutputDirectory
in interfaceAlbumEngine
-
getInterpretedOutputDirectory
-
setAlbumAddress
-
getAlbumAddress
-
setRows
public void setRows(int newRows) -
getRows
public int getRows() -
setLimit
public 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- Specified by:
setLimit
in interfaceAlbumEngine
- Since:
- 8.3
-
getLimit
public int getLimit() -
setImageLinking
Set image linking to one of the LINK_ string constants defined in this class -
getImageLinking
-
setCopyOriginals
public void setCopyOriginals(boolean newCopyOriginals) -
isCopyOriginals
public boolean isCopyOriginals() -
getWebPassword
Upload privacy related -
setWebPassword
Upload privacy related -
isVisibleOnProfilePage
public boolean isVisibleOnProfilePage()Upload privacy related -
setVisibleOnProfilePage
public void setVisibleOnProfilePage(boolean visibleOnProfilePage) Upload privacy related -
setSkin
- Specified by:
setSkin
in interfaceAlbumEngine
-
getSkin
- Specified by:
getSkin
in interfaceAlbumEngine
- Returns:
- Currently active skin
-
getLastSkin
- Returns:
- Last active skin
- Since:
- 24
-
setPageExtension
-
getPageExtension
-
getResourceDirectory
JAlbum 4.5 additions -
getThumbnailDirectory
-
getCloseupDirectory
-
getSlideDirectory
-
getThumbnailPrefix
-
getCloseupPrefix
-
setTextFileComment
public void setTextFileComment(boolean newtextFileComment) JAlbum 4.6 additions -
isTextFileComment
public boolean isTextFileComment() -
setReadXmp
public void setReadXmp(boolean readXmp) When reading comments, give priority to XMP metadata over other metadata sources- Parameters:
readXmp
-- Since:
- 10
-
isReadXmp
public boolean isReadXmp() -
setJpegComment
public void setJpegComment(boolean newjpegComment) -
isJpegComment
public boolean isJpegComment() -
setIptcCaption
public void setIptcCaption(boolean newiptcCaption) -
isIptcCaption
public boolean isIptcCaption() -
setExifUserComment
public void setExifUserComment(boolean newexifUserComment) -
isExifUserComment
public boolean isExifUserComment() -
getTitleSource
- Since:
- 9.6
-
setTitleSource
- Since:
- 9.6
-
setHighQualityThumbs
public void setHighQualityThumbs(boolean newhighQualityThumbs) Control whether to force smooth scaling for thumbnails or rely on the general scaling quality setting- Parameters:
newhighQualityThumbs
-
-
isHighQualityThumbs
public boolean isHighQualityThumbs() -
isForceProcessing
public boolean isForceProcessing()Force image processing even if source image is smaller than destination and no filters are applied- Since:
- 17.1
-
setForceProcessing
public void setForceProcessing(boolean forceProcessing) Force image processing even if source image is smaller than destination and no filters are applied- Parameters:
forceProcessing
-- Since:
- 17.1
-
setForceJPEGWriting
Deprecated.Ensure that images and thumbnails are always written as JPEGs (never PNG) Use setForceThumbs and setForceImages. Only here for backwards compatibility- Parameters:
force
-- Since:
- 10.5
-
isForceJPEGThumbs
public boolean isForceJPEGThumbs()- Returns:
- true if thumbnails are forced to JPEG format
- Since:
- 18.3
-
setForceJPEGThumbs
public void setForceJPEGThumbs(boolean forceJPEGThumbs) Force thumbnails to JPEG format- Parameters:
forceJPEGThumbs
-- Since:
- 18.3
-
isForceJPEGImages
public boolean isForceJPEGImages()- Returns:
- true if closeup images are forced to JPEG format
- Since:
- 18.3
-
setForceJPEGImages
public void setForceJPEGImages(boolean forceJPEGImages) Force closeup images to JPEG format- Parameters:
forceJPEGImages
-
-
isSuperimposeFilmIcon
public boolean isSuperimposeFilmIcon()- Since:
- jAlbum 8.12
-
setSuperimposeFilmIcon
public void setSuperimposeFilmIcon(boolean superimposeFilmIcon) Tell if to superimpose a film icon onto the thumbnails of movie files- Since:
- jAlbum 8.12
-
setExifImageDescription
public void setExifImageDescription(boolean newexifImageDescription) -
isExifImageDescription
public boolean isExifImageDescription() -
setIncludeDirectories
public void setIncludeDirectories(boolean newIncludeDirectories) -
isIncludeDirectories
public boolean isIncludeDirectories() -
setUserVariables
- Specified by:
setUserVariables
in interfaceAlbumEngine
-
getVideoProcessor
-
getVideoParameters
-
setVideoParameters
-
isUseCustomVideoSettings
public boolean isUseCustomVideoSettings() -
setUseCustomVideoSettings
public void setUseCustomVideoSettings(boolean useCustomVideoSettings) -
getVideoQuality
public int getVideoQuality() -
setVideoQuality
public void setVideoQuality(int videoQuality) -
getVideoResolution
-
setVideoResolution
-
setSkinVariables
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)- Specified by:
setSkinVariables
in interfaceAlbumEngine
- Since:
- 5.2
-
setProperties
Convenience method that calls the relevant setter methods on this bean depending on the passed properties. Skin and user variables, prefixed with skin. and user. will be installed as skin- and user variables- Specified by:
setProperties
in interfaceAlbumEngine
- Since:
- 8.4
-
getUserVariables
- Specified by:
getUserVariables
in interfaceAlbumEngine
-
getSkinVariables
- Specified by:
getSkinVariables
in interfaceAlbumEngine
-
setRemoteDirectory
Might be moved out of AlbumBean -
getRemoteDirectory
Might be moved out of AlbumBean -
setAccountProfileName
-
getAccountProfileName
-
setReverseOrder
public void setReverseOrder(boolean newReverseOrder) -
isReverseOrder
public boolean isReverseOrder() -
setTextEncoding
-
getTextEncoding
-
setWriteUTF8
public void setWriteUTF8(boolean newWriteUTF8) -
isWriteUTF8
public boolean isWriteUTF8() -
setDirectoriesFirst
public void setDirectoriesFirst(boolean newDirectoriesFirst) -
isDirectoriesFirst
public boolean isDirectoriesFirst() -
setIgnorePattern
-
getIgnorePattern
-
setIncludePattern
Include only files matching includePattern- Since:
- 6.5
-
getIncludePattern
- Since:
- 6.5
-
setVars
@Deprecated public static void setVars(Map<String, Object> variables, bsh.Interpreter interpreter) throws ScriptExceptionDeprecated.Use setVars(Map variables, ScriptEngine engine)- Throws:
ScriptException
-
setVars
Called from JConsoleFrame only. Remove later and use our own scopes- Parameters:
variables
-engine
-
-
setUsing
-
getScalingMethod
-
setScalingMethod
-
getSmoothScalingType
- Returns:
- Since:
- 15
-
setSmoothScalingType
- Since:
- 15
-
isAcceleratedScaling
public boolean isAcceleratedScaling()Since 8.3.5 -
setAcceleratedScaling
public void setAcceleratedScaling(boolean hardwareScaling) Attempt to use hardware accelerated image scaling. Is usually faster but can produce worse results on some graphics cards Since 8.3.5 -
isSearchEngineFriendlyNames
public boolean isSearchEngineFriendlyNames()- Returns:
- the searchEngineFriendlyNames
-
setSearchEngineFriendlyNames
public void setSearchEngineFriendlyNames(boolean searchEngineFriendlyNames) - Parameters:
searchEngineFriendlyNames
- the searchEngineFriendlyNames to set
-
isWebSafeNames
public boolean isWebSafeNames()- Since:
- 11.3
-
getDirectoryChaining
-
setDirectoryChaining
Enable sequential traversal of an album tree via nextPage, previousPage, nextIndexPage and previousIndexPage- Parameters:
directoryChaining
-- Since:
- 24
-
isChainDirectories
public boolean isChainDirectories() -
setChainDirectories
Deprecated.Use setDictoryChaining() instead -
getCreditText
Key for text to use for credit links- Returns:
- Since:
- 10.10
-
setCreditText
Set key for text to use for credit links- Since:
- 10.10
-