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
Modifier and TypeClassDescriptionstatic enum
Define the types of outputstatic enum
Define the types of output naming conventionstatic enum
Define the types of SSH Authentication -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
returns the CellspacingReturns the name for the ZipFile containing the downloadable imagesint
Returns the ftp portReturns the memorised Google Maps API keyfloat
Returns the lowres jpg quality factorint
Same asConvenience method the generates a new Dimension object with the Midres dimensions.int
float
int
Same asgetMidresJpgQuality()
but returned as int and multiplied by 100int
Returns the width of the midres imagesReturns the output target choiceint
The number of rows that should be generated on the group overview pageReturns the method for picture Namingint
The number of scaling steps.int
Returns the output target choiceint
Returns 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.int
int
boolean
Returns if we should export highres picturesboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
returns whether a highres image should be rotatedboolean
void
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?)void
setBackgroundColor
(Color backgroundColor) Sets the background color for the webpagevoid
setCellspacing
(int cellspacing) sets the Cellspacingvoid
setDownloadZipFileName
(String downloadZipFileName) Sets the name of the Zip file to be createdvoid
setExportHighres
(boolean exportHighres) void
setFolderIconRequired
(boolean folderIconRequired) void
setFontColor
(Color fontColor) void
setFtpPassword
(String ftpPassword) void
setFtpPort
(int ftpPort) Sets the ftp portvoid
setFtpServer
(String ftpServer) void
setFtpTargetDir
(String ftpTargetDir) void
setFtpUser
(String ftpUser) void
setGenerateMap
(boolean generateMap) void
setGenerateMidresHtml
(boolean generateMidresHtml) void
setGenerateMouseover
(boolean generateDHTML) void
setGenerateZipfile
(boolean generateZipfile) void
setGoogleMapsApiKey
(String googleMapsApiKey) Rememebrs the Google Maps API keyvoid
setLinkToHighres
(boolean linkToHighres) void
setLowresJpgQuality
(float lowresJpgQuality) sets the lowers quality numbervoid
setLowresJpgQualityPercent
(int lowresJpgQualityPercent) Convenience method that allows the quality to be specified between 0 and 100 as an integer.void
setMidresHeight
(int midresHeight) void
setMidresJpgQuality
(float midresJpgQuality) void
setMidresJpgQualityPercent
(float midresJpgQuality) Convenience method that allows the quality to be specified between 0 and 100 as an integer.void
setMidresWidth
(int midresWidth) void
setOpenWebsiteAfterRendering
(boolean openWebsiteAfterRendering) void
setOutputTarget
(GenerateWebsiteRequest.OutputTarget outputTarget) Sets the method for output targetsvoid
setPicsPerRow
(int picsPerRow) void
setPictureNaming
(GenerateWebsiteRequest.PictureNamingType pictureNaming) Sets the method for picture naming.void
setRotateHighres
(boolean rotateHighres) Indicate that a highres image should be rotatedvoid
setScalingSteps
(int scalingSteps) Sets the number of scaling steps.void
setSequentialStartNumber
(int setSequentialStartNumber) void
setSshAuthType
(GenerateWebsiteRequest.SshAuthType sshAuthType) Sets the method for output targetsvoid
setSshKeyFile
(String sshKeyFile) void
setSshPassword
(String sshPassword) void
setSshPort
(int sshPort) Sets the ssh portvoid
setSshServer
(String sshServer) void
setSshTargetDir
(String sshTargetDir) void
setSshUser
(String sshUser) void
setStartNode
(SortableDefaultMutableTreeNode startNode) void
setTargetDirectory
(File htmlDirectory) void
setThumbnailHeight
(int thumbnailHeight) void
setThumbnailWidth
(int thumbnailWidth) void
setWriteRobotsTxt
(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?)
-