java.lang.Object
org.jpo.eventbus.GenerateWebsiteRequest
- Direct Known Subclasses:
GenerateWebsiteRequestDefaultOptions
This object holds the details of how the WebsiteGenerator is supposed to
generate the output pages. It simplifies the interaction between the GUI and
the worker thread significantly.
This is not a record because of all the setters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefine the types of outputstatic enumDefine the types of output naming conventionstatic enumDefine the types of SSH Authentication -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintreturns the CellspacingReturns the name for the ZipFile containing the downloadable imagesintReturns the ftp portReturns the memorised Google Maps API keyfloatReturns the lowres jpg quality factorintSame asConvenience method the generates a new Dimension object with the Midres dimensions.intfloatintSame asgetMidresJpgQuality()but returned as int and multiplied by 100intReturns the width of the midres imagesReturns the output target choiceintThe number of rows that should be generated on the group overview pageReturns the method for picture NamingintThe number of scaling steps.intReturns the output target choiceintReturns the ssh portThe note from which to startThe directory the web pages should be written toConvenience method that returns the size of the thumbnails in a new Dimension object.intintbooleanReturns if we should export highres picturesbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanreturns whether a highres image should be rotatedbooleanvoidThis optional method saves the options into the Settings object so that they can be remembered for the next time Note: Not all of them (yet?)voidsetBackgroundColor(Color backgroundColor) Sets the background color for the webpagevoidsetCellspacing(int cellspacing) sets the CellspacingvoidsetDownloadZipFileName(String downloadZipFileName) Sets the name of the Zip file to be createdvoidsetExportHighres(boolean exportHighres) voidsetFolderIconRequired(boolean folderIconRequired) voidsetFontColor(Color fontColor) voidsetFtpPassword(String ftpPassword) voidsetFtpPort(int ftpPort) Sets the ftp portvoidsetFtpServer(String ftpServer) voidsetFtpTargetDir(String ftpTargetDir) voidsetFtpUser(String ftpUser) voidsetGenerateMap(boolean generateMap) voidsetGenerateMidresHtml(boolean generateMidresHtml) voidsetGenerateMouseover(boolean generateDHTML) voidsetGenerateZipfile(boolean generateZipfile) voidsetGoogleMapsApiKey(String googleMapsApiKey) Rememebrs the Google Maps API keyvoidsetLinkToHighres(boolean linkToHighres) voidsetLowresJpgQuality(float lowresJpgQuality) sets the lowers quality numbervoidsetLowresJpgQualityPercent(int lowresJpgQualityPercent) Convenience method that allows the quality to be specified between 0 and 100 as an integer.voidsetMidresHeight(int midresHeight) voidsetMidresJpgQuality(float midresJpgQuality) voidsetMidresJpgQualityPercent(float midresJpgQuality) Convenience method that allows the quality to be specified between 0 and 100 as an integer.voidsetMidresWidth(int midresWidth) voidsetOpenWebsiteAfterRendering(boolean openWebsiteAfterRendering) voidsetOutputTarget(GenerateWebsiteRequest.OutputTarget outputTarget) Sets the method for output targetsvoidsetPicsPerRow(int picsPerRow) voidsetPictureNaming(GenerateWebsiteRequest.PictureNamingType pictureNaming) Sets the method for picture naming.voidsetRotateHighres(boolean rotateHighres) Indicate that a highres image should be rotatedvoidsetScalingSteps(int scalingSteps) Sets the number of scaling steps.voidsetSequentialStartNumber(int setSequentialStartNumber) voidsetSshAuthType(GenerateWebsiteRequest.SshAuthType sshAuthType) Sets the method for output targetsvoidsetSshKeyFile(String sshKeyFile) voidsetSshPassword(String sshPassword) voidsetSshPort(int sshPort) Sets the ssh portvoidsetSshServer(String sshServer) voidsetSshTargetDir(String sshTargetDir) voidsetSshUser(String sshUser) voidsetStartNode(SortableDefaultMutableTreeNode startNode) voidsetTargetDirectory(File htmlDirectory) voidsetThumbnailHeight(int thumbnailHeight) voidsetThumbnailWidth(int thumbnailWidth) voidsetWriteRobotsTxt(boolean writeRobotsTxt) toString()Formats a neat summary of the options
-
Constructor Details
-
GenerateWebsiteRequest
public GenerateWebsiteRequest()
-
-
Method Details
-
setBackgroundColor
Sets the background color for the webpage- Parameters:
backgroundColor- background color for the website
-
getCellspacing
public int getCellspacing()returns the Cellspacing- Returns:
- the cellspacing
-
setCellspacing
public void setCellspacing(int cellspacing) sets the Cellspacing- Parameters:
cellspacing- Cellspacing in the output
-
isExportHighres
public boolean isExportHighres()Returns if we should export highres pictures- Returns:
- true if highres pictures are to be exported
-
setExportHighres
public void setExportHighres(boolean exportHighres) -
setFontColor
-
isGenerateMidresHtml
public boolean isGenerateMidresHtml()- Returns:
- the generateMidresHtml
-
setGenerateMidresHtml
public void setGenerateMidresHtml(boolean generateMidresHtml) - Parameters:
generateMidresHtml- the generateMidresHtml to set
-
isGenerateMap
public boolean isGenerateMap() -
setGenerateMap
public void setGenerateMap(boolean generateMap) -
isGenerateMouseover
public boolean isGenerateMouseover() -
setGenerateMouseover
public void setGenerateMouseover(boolean generateDHTML) -
isGenerateZipfile
public boolean isGenerateZipfile() -
setGenerateZipfile
public void setGenerateZipfile(boolean generateZipfile) -
getTargetDirectory
The directory the web pages should be written to- Returns:
- The directory where the web pages should be written to
-
setTargetDirectory
-
isLinkToHighres
public boolean isLinkToHighres() -
setLinkToHighres
public void setLinkToHighres(boolean linkToHighres) -
getThumbnailHeight
public int getThumbnailHeight() -
setThumbnailHeight
public void setThumbnailHeight(int thumbnailHeight) -
getThumbnailWidth
public int getThumbnailWidth() -
setThumbnailWidth
public void setThumbnailWidth(int thumbnailWidth) -
getThumbnailDimension
Convenience method that returns the size of the thumbnails in a new Dimension object.- Returns:
- The desired dimensions of the Thumbnail size and width.
-
getScalingSteps
public int getScalingSteps()The number of scaling steps. Interestingly the quality gets better if scaling is done in several steps.- Returns:
- the number of scaling steps
-
setScalingSteps
public void setScalingSteps(int scalingSteps) Sets the number of scaling steps. Interestingly the quality gets better if scaling is done in several steps.- Parameters:
scalingSteps- the new number of scaling Steps
-
getLowresJpgQuality
public float getLowresJpgQuality()Returns the lowres jpg quality factor- Returns:
- the lowres jpg quality factor
-
getLowresJpgQualityPercent
public int getLowresJpgQualityPercent()Same as- Returns:
- the lowres quality number
- See Also:
-
setLowresJpgQuality
public void setLowresJpgQuality(float lowresJpgQuality) sets the lowers quality number- Parameters:
lowresJpgQuality- the lowres quality
-
setLowresJpgQualityPercent
public void setLowresJpgQualityPercent(int lowresJpgQualityPercent) Convenience method that allows the quality to be specified between 0 and 100 as an integer. If the value is out of bounds it is raised to 0 or lowered to 100.- Parameters:
lowresJpgQualityPercent- the lowres quality
-
getMidresHeight
public int getMidresHeight() -
setMidresHeight
public void setMidresHeight(int midresHeight) -
getMidresJpgQuality
public float getMidresJpgQuality() -
setMidresJpgQuality
public void setMidresJpgQuality(float midresJpgQuality) -
getMidresJpgQualityPercent
public int getMidresJpgQualityPercent()Same asgetMidresJpgQuality()but returned as int and multiplied by 100- Returns:
- the midres quality number
-
setMidresJpgQualityPercent
public void setMidresJpgQualityPercent(float midresJpgQuality) Convenience method that allows the quality to be specified between 0 and 100 as an integer. If the value is out of bounds it is raised to 0 or lowered to 100.- Parameters:
midresJpgQuality- the desired quality between 0 and 100
-
getMidresWidth
public int getMidresWidth()Returns the width of the midres images- Returns:
- the width of the midres images
-
setMidresWidth
public void setMidresWidth(int midresWidth) -
getMidresDimension
Convenience method the generates a new Dimension object with the Midres dimensions.- Returns:
- A new object with the Midres dimensions.
-
getPicsPerRow
public int getPicsPerRow()The number of rows that should be generated on the group overview page- Returns:
- The number of rows that should be generated on the group overview page
-
setPicsPerRow
public void setPicsPerRow(int picsPerRow) -
getStartNode
The note from which to start- Returns:
- The node from which to start
-
setStartNode
-
setRotateHighres
public void setRotateHighres(boolean rotateHighres) Indicate that a highres image should be rotated- Parameters:
rotateHighres- whether to rotate highres images
-
isRotateHighres
public boolean isRotateHighres()returns whether a highres image should be rotated- Returns:
- true if the highres image should be rotated, false if not
-
isFolderIconRequired
public boolean isFolderIconRequired() -
setFolderIconRequired
public void setFolderIconRequired(boolean folderIconRequired) -
getDownloadZipFileName
Returns the name for the ZipFile containing the downloadable images- Returns:
- The name of the file to create (no path information)
-
setDownloadZipFileName
Sets the name of the Zip file to be created- Parameters:
downloadZipFileName- the name of the zip file to create
-
getFtpTargetDir
- Returns:
- the ftpTargetDir
-
setFtpTargetDir
- Parameters:
ftpTargetDir- the ftpTargetDir to set
-
getSshServer
- Returns:
- the sshServer
-
setSshServer
- Parameters:
sshServer- the sshServer to set
-
getSshUser
- Returns:
- the sshUser
-
setSshUser
- Parameters:
sshUser- the sshUser to set
-
getSshPassword
- Returns:
- the sshPassword
-
setSshPassword
- Parameters:
sshPassword- the sshPassword to set
-
getSshTargetDir
- Returns:
- the sshTargetDir
-
setSshTargetDir
- Parameters:
sshTargetDir- the sshTargetDir to set
-
getSshKeyFile
- Returns:
- the sshKeyFile
-
setSshKeyFile
- Parameters:
sshKeyFile- the sshKeyFile to set
-
getGoogleMapsApiKey
Returns the memorised Google Maps API key- Returns:
- the Google Maps API key
-
setGoogleMapsApiKey
Rememebrs the Google Maps API key- Parameters:
googleMapsApiKey- the key to remember
-
getPictureNaming
Returns the method for picture Naming- Returns:
- the picture naming code
-
setPictureNaming
Sets the method for picture naming. Validates that the number is in the bounds- Parameters:
pictureNaming- Picture Naming Type
-
getSequentialStartNumber
public int getSequentialStartNumber()- Returns:
- the setSequentialStartNumber
-
setSequentialStartNumber
public void setSequentialStartNumber(int setSequentialStartNumber) - Parameters:
setSequentialStartNumber- the setSequentialStartNumber to set
-
isWriteRobotsTxt
public boolean isWriteRobotsTxt()- Returns:
- the writeRobotsTxt
-
setWriteRobotsTxt
public void setWriteRobotsTxt(boolean writeRobotsTxt) - Parameters:
writeRobotsTxt- the writeRobotsTxt to set
-
getOutputTarget
Returns the output target choice- Returns:
- the output target choice
-
setOutputTarget
Sets the method for output targets- Parameters:
outputTarget- the output target
-
getSshAuthType
Returns the output target choice- Returns:
- the output target choice
-
setSshAuthType
Sets the method for output targets- Parameters:
sshAuthType- see the documentation of ssh
-
getFtpPort
public int getFtpPort()Returns the ftp port- Returns:
- the ftp port
-
setFtpPort
public void setFtpPort(int ftpPort) Sets the ftp port- Parameters:
ftpPort- the ftp port
-
getSshPort
public int getSshPort()Returns the ssh port- Returns:
- the ssh port
-
setSshPort
public void setSshPort(int sshPort) Sets the ssh port- Parameters:
sshPort- the ssh port
-
getFtpServer
- Returns:
- the ftpServer
-
setFtpServer
- Parameters:
ftpServer- the server address
-
getFtpUser
- Returns:
- the ftpUser
-
setFtpUser
- Parameters:
ftpUser- the ftpUser to set
-
setFtpPassword
- Parameters:
ftpPassword- the ftpPassword to set
-
getFtpPassword
- Returns:
- the ftpUser
-
isOpenWebsiteAfterRendering
public boolean isOpenWebsiteAfterRendering() -
setOpenWebsiteAfterRendering
public void setOpenWebsiteAfterRendering(boolean openWebsiteAfterRendering) -
toString
Formats a neat summary of the options -
saveToSettings
public void saveToSettings()This optional method saves the options into the Settings object so that they can be remembered for the next time Note: Not all of them (yet?)
-